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.
This commit is contained in:
Ton Roosendaal
2011-01-09 17:49:38 +00:00
parent 7bc46973d2
commit 856d9c9057

View File

@@ -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;
}
}
}