[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27054] trunk/blender/source/blender/ editors/transform/transform.c: [#21265] Rotate behaves wrong with constraints

Martin Poirier theeth at yahoo.com
Sun Feb 21 15:13:20 CET 2010


Revision: 27054
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27054
Author:   theeth
Date:     2010-02-21 15:13:20 +0100 (Sun, 21 Feb 2010)

Log Message:
-----------
[#21265] Rotate behaves wrong with constraints

With new axis var for rotate, it wasn't reset properly when constraints are turned off.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform.c

Modified: trunk/blender/source/blender/editors/transform/transform.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform.c	2010-02-21 14:05:02 UTC (rev 27053)
+++ trunk/blender/source/blender/editors/transform/transform.c	2010-02-21 14:13:20 UTC (rev 27054)
@@ -2963,8 +2963,13 @@
 	
 	snapGrid(t, &final);
 	
-	if (t->con.applyRot) {
+	if ((t->con.mode & CON_APPLY) && t->con.applyRot) {
 		t->con.applyRot(t, NULL, t->axis, &final);
+	} else {
+		/* reset axis if constraint is not set */
+		VECCOPY(t->axis, t->viewinv[2]);
+		mul_v3_fl(t->axis, -1.0f);
+		normalize_v3(t->axis);
 	}
 	
 	applySnapping(t, &final);





More information about the Bf-blender-cvs mailing list