Hello
Any buddy here knows how to create toggles between commands in Maya ?
I have the edge loop,edge ring and "Off" selection constaints that i want to be in one hotkey using a toggle command,just like this for the Move Tool :
string $currentTool = `currentCtx`;
setToolTo $gMove;
if ($currentTool == "moveSuperContext")
setToolTo $gRotate;
else if ($currentTool == "RotateSuperContext")
setToolTo $gScale;
Here are the different selection constraints in Maya,from the Modeling Toolkit :
dR_selConstraintEdgeLoop;
dR_selConstraintEdgeRing;
dR_selConstraintOff;
I have already tried some simple copy/paste things but I'm just starting to learn Mel scripting so don't really know how some of these things work (especially the SuperContext that i don't understand and couldn't find any documentation of it)
In the long run creating my own toggle between X commands is what i want to do,but for now solving this issue will certainly help me understand how to do so.
Thanks,Fansub
Replies
We could store a global int and use that to switch tools. The first time you run it, it will always start at 0 tho instead of toggling based on current mode.
Tried the script and it works just like i wanted it to