diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-11-27 16:51:33 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-01-13 16:52:07 +0300 |
commit | 5d31f404de7fad00952c2d2810d920a04090c55a (patch) | |
tree | 3ffa7db0a9f6b42081d4835fbe984ff6e6328dcb | |
parent | 87310c0af164db5b7f3de33cf8612c4f490b112d (diff) |
Fix transform snap mixed with incremental
The incremental was taking priority but the other elements are mandatory.
-rw-r--r-- | source/blender/editors/transform/transform_mode_rotate.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_mode_rotate.c b/source/blender/editors/transform/transform_mode_rotate.c index d8857dbc31e..97c19e03047 100644 --- a/source/blender/editors/transform/transform_mode_rotate.c +++ b/source/blender/editors/transform/transform_mode_rotate.c @@ -216,8 +216,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 d4748e7933b..48544eee7ec 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -391,7 +391,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. */ |