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 Cavalcantemano-wii <germano.costa@ig.com.br>2021-01-11 02:24:46 +0300
committerGermano Cavalcantemano-wii <germano.costa@ig.com.br>2021-01-11 02:24:46 +0300
commit08e44b5e3ebbdc79ca849ce14f4d75a88f72a8b7 (patch)
tree0e51294e37f556fa54c69b362ad2f50409ff4e36 /source/blender/editors/transform/transform_mode_translate.c
parent9db3d1951da15254efbbcf028176facb78118ec1 (diff)
Fix Increment Snapping Without Constraints in Non-Axis-Aligned Views
The incremental snap was always operating in the local space, which in most cases is the VIEW type orientation. Use only local space when the operation is affected by constraint. Differential Revision: https://developer.blender.org/D10052
Diffstat (limited to 'source/blender/editors/transform/transform_mode_translate.c')
-rw-r--r--source/blender/editors/transform/transform_mode_translate.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c
index 8597c372537..4b85e8067fd 100644
--- a/source/blender/editors/transform/transform_mode_translate.c
+++ b/source/blender/editors/transform/transform_mode_translate.c
@@ -395,9 +395,9 @@ 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 (!(activeSnap(t) && validSnap(t)) && transform_snap_increment(t, incr_dir)) {
- mul_v3_m3v3(incr_dir, t->spacemtx, incr_dir);
+ copy_v3_v3(incr_dir, global_dir);
+ if (!(activeSnap(t) && validSnap(t)) &&
+ transform_snap_increment_ex(t, (t->con.mode & CON_APPLY) != 0, incr_dir)) {
/* Test for mixed snap with grid. */
float snap_dist_sq = FLT_MAX;