|03 March 2013||#1|
Join Date: Mar 2013
MEL Rendering script - global vatiables issue
Hi MEL experts!
Im working on a little script that is -when finished- supposed to provide a quick shelf button way of saving the current image from the renderviw to the disk.
But regardless of the main purpose and for convenience purposes I want to check if the script has been executed for the first time or if it has been executed before.
And that part is causing me a problem:
For some reason the script always says that it has already been executed before even when it hasn't been.
The code below is only the functionality that checks if it has been executed before:
|03 March 2013||#2|
Join Date: Dec 2006
I'm having a hard time decoding your script, so I'll just offer an alternative:
Don't use global vars. Use optionVars.
The first time the script is run, the code above will notice that no such optionVar exists, and create it. Every following time the script is run after that, the optionVar will already exist and you can do whatever it is you want to do in that case.
Just make sure to choose a proper (that is, most probable unique) name for your optionvar.
aweControlPicker (GUI Picker for Maya)
|Thread Closed share thread|