Hi all! I want to make a script in Maya for switching Select surface objects command. Now i have two separate scripts for this: setObjectPianckMask "Surface" true; and setObjectPickMask "Surface" false; How to combine them into one so that modes can be switched at the press of a button?
Not the most elegant solution but here is a script in Python that does what you want (not familiar with MEL). Just turn this into a shelf button or the like. It works by checking a stored value done with "optionVar" and if the var is True then runs the mel.eval to turn the object off and vice versa. It's wrapped in a try…