Friday, 13 January 2012

Maya: IK Handles not updating on undo

I had this problem a few times (even back on maya 5), where you set up a rig, and you point constrain the ikHandle to a control object. It moves around fine, up until you undo. The handle just doesn't seem to behave properly, and scrubbing or moving it again will snap the ikHandle to where it should be.
So I thought I might give a workaround.
Directly constraining an IkHandle seems to have the issue of not updating when undoing.
It seems to be a clash with the way the ik handles and constraints evaluate, and something seems to get missed.
You can avoid this by parenting the ikHandle under the controller, or (if you want the outliner to be tidy) you can parent the ikHandle under a null or locator and constraint that instead.

EDIT:
Brad Clark (Co-founder - riggingdojo.com) provided more info and suggested a better solution.
You shouldn't have this problem if you turn off the snap setting on the ik handle. Then it won't be trying to get back to the end of the chain and should stick with the constraint target. There is a bug with Maya Undo though that if you are moving a node and hit the undo hot key before releasing the mouse button for the current transform, it will undo the previous transform, leaving the move you just did outside of the que, causing an offset that has to be fixed by hand.

Comments welcome.