From eb68cd713b151d97394cd9c9d12d9ee8148970ec Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Tue, 6 Oct 2020 16:19:22 -0300 Subject: Fix T81465: Snapping to edge center doesn't work as expected when using axis locking The result was being affected by the view alignment correction. Regression introduced in rB4eda60c2d82d --- source/blender/editors/transform/transform_constraints.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/transform/transform_constraints.c b/source/blender/editors/transform/transform_constraints.c index 9cb8d97393a..ac27f2cd7aa 100644 --- a/source/blender/editors/transform/transform_constraints.c +++ b/source/blender/editors/transform/transform_constraints.c @@ -384,9 +384,9 @@ static void applyAxisConstraintVec( if (activeSnap(t)) { if (validSnap(t)) { - is_snap_to_point = (t->tsnap.snapElem & SCE_SNAP_MODE_VERTEX) != 0; is_snap_to_edge = (t->tsnap.snapElem & SCE_SNAP_MODE_EDGE) != 0; is_snap_to_face = (t->tsnap.snapElem & SCE_SNAP_MODE_FACE) != 0; + is_snap_to_point = !is_snap_to_edge && !is_snap_to_face; } else if (t->tsnap.snapElem & SCE_SNAP_MODE_GRID) { is_snap_to_point = true; -- cgit v1.2.3