This script lets you switch and match Poses between IK/FK controls in the animation scene.
Works for Riggs that don't have IK/FK match built in and requires only Standard FK controls and IK Pole Vector Setup.
The Controls are defined once and can be stored in Node for easy reususe throughout the animation.
1. Define Limb to work on
This always needs to be defined bofore loading/storing/switching
Sides are treated seperately to not be restriced by naming convention
2. Define Ctrls necessary by selecting them and hit the << button
<< FK1: Upper arm
<< FK2: Lower arm
<< FK3: Hand
<< IK Ctrl: IK Hand
<< IK Pole:
<< Switch Ctrl: The ctrl that is used to switch between ik and fk mode
<< Switch Attr: The attribute that is dialed to switch.
It can be highlighted in the channel box and hit <<
Some Riggs have different orientations in their IK and FK ctrls and joints.
This becomes obvious when running 'Match' and seeing a 90 degree offset in the wrist
Set the offset and run 'Match' again to align them
Switch IK/FK: Simple switches between the modes (does not do any matching)
import pymel.core as pm
import mog_ikFkSwitch as mog_ikFkSwitch
- Pole Vector Control is required and will not run if controlled with attribute
- Works only on Referenced Riggs
Future Improvements/Optimzations planned:
- Store rotation offset values
- Match/Bake for specified range
- Make script work/not error if there is no polevector
- create nodes in Rigg files and look for Referenced Nodes on Load
Questions/comments/issues to email@example.com