You all ready have hot keys for selecting and unselecting! When you paint its selects when you hold control down it unselected instead (applies to more then just paint selection command, it also applies to normal select where shift toggles, ctrl removes and ctrl/shift adds, if you put the default mode of paint selection to toggle then it works just like normal selection in all regards with ctrl and ctrl shift options).
If you want to hotkey a shelf item you must make it to runTimeCommand and then attach it to hotkey. Go to hotkey editor you may find it way easier.
QUOTE
It would be soooo much easier to just have something like paintselectiontool -select or -unselect.
But nooo, thay had to make things dificult for me lol.
well actually they did that too read the mel reference like your supposed to, to select:
artSelectCtx -e -selectop "select" artSelectContext
to unselect:
artSelectCtx -e -selectop "unselect" artSelectContext
so to do a toggle:
CODE
{// has slight buas to un select since toggle goes there too
$select="select";
if (artSelectCtx -q -selectop artSelectContext!="unselect" )
$select="unselect";
artSelectCtx -e -selectop $select artSelectContext;
}
PS: consider reading the manual will you? I mean no point in making your own life more difficult like you pointed out.
PPS: its possible to rig the mode to n so it swaps mode with slider just like brishes swap their presure.