[Bf-blender-cvs] [3a3b990] master: Workaround T40241: Vertex snapping snaps to wrong place

Campbell Barton noreply at git.blender.org
Mon May 19 11:27:35 CEST 2014


Commit: 3a3b990b2d35385aa564be6115411edaf9165a08
Author: Campbell Barton
Date:   Mon May 19 19:25:59 2014 +1000
https://developer.blender.org/rB3a3b990b2d35385aa564be6115411edaf9165a08

Workaround T40241: Vertex snapping snaps to wrong place

===================================================================

M	source/blender/editors/transform/transform_ops.c

===================================================================

diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index f27ea47..c6c9e84a 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -391,6 +391,14 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event)
 	exit_code = transformEvent(t, event);
 	t->context = NULL;
 
+	/* XXX, workaround: active needs to be calculated before transforming,
+	 * since we're not reading from 'td->center' in this case. see: T40241 */
+	if (t->tsnap.target == SCE_SNAP_TARGET_ACTIVE) {
+		if ((t->tsnap.status & TARGET_INIT) == 0) {
+			t->tsnap.targetSnap(t);
+		}
+	}
+
 	transformApply(C, t);
 
 	exit_code |= transformEnd(C, t);




More information about the Bf-blender-cvs mailing list