apply visual transform to pose

So constrainted bones can have their transform applied to their loc/scale/rot, then remove the constraints
This commit is contained in:
2010-02-19 15:34:26 +00:00
parent 3b9fdfa9e1
commit 3bf2715039
10 changed files with 152 additions and 45 deletions

View File

@@ -512,7 +512,7 @@ void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPose
/* 4. walk over the tree for regular solving */
for(a=0; a<tree->totchannel; a++) {
if(!(tree->pchan[a]->flag & POSE_DONE)) // successive trees can set the flag
where_is_pose_bone(scene, ob, tree->pchan[a], ctime);
where_is_pose_bone(scene, ob, tree->pchan[a], ctime, 1);
// tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
tree->pchan[a]->flag |= POSE_CHAIN;
}

View File

@@ -1532,7 +1532,7 @@ static void execute_scene(Scene* blscene, IK_Scene* ikscene, bItasc* ikparam, fl
// in animation mode, we must get the bone position from action and constraints
for(i=0, ikchan=ikscene->channels; i<ikscene->numchan; i++, ++ikchan) {
if (!(ikchan->pchan->flag & POSE_DONE))
where_is_pose_bone(blscene, ikscene->blArmature, ikchan->pchan, ctime);
where_is_pose_bone(blscene, ikscene->blArmature, ikchan->pchan, ctime, 1);
// tell blender that this channel was controlled by IK, it's cleared on each where_is_pose()
ikchan->pchan->flag |= (POSE_DONE|POSE_CHAIN);
ikchan->jointValid = 0;