PDA

View Full Version : source scripts on Mac OS X


Irakli
08-17-2012, 10:41 AM
Hey guys,
I'm trying to source scripts from folder but without success. I've set environment variable in Maya.env file, when I check that directory with
import os
paths = os.environ

Maya "see" that directory, but when I source the script with source command I get error that Maya can't find that file. In Windows I've done the same end it works perfectly

NaughtyNathan
08-17-2012, 04:32 PM
maya can only source scripts from folders that are in the MAYA_SCRIPT_PATH environment, the regular PATH environment variable should be irrelevent.

Irakli
08-17-2012, 05:23 PM
maya can only source scripts from folders that are in the MAYA_SCRIPT_PATH environment, the regular PATH environment variable should be irrelevent.

I've already done so. My Maya.env file contains the MAYA_SCRIPT_PATH = /User/etc.... : /User/etc.. , totally 3 paths separated with colon : . I noticed that Maya can't see paths after colon.

NaughtyNathan
08-17-2012, 06:37 PM
is it a colon on Mac OS? it's semicolon ; on windows...

Irakli
08-17-2012, 08:40 PM
is it a colon on Mac OS? it's semicolon ; on windows...
Yes, it's colon on Mac OS. This is from Maya's docs:
To separate several paths, use a semicolon ; on Windows and a colon : on Linux and Mac OS X.
http://download.autodesk.com/global/docs/maya2013/en_us/index.html
I have the same files on my windows machine and those files works perfectly. I just copied files from PC to Mac and changed paths.

Irakli
08-19-2012, 03:07 PM
I solved the sourcing problem, it was an cyrilic letter - K in the name of folder of scripts, that probably I typed accidentally.
Still have the Maya.env file problem. It stops working when I add more than one value in the MAYA_SCRIPT_PATH variable. I separate those lines with colon, like mentioned in the Maya's docs, but without success. Any idea?
On windows OS I have not this kind of problems. I have many lines separated with semicolon.

Irakli
08-21-2012, 02:43 PM
Nobody is using Maya.env file on Mac OS X 10.8?

tfritzsche
10-18-2012, 03:32 PM
I too am having issues with the Maya.env file on OS X 10.7.5. I am able to set the paths for scripts, plugins, etc.., but Maya does not source the files in scripts path. ??
I can source them manually, but this sort of defeats the purpose.
Is the Maya.env file the only place to set environment paths?

My aim is to consolidate all the scripts that I use into one folder hierachy for all versions of maya, for ease of maintenance, back-up, updating plugins, moving new new versions of maya, and sharing setups.

Any suggestions would be welcome.

to Irakli (http://forums.cgsociety.org/member.php?u=377385):
I don't know if you have solved your issues, but I found a script on teacup's techy Art stuff Blog (http://david.buttress.me.uk/blog/) That will check your env values, and perform set/put commands. Its a handy little script that speeds up the process of debugging env values.

djb_envbrowser.mel (http://david.buttress.me.uk/blog/wp-content/uploads/2009/05/djb_envbrowser.zip)

Irakli
10-19-2012, 10:45 AM
Thanks Thomas for that script. It is very useful. Actually, I recently solved this problem. I retyped the path in Maya.env file and now it works perfectly. I don't know if it was a typo issue(sometimes I use cyrillic font) , or the guys in Autodesk have solved it in theirs last SP.

CGTalk Moderation
10-19-2012, 10:45 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.