Joint Rotation Axis Hide/Show Script

While rigging last night, I wrote this little script that forces the Local Rotation Axis display On/Off. This is different from Display–>Transform Display–>Local Rotation Axis because that works as a toggle, while this accesses the actual attribute  (“obj.displayLocalAxis”) and sets it to True or False.

Here’s the code. It’s a really simple tool that fixes a big annoyance for me in Maya.

import maya.cmds as cmds

# bm_axisDisplay
# Forces the Local Rotation Axis display on or off for all joints or for the selected joints

def setAxisDisplay(display=False):
    # if no joints are selected, do it for all the joints in the scene
    if len(, type="joint")) == 0:
        jointList ="joint")
        jointList =, type="joint")
    # set the displayLocalAxis attribute to what the user specifies.
    for jnt in jointList:
        cmds.setAttr(jnt + ".displayLocalAxis", display)

import bm_axisDisplay

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s