| <<
back to andrewsilke.com
MEL SCRIPTS FOR MAYA
This script makes the annoying
display menu into a hotkey, to easily toggle the visibility of polygons,
nurbs, camera, lights, curves display etc. Be careful when mapping this to modifier combinations such as shift ctrl or alt keys, you have to make a small change in the script or it won't work, open the .mel file in a text editor and read the instructions. Map uiShowMMenu; to
hotkey (press). I couldn't screen-grab the Marking menu so here's a picture of the menu it replaces...
This script speeds up the modification of animation holds where two keys are needed to hold static poses. I thought of this script when I was repeating the same task over and over while blocking my animation. Thanks to David Peers for writing this one! Here's what my basic blocking curves look like. The flat curves are when a character holds still, otherwise called a held pose or bookend keys.
The problem I had was that 2 keys must set for just one pose. This hotkey is solves that problem. It's smart, just change one key frame (see MODIFIED POSE below) then run the hotkey. It will automatically detect the current or last keyframe from current time and create a held pose. eg.
It also works on selected curves...
The script will only affect the last or current keyframe from your position in the time line if you don't have any curves selected.
But you don't have to change any keys at all!! Simply change the position/rotation of your objects and hit the hotkey. The new held pose will be created automatically. (Autokey must be turned off) Map dpMakeHold; to a shelf button or hotkey after installing the script.
This script when mapped to a hotkey snaps the selected "first key frame" to current time. It retains the spacing of keys (see the animated gif below). eg. Play your animation and hit stop when you want an action or keyframe to take place - select the key/s then snap! Map dpMoveSelectedKeys; to a shelf button or hotkey after installing the script.
This script is the same as the above however it will try to snap all keys to current time without retaining spacing. Great for ordering curves. This script is actually just one line of code. Create a user hotkey or shelf button with: int $currentTime = `currentTime -q`;
Do you ever find your keys
on decimal frame numbers eg. frame 5.678. This script aligns the keys
to the closest integer value ie. frame 6. Thanks Howie! Map to a shelf
button or hotkey
Ok this is a very handy script, it's more useful than it sounds. It scales keys from the center of each curve. For example you have a character shaking his head, but your euler curves are spread out. This script will scale from the center of each curve which is calculated from the center of selected keys on each curve. There's a handy interface that pops up, click on the buttons to scale incrementally. This baby comes in handy more than you'd expect. Map keyScalerButtons; to a shelf button or hotkey after installing the script.
Or hit the invert button...
All .mel scripts should be
copied into a directory in your scripts path Most of these scripts can be mapped to hotkeys or shelf icons. Shelf Icons Hotkeys
Finally assign the hotkey to the key of your choice.
Highend 3d http://www.highend3d.com My good friend Hamish McKenzie also has some great animation .mel scripts http://mel.macaronikazoo.com/
|