/* jooCCRequestedCycleComponentSelectionMode.mel 0.1
Authors: Janne 'Joojaa' Ojala
Testing: if it works after a suitably long time without
much problems let me know
Licence: Creative Commons, Attribution, Share Alike
Request by: j zwick
About:
quick implementation of user request for toggling between point,
edge, face selection modes
Install Instructions:
place this text in a file named:
jooCCRequestedCycleComponentSelectionMode.mel
that resides in your personal maya script directory.
Usage:
run jooCCRequestedCycleComponentSelectionMode crom a command line,
or put it in shelf button. Alternatively register it as a hotkey
for example as follows:
nameCommand -ann "toggle between point,edge, face selection modes"
-c "jooCCRequestedCycleComponentSelectionMode();"
CycleComponentSelectionMode;
hotkey -keyShortcut "z" -altModifier -name "CycleComponentSelectionMode";
This would bind the command to keyboard combination alt+z which is
unbound by default, feel free choose something more appropriate for you.
*****************************************************************/
proc jooCCRequestedCycleComponentSelectionMode(){
selectMode -component;
if (selectType("-q", "-smp"))
{
selectType -allComponents false;
selectType -sme 1 -pe 1 -se 1 -spc 1 -iso 1;
}
else if (selectType("-q", "-sme"))
{
selectType -allComponents false;
selectType -smf 1 -pf 1 -sf 1 ;
}
else
{
selectType -allComponents false;
selectType -cv 1 -pv 1 -smp 1 -lp 1 -pr 1;
}
}