Gimbal Local Toggler:
When I am animating, I am frequently switching between gimbal and local rotate tool depending on which controller I manipulate. I did this simple Mel script that change the rotate mode if we already have the rotate tool active.
What it does:
This script does the exact same thing as the default E key, but it will toggle Local to Gimbal, or Gimbal to Local if we press the E key again as the manipulator is already on rotate tool.
Installation:
We need to assign two shortcuts to a single key via the hotkey editor. One on [KEY] and one on [KEY]-Release. I suggest assinging this script to E key, because it does the exact same than the original E key.
Maya 2015:
1. In maya, go to Window, Settings/Preference, HotkeyEditor
2. Go in the user category
3. Click New
4. Insert the name of your choice, and add this script :
string $currentTool = `currentCtx`; if ($currentTool == "RotateSuperContext") { if (`manipRotateContext -q -mode Rotate` != 2) { manipRotateContext -e -mode 2 Rotate; } else { manipRotateContext -e -mode 0 Rotate; }; dR_DoCmd("rotatePress"); } else dR_DoCmd("rotatePress");
5. Assign it to a key of your choice in the "Assign New Hotkey" section to the right with the direction set as "Press"
6. Click assign, click assign
7. Create a new hotkey for this script, on the same Key, but with direction set as "Release":
dR_DoCmd("rotateRelease");
Maya 2016:
1. In maya, go to Window, Settings/Preference, HotkeyEditor
2. Click on the Runtime Command Editor Tab, New, and add the name of your choice
3. In the command/string box, add this MEL script:
string $currentTool = `currentCtx`; if ($currentTool == "RotateSuperContext") { if (`manipRotateContext -q -mode Rotate` != 2) { manipRotateContext -e -mode 2 Rotate; } else { manipRotateContext -e -mode 0 Rotate; }; dR_DoCmd("rotatePress"); } else dR_DoCmd("rotatePress");
4. Click "Save Runtime Command"
5. Open the dropdown menue next to "Edit Hotkeys For:" to Custom Scripts
6. Your new script command is in the Custom script, click on the blank area to its right and assign the Key of your choice
7. Create another Runtime Command with this script:
dR_DoCmd("rotateRelease");
8. Assign this one the same hotkey than the other one, but click on the small arrow that appears when defining our hotkey, and select "On Release"
Feel free to share, let me know if you like it !