From 043ddcf3ad3bdcba2c980af76202bc6f177f4b0d Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Thu, 8 Oct 2020 09:45:45 -0300 Subject: 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. --- source/blender/editors/transform/transform_mode_edge_slide.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/transform/transform_mode_edge_slide.c') diff --git a/source/blender/editors/transform/transform_mode_edge_slide.c b/source/blender/editors/transform/transform_mode_edge_slide.c index 0c38ba588c1..c887b69c792 100644 --- a/source/blender/editors/transform/transform_mode_edge_slide.c +++ b/source/blender/editors/transform/transform_mode_edge_slide.c @@ -1555,11 +1555,10 @@ void initEdgeSlide_ex( t->idx_max = 0; t->num.idx_max = 0; - t->snap[0] = 0.0f; - t->snap[1] = 0.1f; - t->snap[2] = t->snap[1] * 0.1f; + t->snap[0] = 0.1f; + t->snap[1] = t->snap[0] * 0.1f; - 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; t->num.unit_type[0] = B_UNIT_NONE; -- cgit v1.2.3