[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52617] trunk/blender/source/blender/ editors/transform: Fix #33324: Auto IK not working after recent changes.

Brecht Van Lommel brechtvanlommel at pandora.be
Tue Nov 27 21:07:13 CET 2012


Revision: 52617
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52617
Author:   blendix
Date:     2012-11-27 20:07:12 +0000 (Tue, 27 Nov 2012)
Log Message:
-----------
Fix #33324: Auto IK not working after recent changes. iTaSC it seems never worked
with Auto IK, now that's fixed too.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/CMakeLists.txt
    trunk/blender/source/blender/editors/transform/SConscript
    trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/transform/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/editors/transform/CMakeLists.txt	2012-11-27 17:41:39 UTC (rev 52616)
+++ trunk/blender/source/blender/editors/transform/CMakeLists.txt	2012-11-27 20:07:12 UTC (rev 52617)
@@ -25,6 +25,7 @@
 	../../blenlib
 	../../blenloader
 	../../bmesh
+	../../ikplugin
 	../../makesdna
 	../../makesrna
 	../../windowmanager

Modified: trunk/blender/source/blender/editors/transform/SConscript
===================================================================
--- trunk/blender/source/blender/editors/transform/SConscript	2012-11-27 17:41:39 UTC (rev 52616)
+++ trunk/blender/source/blender/editors/transform/SConscript	2012-11-27 20:07:12 UTC (rev 52617)
@@ -6,7 +6,7 @@
 incs = '../include ../../blenfont ../../blenlib ../../blenkernel ../../makesdna ../../imbuf'
 incs += ' ../../windowmanager #/intern/guardedalloc #/extern/glew/include'
 incs += ' ../../render/extern/include'
-incs += ' ../../gpu ../../makesrna ../../blenloader ../../bmesh'
+incs += ' ../../gpu ../../makesrna ../../blenloader ../../bmesh ../../ikplugin'
 
 defs = []
 

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-11-27 17:41:39 UTC (rev 52616)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c	2012-11-27 20:07:12 UTC (rev 52617)
@@ -91,6 +91,7 @@
 #include "BKE_tracking.h"
 #include "BKE_mask.h"
 
+#include "BIK_api.h"
 
 #include "ED_anim_api.h"
 #include "ED_armature.h"
@@ -773,6 +774,9 @@
 			if (con->type == CONSTRAINT_TYPE_KINEMATIC) {
 				data = con->data;
 				if (data->flag & CONSTRAINT_IK_TEMP) {
+					/* iTaSC needs clear for removed constraints */
+					BIK_clear_data(ob->pose);
+
 					BLI_remlink(&pchan->constraints, con);
 					MEM_freeN(con->data);
 					MEM_freeN(con);
@@ -839,7 +843,7 @@
 	}
 	else
 		data->flag = CONSTRAINT_IK_TIP;
-	data->flag |= CONSTRAINT_IK_TEMP | CONSTRAINT_IK_AUTO;
+	data->flag |= CONSTRAINT_IK_TEMP | CONSTRAINT_IK_AUTO | CONSTRAINT_IK_POS;
 	copy_v3_v3(data->grabtarget, pchan->pose_tail);
 	data->rootbone = 0; /* watch-it! has to be 0 here, since we're still on the same bone for the first time through the loop [#25885] */
 	
@@ -933,6 +937,10 @@
 		}
 	}
 
+	/* iTaSC needs clear for new IK constraints */
+	if(tot_ik)
+		BIK_clear_data(ob->pose);
+
 	return (tot_ik) ? 1 : 0;
 }
 




More information about the Bf-blender-cvs mailing list