BakeConstraint - Free MEL Script for Autodesk Maya
BakeConstraint
Bake Constraint is a MEL (Maya Embedded Language) script for Autodesk Maya designed to simplify the process of preserving an object's world-space animation. It creates an external locator for each selected object, bakes the object's animation (translation and rotation) onto the locator, and then constrains the object back to it. This is great when you need to perform hierarchy changes without breaking existing animation or modify parent objects without affecting the child objects.
Features
- Preserve World-Space Animation: Bakes an object's animations into an external locator, capturing its exact movement in the world-space.
- Hierarchy Freedom: Allows you to safely change an object's parent after the baking process, as it's motion is now driven by an external locator.
- Batch Processing: Works on multiple selected objects simultaneously, creating a unique locator and constraint for each one.
- Non-Destructive Workflow: The original animation curves on your object are not deleted, only baked into external locator that constraints the object. You can easily revert the process by deleting the generated locator and its constraint.
- Automated Time Range: Automatically uses the scene's current playback range and framerate for the baking process.
-
Clean and Organized: Creates clearly named locators (e.g.
pCube1_BakedConstraint
) for easy identification in the Outliner.
Installation
-
Install the script:
- Copy the scripts into your Maya scripts directory. For example:
-
Windows:
C:\Users\<YourUsername>\Documents\maya\<version>\scripts\
-
macOS/Linux:
~/maya/<version>/scripts/
-
Windows:
- Copy the scripts into your Maya scripts directory. For example:
-
Add to shelf (Optional):
- Drag and drop the
AddToShelf.mel
script inside of Maya to add a convenient shelf button that calls the BakeConstraint functionality. This button allows you to launch the tool directly from Maya’s interface.
- Drag and drop the
Usage
Run the Script
- In your Maya scene, select all of the animated objects you wish to process,
- If you have used
AddToShelf.mel
, simply click the corresponding shelf button, - The script is a self-contained procedure and does not have a GUI. It will automatically bake the animation (translation and rotation) within the specified range in the timeline and the chosen framerate in the settings.
License
This project and it's contents are distributed under the MIT License open source license.
Support
If you are having any troubles with importing, configuring or running this project contents, please contact me directly via the official website:
Lifelike Motion Support - https://www.lifelikemotion.com.pl/support
You can also find me on my social media:
YouTube - https://www.youtube.com/@lifelike-motion
LinkedIn - https://www.linkedin.com/company/lifelike-motion
Bluesky - https://bsky.app/profile/lifelikemotion.bsky.social
Instagram - https://www.instagram.com/lifelike_motion
Facebook - https://www.facebook.com/lifelikemotionmocap