Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-28 00:07:12 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-11-28 00:07:12 +0400
commite066601fdd2f10dbb9efb60a12504772e1495b31 (patch)
treec6666d013b9ff5845c4b6b7383d0e636259b3c23 /source/blender
parent936fca57c394093bca4e8d8609635c51ebeee49d (diff)
Fix #33324: Auto IK not working after recent changes. iTaSC it seems never worked
with Auto IK, now that's fixed too.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/transform/CMakeLists.txt1
-rw-r--r--source/blender/editors/transform/SConscript2
-rw-r--r--source/blender/editors/transform/transform_conversions.c10
3 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/editors/transform/CMakeLists.txt b/source/blender/editors/transform/CMakeLists.txt
index 05a4f6f4ce5..ec114bc3019 100644
--- a/source/blender/editors/transform/CMakeLists.txt
+++ b/source/blender/editors/transform/CMakeLists.txt
@@ -25,6 +25,7 @@ set(INC
../../blenlib
../../blenloader
../../bmesh
+ ../../ikplugin
../../makesdna
../../makesrna
../../windowmanager
diff --git a/source/blender/editors/transform/SConscript b/source/blender/editors/transform/SConscript
index dbf6179035c..9cf36a2d970 100644
--- a/source/blender/editors/transform/SConscript
+++ b/source/blender/editors/transform/SConscript
@@ -6,7 +6,7 @@ sources = env.Glob('*.c')
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 = []
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 5b79b69f7ec..1cf01bc1bbc 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -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 @@ static void pose_grab_with_ik_clear(Object *ob)
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 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
}
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 @@ static short pose_grab_with_ik(Object *ob)
}
}
+ /* iTaSC needs clear for new IK constraints */
+ if(tot_ik)
+ BIK_clear_data(ob->pose);
+
return (tot_ik) ? 1 : 0;
}