What is it¶
A universal smart IK-FK switching script for Autodesk Maya.
Essential tool for any animator. A script for Autodesk Maya, that provides easy, intuitive and smart IK-FK switching for almost any rig. Setup for 1 limb takes just a few minutes. It features manual and automatic switching, which is triggered upon selection of a control that you want to switch to. It also has IK-FK baking, allowing you to quickly bake all animation from one type of control to another.
It supports unlimited number of limbs in a scene or rig. Once setup it does not rely on object names, instead it sets up connections between nodes, allowing you to rename your objects without losing it's functionality.
It also features advanced rotation matching through OpenMaya API, which ensures that objects are always rotated the right way.
By purchasing this tool you support further development of it, and get direct technical support from it's developer.
- Place the contents of the archive into the Maya scripts folder.
Default is: C:\Users\
Open Maya, and use this Python code to run the UI:
You can write it under Python tab of the script editor, select the whole text, middle-mouse drag it onto the shelf to add a button. 4.Click the shelf button to run the script.
- Open setup window
- Specify every required object
- Click connect
- Repeat for every IK-FK limb
Create Match Locators¶
A lot of rigs are made in a way, that IK and FK Controls don't share same initial rotations or translations. In this cases it's common practice to use pre-aligned locators to compensate the offset. And Bro IKFK Switcher can help you with this.
If your rig already has those locators (like AdvancedSkeleton, for example), you can find them and add them manually into IK Align Object and FK Align Object fields.
If not, you can create them with Bro IKFK Switcher.
To do this, you need to:
- Specify FK 3 Control and IK Control objects.
- Click Create Match Locators
That's it. The tool will create those locators in a separate group, align them, parentConstraint them to controls and add them to UI.
Adjusting match locators¶
You might need to adjust your match locators rotations to match your rig control rotations. You can do that simply by adjusting parameters in match locators' constraint nodes.
To do it, find the
broIKFKSwitcher_Grp node in outline. Expand it. Inside you will see match locators.
Expand them, and you will see
*_parentConstraint1 nodes. Select it, switch to Attribute Editor (Ctrl+A). On the "Parent Constraint Target Offests" tab you now can control offsets. Translate should usually be all 0. Most rotations should be 0 most of the time. Sometimes you'll need to rotate them 180 or 90 in one axis or another.
Tweak these parameters to your liking, test them, and you should be good to go.
This should not be an issue if you setup everyting in the rig file, but I'm aware that it would be idea to be able to save\load these settings as well, and I'm working on it.
Save \ Load¶
You can Save and Load data from IK FK Switcher Settings window into and from a file. To do this you can use respective buttons in the UI. This might be useful if you need to try different objects or if you need to setup multiple rigs.
If you made a mistake in your settings, you can change them.
To do so you can simply run the script again. It will override and replace all the connections made during initial setup.
However, if you made a mistake in Switch Control option, there's currently no options in UI to clear connections. It will be added in future versions. You will have to clear all connections manually for now. To do so, you need to:
- Select Switch Control object
- In Attribute Editor go to Attributes - Delete Attributes
- Delete all attributes starting with bro*
It has 2 modes. Automatic and manual.
In manual mode it will switch IK-FK as you press one of the buttons. It should work intuitive.
Automatic mode requires that both IK and FK controls are visible for you, and not hidden. It will detect when you select one of the controls and automatically switch to it.
For example, if rig is in FK mode right now, and you select IK control, it will snap IK controls to FK, and make a switch to IK mode.
Enable euler filter checkbox to automatically apply euler filter to unroll rotations after switching.
Baking allows you to transfer animation from IK to FK and vice versa. It can either be baked on every frame or transferred only on existing keyframes.
Baking every frame results in an exact matching on every frame of animation, while transferring only on existing keys will make it much easier to continue working with the animation.
Baking works similar to switching, but only with manual buttons "To IK" and "To FK". To turn on baking mode - you need to tick the "Bake" checkbox. It will not change FKIK Blend control's value.
Only existing keys¶
Enabling this checkbox will change from "Bake" mode to "Transfer" mode. Instead of matching on every frame it will only match on existing keyframes.
So for example if you are transferring animation from IK to FK, it will move through all IK keyframes on the timeline and match FK position to IK on those frames.
Script is compatible with Maya 2015 and above, Windows, Linux, MacOS.
Compatibility with AdvancedSkeleton improved in version 1.0.3 with addition of IK Align Object.
Feel free to contact me if you experience any errors. I will do my best to fix them as soon as I can!