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:
authorTon Roosendaal <ton@blender.org>2011-01-09 20:49:38 +0300
committerTon Roosendaal <ton@blender.org>2011-01-09 20:49:38 +0300
commit856d9c90572491a9c462b2e7a63535e2ffc3dcf6 (patch)
tree60cd6090a19749b1b29524310cdbe6b2ce76b3d2 /source/blender/editors/transform/transform_conversions.c
parent7bc46973d2f150faef4b210b19172ddbfd35c6ef (diff)
Bugfix #25554
Actually a minor tweak: Auto-IK fails on correcting for constrainted bones in chains. For that reason it stops including constrainted bones for it. Now it does include constraints with influence zero, or which were disabled by user input.
Diffstat (limited to 'source/blender/editors/transform/transform_conversions.c')
-rw-r--r--source/blender/editors/transform/transform_conversions.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 75458335b05..fce1247ec6f 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -880,8 +880,15 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan)
/* but, constrainted bones can't get auto-ik transform applied, exclude these */
if(pchan && pchan->constraints.first) {
- data->rootbone--;
- pchan= NULL;
+ /* if constraint is disabled or has no influence, OK then we allow :) */
+ for (con= pchan->constraints.first; con; con= con->next) {
+ if ((con->enforce==0.0f) || (con->flag & (CONSTRAINT_DISABLE|CONSTRAINT_OFF)));
+ else break;
+ }
+ if(con) {
+ data->rootbone--;
+ pchan= NULL;
+ }
}
}