I wrote a little Mel script to handle toggling Camera based selection in marquee mode on or off. Anyone know what I need to add or do so that the script can just be called by using something like cbsToggle in the command line? Also is there any way to keep the code tag from removing certain portions of code?
Here's a hint to make things that toggle into really simple code: toggleCmd -flag (1-`toggleCmd -q -flag`); So in your case: selectPref -useDepth (1-`selectPref -q -useDepth`); To make it callable from the command line, you need to make it a global procedure and load it. Making it a procedure is simple: global proc…
Yep, this is what I do all the time - it's how they do it with all the internal Maya scripts anyway... you just have your "master" proc as a global proc in there with the same name as the file, then all the "helper" procs not declared globally but in the same file - that way you can have a nice self-contained script in a…