I currently use the environment variable MAYA_SCRIPT_PATH for adding additional paths for Maya to search for scripts. Since I am maintaining this in a multi-user shop, this gets to be a pain when users get new machines or if I want to add to or change these path locations. Also, it makes it very hard to support scripts across Maya versions since every path is visible to all versions and I would like to separate version-specific scripts into separate directories.
Anyway, I have long suspected that I could instead set up these environment variables from userSetup.mel. I began experimenting with this today and haven't had much luck.
I am currently trying the following line in my userSetup...
putenv "MAYA\_SCRIPT\_PATH" "c:shared\_scripts";
After loading up Maya, using getenv "MAYA_SCRIPT_PATH" returns the proper path, but trying to run a script in that location gets a "cannot find procedure."
Am I off-base with thinking this can be done from userSetup? Thoughts?
--JeffD