Hey Guys,
I am currently trying to get a few contextual hotkey scripts running after some inspiration from this forum (see perna 3ds max Hotkey topics).
The System behind Maya and Mel in general is really difficult for me to wrap my head around though.
Currently I have a hotkey script that will enable the normal point snap (v) but also enable incremental snap (j), whenever I have the rotate tool as my active tool (script then set to letter V) ((Also note that this script has a press and release version)
string $currCtx = `currentCtx`;
string $ctxType = `contextInfo -c $currCtx`;
if ($ctxType == "manipRotate")
{
manipRotateContext -e -snap (!`manipRotateContext -q -snap Rotate`) Rotate;
showManipCtx -e -toggleIncSnap showManip3D;
}
else
{
dR_pointSnapPress;
}
The problem, however, is that this conflicts with my editpivotmode (d), where the point snap won't work when I previously had the rotate tool active
My Solution: check for whether the manipRotateCtx has the epm (edit pivot mode) flag set to true and set conditional based on that.
However I just don't know how 'check' for this flag on my currently active manipulator.
Could anyone lead me in the right direction?
I would really appreciate it!
Edit:
Ok FINALLY I have found the correct name to address the current manip tool and it's just "move", "rotate" and so on
Solution: manipRotateContext -q -epm "Rotate" returns 0 for when not in edit pivot and 1 for when in edit Pivot
Replies
The last post in that thread seems to do the trick.