Script: Delete Flat Keys
When you’re working with animation you eventually end up with a lot of extra keys, by that I mean flat keys, keys we don’t need.
See the image below, I’ve marked the flat keys with red dots:
With the script you just select all of the objects that you want to clean the keyframes on, then you define the angle threshold, and the script will go through and delete all of the keys with a lower angle threshold than defined.
When run on the example above, we end up with this:
Script: Hide/Display Local Axis
It can be a hassle to turn on/off the local axis of multiple objects simultaneously, the reason for this is that by default there’s no on and off option on “Display > Local Rotation Axis“, it’s just a toggle. This means that if you select a bunch of objects and toggle the local axis, the objects that already have the local axis visible will be hidden, while the rest of the selection’s local handles will be visible. This can be frustrating at times, especially if you have joints/objects that have the same position and orientation.
This is a really simple script, it basicly just adds the flag that defines on/off to the command that toggle’s the local axis. I’ve also added an option for it to go through the entire hierarchy, definitely a timesaver.
Script: Find Duplicate Names
When dealing with rigs you often end up having a ton of nodes, and it’s easy to end up having several objects with the same name. You may think that Maya automaticly renames those objects for you, and it does, but only if the objects are in the same hierarchy. However, if you have the objects in separate hierarchies they can share the same name.
This isn’t really a problem in it self because Maya will just use longnames to distinguish them apart, but you may run into problems if you’re using scripts that doesn’t take longnames into consideration.
In the image above we have two objects named “pCube”. So what Maya does to distinguish them apart is to look at their parent, if the parent’s name is unique it will use that in the longname when dealing the objects. So if I were to select the pCube in root2, Maya would read it as “grp2|pcube”, and if both of the mid-groups was named “grp2” then maya would read the pCube as “root2|grp2|pCube”.
I’ve made a script that finds (and renames) all of the objects in the scene sharing the same name, the download link is at the bottom 🙂