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-10-08 15:45:45 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2020-10-08 19:39:41 +0300
commit043ddcf3ad3bdcba2c980af76202bc6f177f4b0d (patch)
treed9ebf082f18edf58eceff6dbae99833845bc578a /source/blender/editors/transform/transform_mode_translate.c
parent196d6166e51dc9496a8a678c329758134988eee3 (diff)
Cleanup: Simplify use of 'Snapping Gears'
This commit removes `t->snap[0]` and `t->snap_spatial[0]`. They were not actually being used, and could add overhead for transformation without snap.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_translate.c')
-rw-r--r--source/blender/editors/transform/transform_mode_translate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c
index c17e6e596e0..d4748e7933b 100644
--- a/source/blender/editors/transform/transform_mode_translate.c
+++ b/source/blender/editors/transform/transform_mode_translate.c
@@ -449,9 +449,9 @@ void initTranslation(TransInfo *t)
t->num.flag = 0;
t->num.idx_max = t->idx_max;
- copy_v3_v3(t->snap, t->snap_spatial);
+ copy_v2_v2(t->snap, t->snap_spatial);
- copy_v3_fl(t->num.val_inc, t->snap[1]);
+ copy_v3_fl(t->num.val_inc, t->snap[0]);
t->num.unit_sys = t->scene->unit.system;
if (t->spacetype == SPACE_VIEW3D) {
/* Handling units makes only sense in 3Dview... See T38877. */