OK, so I’m working on a tool that utilizes a script job that runs when certain objects are selected.
The problem with this is when Undoing, you run into a cycle where you, during an undo, reselect the object and the script runs again. This prevents undos and so I am working out a way around this.
Now the particular piece of API that allows me to accomplish this is MGlobal.isUndoing. This will determine whether the selection is happening because of an Undo and will allow me to write around the error. Here is my problem
In python this would be a simple matter of importing Mglobal.
Import maya.MGlobal as MGlobal
int Obj = MGlobal.isUndoing()
I am however working in Mel because my script is embedded in a maya script node and I have no idea how to get a hold of the Class to use. Anyone have any info on how to work with Maya API outside of pymel or python API?