I found that awesome useful in the maya userPrefs.mel: I have the handle automatically set to 1. Means Y axis. Because I mostly rotate by the y axis! And hardly ever by the viewspace.
the command is:
CODE
manipRotateContext -e -activeHandle 0 Rotate; // for X
manipRotateContext -e -activeHandle 1 Rotate; // for Y
manipRotateContext -e -activeHandle 2 Rotate; // for Z
manipRotateContext -e -activeHandle 3 Rotate; // for viewspace (the outer ring)
If you want a certain handle activated by default either:
*look into the maya prefs file: in your private files folder: ...\maya\VERSIONNUMBER\prefs\userPrefs.mel
and look for:
CODE
-sv "Rotate" "manipRotateContext -e -image1 \"vacantCell.xpm\" -image2 \"vacantCell.xpm\" -image3 \"vacantCell.xpm\" -mode 1 -activeHandle 3 -snap 1 -snapRelative 1 -snapValue 15 -useObjectPivot 0 Rotate";
and set your preferences there.
or:
* just type:
CODE
optionVar -sv "Rotate" "manipRotateContext -e -image1 \"vacantCell.xpm\" -image2 \"vacantCell.xpm\" -image3 \"vacantCell.xpm\" -mode 1 -activeHandle 1 -snap 1 -snapRelative 1 -snapValue 15 -useObjectPivot 0 Rotate";
with your preferences set. The optionVar should be saved on shutdown and loaded with these settings on the next startup.
seems setting the optionVar has no effect on the running maya. But manipRotateContext -e -activeHandle 1 Rotate; has!
So more for your question:
You could setup a sciptJob on SelectionChange firing a command that analizes the current selection: If it matches joints with a certain name: change -activeHandle or reset it to a default.