Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2020-11-27 16:51:33 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-11-27 16:51:33 +0300
commite4e7dfc1d8c0486530e5cabd2e448bf79b2fdb0b (patch)
tree0c38da330157faaa0faa895be6d40827edbb7101 /source/blender/editors
parentf9e994d0f463abb87761591e30c47a9613be6cca (diff)
Fix transform snap mixed with incremental
The incremental was taking priority but the other elements are mandatory.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/transform/transform_mode_rotate.c4
-rw-r--r--source/blender/editors/transform/transform_mode_translate.c2
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 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. */