rjReorderAttr package

Module contents

Reorder attributes in Maya.

https://github.com/robertjoosten/rjReorderAttr/raw/master/README.png

Link to Video

Installation

Copy the rjReorderAttr folder to your Maya scripts directory

C:/Users/<USER>/Documents/maya/scripts

Usage

Add functionality to the Channel Box -> Edit menu in Maya

import maya.cmds as cmds
cmds.evalDeferred("import rjReorderAttr; rjReorderAttr.install()")

Display UI

import rjReorderAttr.ui 
rjReorderAttr.ui.show()

Note

If the install command is used a button called Reorder Attributes will be added to the Channel Box -> Edit menu. If this is not the case the ui can be opened with the show command. Drag and drop the attributes to reorder. Attributes are deleted in the new order and the undo commands is then ran to redo the attributes in the order prefered.

A thank you too Nick Hughes for showing me the power of the undo command and how it can be used to sort attributes.

Code

rjReorderAttr.install()

Add two additional buttons to the Channel Box -> Edit menu, a divider and a button to open up the attribute reordering ui. The edit menu is retrieved from the channel box form and a mel command is ran to populate this menu in case it hasn’t been opened before. If rjReorderAttr is already installed the original buttons will be removed and new ones created.