[Bf-blender-cvs] [aef443a] master: Fix T40438: Pressing G key to move the camera quits Blender.

Bastien Montagne noreply at git.blender.org
Sun May 25 11:08:11 CEST 2014


Commit: aef443ab2d27a79160cca0588bc221457572cead
Author: Bastien Montagne
Date:   Sun May 25 11:06:32 2014 +0200
https://developer.blender.org/rBaef443ab2d27a79160cca0588bc221457572cead

Fix T40438: Pressing G key to move the camera quits Blender.

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

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 c6c9e84a..7bdbbf7 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -394,7 +394,8 @@ static int transform_modal(bContext *C, wmOperator *op, const wmEvent *event)
 	/* 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) {
+		/* In camera view, tsnap callback is not set (see initSnappingMode() in transfrom_snap.c, and T40348). */
+		if (t->tsnap.targetSnap && ((t->tsnap.status & TARGET_INIT) == 0)) {
 			t->tsnap.targetSnap(t);
 		}
 	}




More information about the Bf-blender-cvs mailing list