A few things I found while looking over the GoZ mel scripts:
- There are non-global variables declared outside of procs.
Variables created in a mel script outside of a proc are for all intents “global” for the Maya session. Maya does not allow redeclaration of these variable names.
So a variable $win can only be a string outside of a proc. If a user was to write a few line script in the script editor and use the variable $win as an int, then the user will receive an error that will be difficult to track down where the variable was declared otherwise.
I suggest enclosing all variables within a proc, excluding those explicitly declared global.
- There are generically named procs.
Generically named global procs such as “sleep” can overwrite or be overwritten by another generically named proc.
I suggest pre/post-pending “GoZ” to all procs.