I've been rigging a bit lately, so I thought I would share a few of the little mel scripts that I have written to use as marking-menus. They are only a few lines each but they save me several clicks and a couple of seconds everytime I use them.
djSelectJointsBelow.mel & djSelectNonJointsBelow.mel
Handy when I have a skeleton heirarchy that contains a mix of joint and non-joint nodes (I try to keep my heirarchy as clean as I can, but there are the inevitable constraints, controllers and space nodes that mess it up a bit). If I select a node and run djSelectJointsBelow.mel my selection is modified to include all the joints below that node. And obviously, djSelectNonJointsBelow.mel selects everything except the joints. I use these when rigging and then again when animating to save me picking my way through the outliner, or worrying about creating additional selection sets.
I use this to turn on and off the display of the local axis for joints when I am doing the joint orientation phase of my rigging. The script requires two integer arguments to control it's behavior. The first argument: o=OFF, 1=ON and the 2nd argument 0=single, 1=heirarchy. So, for example, "djDisplayLocalAxis 1 0" turns on the local axis display for the selected node. And "djDisplayLocalAxis 0 1" would turn off the local axis display for the selected node and everything below it in the heirarchy.
updated: 7 April 2008 - fixed error when shapeNodes were found in the heirarchy.
For most of my joint orientation I use Michael Comet's "cometJointOrient.mel" to align the local axes along the bones, but for some joints like the wrist I need to manually rotate the local axis to my liking. The trouble is that after a manual rotation the joints "Rotate Axis" values will be non-zero, where as if you used Comet's script they get zero'd out (frozen into the joint orientation) as part of the process. For some things it doesnt really matter, but lately I have been playing with the cMuscle add-on and I noticed that capsules made from bones with non-zero rotate-axis values dont align correctly with the bone. So, djZeroJointRotations.mel simply does the zeroing out step for the selected joint(s) (non-joint selections are ignored).