[Bf-blender-cvs] [e4e7dfc1d8c] master: Fix transform snap mixed with incremental
Germano Cavalcante
noreply at git.blender.org
Fri Nov 27 14:52:09 CET 2020
Commit: e4e7dfc1d8c0486530e5cabd2e448bf79b2fdb0b
Author: Germano Cavalcante
Date: Fri Nov 27 10:51:33 2020 -0300
Branches: master
https://developer.blender.org/rBe4e7dfc1d8c0486530e5cabd2e448bf79b2fdb0b
Fix transform snap mixed with incremental
The incremental was taking priority but the other elements are mandatory.
===================================================================
M source/blender/editors/transform/transform_mode_rotate.c
M source/blender/editors/transform/transform_mode_translate.c
===================================================================
diff --git a/source/blender/editors/transform/transform_mode_rotate.c b/source/blender/editors/transform/transform_mode_rotate.c
index 856e71a0df6..e81ea8b0a0d 100644
--- a/source/blender/editors/transform/transform_mode_rotate.c
+++ b/source/blender/editors/transform/transform_mode_rotate.c
@@ -214,8 +214,10 @@ static void applyRotation(TransInfo *t, const int UNUSED(mval[2]))
final = large_rotation_limit(final);
}
else {
- transform_snap_increment(t, &final);
applySnapping(t, &final);
+ if (!(activeSnap(t) && validSnap(t))) {
+ transform_snap_increment(t, &final);
+ }
}
t->values_final[0] = final;
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c
index 183fc8f5dc3..a54de102966 100644
--- a/source/blender/editors/transform/transform_mode_translate.c
+++ b/source/blender/editors/transform/transform_mode_translate.c
@@ -389,7 +389,7 @@ static void applyTranslation(TransInfo *t, const int UNUSED(mval[2]))
float incr_dir[3];
mul_v3_m3v3(incr_dir, t->spacemtx_inv, global_dir);
- if (transform_snap_increment(t, incr_dir)) {
+ if (!(activeSnap(t) && validSnap(t)) && transform_snap_increment(t, incr_dir)) {
mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir);
/* Test for mixed snap with grid. */
More information about the Bf-blender-cvs
mailing list