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.

Leave a Reply

Your email address will not be published. Required fields are marked *