Reset channels to zero in Maya with a hotkey and WH Set Zero script

This is one of the scripts I use the most.  It lets you zero out channels with a hotkey. It was written by one of my former work buddies Will Hoag, and you can get it at https://www.highend3d.com/maya/script/wh-set-zero-for-maya.   You will need to register an account with High End 3d to download the script, but it’s free.

Once you’ve gotten and installed the script, open your Hotkey Editor and make a new custom script with the Runtime Command Editor.  Make it the mel command ‘whSetZero’ and assign it a hotkey.

Now select an item in your viewport and hit your key.  Translation and rotation channels for the selected object will be set to 0 and scale and visibility channels will be set to 1.  If you select channels in the channel box, only the selected channels will be affected, so it’s an easy way to zero out only rotations or translations while leaving the other attributes as they were.  One quirk of this script is that if you select only one channel and try to zero it out, all channels will be reset, but if you select two or more, the script will reset the selected attributes.

Where this script really shines is in the graph editor.  If you select a key on a curve and hit your hotkey, that key will be reset.  If you select multiple keys, it will zero all of those keys.  If you select a whole curve, it will zero all the keys on that curve.  This can let you make certain adjustment very very quickly.  This one is a little hard to show in pictures, so if this doesn’t make sense, or you don’t want to try it out yourself, I recommend watching the demo.

This script also works on multiple objects, so it’s handy if you need to set a rig back to its initial position.  You can just select all the controls, hit your hotkey, and you are set.

Thanks again, Will Hoag.  I couldn’t live without this one.

K for Time Dragger Tool and I for Insert Key Tool in Maya

Two hotkeys today that come standard with Maya straight out of the box.  Sort of.  More on that later.

K: The Time Dragger Tool

Normally to scrub you have to drag inside the timeline, but if you hold down K, the Time Dragger Tool is activated.  With K held you can left-mouse-drag left and right in any panel to scrub through your animation.

If you’re doing this in a viewport, you’ll be restricted by the range that you’ve set, but if you K+left-mouse-drag in the graph editor, you can scrub outside of the range, which can be very handy for checking animation without constantly resetting your time slider.

I: The Insert Key Tool (Maya 2016 and Earlier)

Sometimes adding keys with the S key can put some kinks in your curves as Maya tries to insert a key with your default tangent types.  If you want to add a key and preserve your curve exactly as it is, select the curve in the graph editor and hold down I to activate the Insert Key Tool.  With I held, middle-mouse-drag over your curve.  You will see a yellow marker appear, and when you release the middle-mouse-button a new key will be placed without changing the current animation.

Workaround for Insert Key Tool in Maya 2017:For

For some reason, in Maya 2017 there is a new default hotkey for I in the graph editor for the command “Graph Editor Display All Tangents.”  Even after I deleted this key, I couldn’t make I work the way it had in previous versions.  The only workaround I could find was to assign a new hotkey to this function.

To do this, open your Hotkey Editor and Edit Hotkeys For: Other Items. Open the tools category.

Scroll down to find Insert Key Tool Activate, and Insert Key Tool Deactivate.  Choose something other than I and assign it to these commands.  I chose M.

In the small dropdown, make sure that Insert Key Tool Activate is “on press” and Insert Key Tool Deactivate is “on release.”

Now the Insert Key Tool will work as it has in previous versions, only with the new hotkey.

Creating hotkeys to quickly edit tangent types in the Maya graph editor

Now that the basics have been covered, I’m going to start showing some things I do to speed up my personal workflow, starting with some hotkeys that are very useful when using the graph editor.

I really dislike going up to the to toolbar at the top of the graph editor every time I want to change a tangent type.  Fortunately, the buttons I use most can be assigned to hotkeys for very quick changes.

Open the hotkey editor, and from the drop down boxes next to “Edit Hotkeys For:” select “Editors” and “Graph Editor.”

If you scroll to the bottom you can find tangent types.  I set mine up so Alt+1 is Tangent Spline, Alt+2 is Tangent Linear, Alt+3 is Tangent Flat, and Alt+4 is Tangent Auto.  I rarely use other tangent types, so these four hotkeys work for me 99% of the time.

One other thing I do all the time is break and unify my tangents.  To do this with a hotkey, I use a script from Aaron Koressel.  Specifically, at the bottom of his Workflow Scripts page, you can find a script named ackToggleTangentType.

Download this script to your maya scripts folder, rehash so you don’t have to close and re-open.

Back in your hotkey editor, go to the Runtime Command Editor and make a new runtime command.  Give it a name, set the language to Mel, and give it the command “ackToggleTangentType()”

Save Runtime Command and assign it a hotkey under Edit Hotkeys For: Custom Scripts.  I use Alt+`, which is the ~ key just to the left of the 1 key.  Now this hotkey will toggle your tangents between broken and unified.  If you use weighted tangents like I do, this will also free your tangent weights.  I used to have a separate hotkey to free tangent weights, but a double-tap of this one will free and re-unify the tangents, so now I just use this.

Hopefully that’s helpful.  With a little practice, this will help you alter your keys with much more speed and much less distraction than going to the toolbar every time you want to make a change.