diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2022-10-22 18:00:01 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-10-22 18:38:48 +0300 |
commit | a7aa0f1a0c240724e533a5b815c8c4d75b117902 (patch) | |
tree | 36cebae70f8f496331dee71c94fd6d5b5627c17b /source/blender/editors/transform/transform_mode_translate.c | |
parent | 9f560219751240cc15a8de0b2e485e1538fee642 (diff) |
Fix T101991: "Absolute Grid Snap" not working
Error introduced in rB1edebb794b76.
In that commit it was kind of forgotten that the snap to grid is also
used in 3D views.
Also a refactoring and cleanup was applied to simplify the code.
Diffstat (limited to 'source/blender/editors/transform/transform_mode_translate.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_translate.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_mode_translate.c b/source/blender/editors/transform/transform_mode_translate.c index 91388ecd661..b7ffba6ad58 100644 --- a/source/blender/editors/transform/transform_mode_translate.c +++ b/source/blender/editors/transform/transform_mode_translate.c @@ -590,7 +590,8 @@ void initTranslation(TransInfo *t) t->num.flag = 0; t->num.idx_max = t->idx_max; - copy_v2_v2(t->snap, t->snap_spatial_x); + t->snap[0] = 1.0; + t->snap[1] = t->snap_spatial_precision; copy_v3_fl(t->num.val_inc, t->snap[0]); t->num.unit_sys = t->scene->unit.system; |