Axis Switcher

Install

To install axis switch place the axis_switcher.py should be added to Maya's scripts path. Once added you will be all to setup your hotkeys inside maya

Windows:
\USER\Documents\maya\scripts
Mac OS
~USER/Library/Preferences/Autodesk/Maya/scripts
Linux
~USER/maya/scripts

Setup Hotkey

After moving our axis_switch.py file to our Maya scripts path we will launch Maya. Once Launched we will open Maya's hotkey editor. Navigate to the top menu bar and click Window then down to Settings and Preferences and over to Hotkey Editor.

Maya - Open Hotkey Editor

Once the Maya's Hotkey Editor opens we will select Custom Scripts from the Edit Hotkeys For: drop down. Now we can add our custom hotkeys, press New and give our hotkey a name I suggest toggle_MANIPULATORNNAME_axis, this will give us a clear understanding what the hotkey does when we come back in the future. Select Python and add the code snippet for the manipulator.

Maya - Add Hotkey

Suggested Hotkeys

This is how I have my hotkeys setup:

TranslateAlt + W
RotateAlt + E
ScaleAlt + R

Code Snippets

Below you will find the code snippets for all manipulators; translate, rotate and scale. You will need to copy and past when making your hotkeys.

Translate

import axis_switcher
axis_switcher.switch_axis_mode(translate=True)

Rotate

import axis_switcher
axis_switcher.switch_axis_mode(rotate=True)

Scale

import axis_switcher
axis_switcher.switch_axis_mode(scale=True)

All trademarks, trade names, product names and logos appearing on the site are the property of their respective owners. Some copyrighted material may be used on the website under assumption of fair use and will be taken down upon notice.