Sunday, 5 June 2016

Python in Maya: Simple node sorting

When applying a worldspace or relative transform to nodes in Maya, you'll often have to account for;
  1. Control behaviour type (IK, Pole Vectors etc)
  2. Control hierarchy
This is where you will probably need to look at sorting your list of nodes prior to applying the data.
Also, space-switch sorting will want to be run as an additional pass over control type and hierarchy. This dependency check will vary based on the type of space-switch setup the rigs are using.

I've added a simple sort setup with individual and combined priorities.
Edit: Enable web view if browsing on mobile.

I'd love to hear your thoughts and how you approach this task.