diff options
author | Ton Roosendaal <ton@blender.org> | 2010-12-28 20:03:09 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2010-12-28 20:03:09 +0300 |
commit | 8c4a93110e764b71eb098bcc24f1cc03105f1d67 (patch) | |
tree | b634d175e8d1eab046cdd5e2b086e105a96c0fe9 | |
parent | 98ec317d2b6e6ebd245b07cdb41c4848369b367b (diff) |
Bugfix #21825
Auto-IK: applying back the IK transform on bones fails for constrainted
bones themselves. This would require the post-transform of IK to be
converted to a pre-transform for the constraint. That's too much of
a headache for bugfixing days.
To keep the autoIK feature work it now stops IK chains at constrainted
bones. Added todo item for a matrix wizzard to fix this one day.
(What would be really cool is a matrix-api for armature to easily
get all the required pre- and post transforms and apply. There's a lot
of duplicate exception handling for hinge bones for example.)
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 90a275883ae..df267254d8f 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -875,6 +875,12 @@ static short pose_grab_with_ik_add(bPoseChannel *pchan) pchan = pchan->parent; else pchan = NULL; + + /* but, constrainted bones can't get auto-ik transform applied, exclude these */ + if(pchan && pchan->constraints.first) { + data->rootbone--; + pchan= NULL; + } } /* make a copy of maximum chain-length */ |