View Full Version : mel commands in maya.env?

01 January 2011, 10:25 PM
I've googled, but couldn't find an answer to this one and so I just have to ask.
Is it possible to add mel commands to the maya.env?

I would need to check the OS version and wether it's XP or windows7 declare different scriptpaths in the maya.env.

You see in windows7 it isn't called "My Documents", but simply "Documents".

Instead of having to modify and maintaning 2 maya.env-files I'd like to add an if else statement, but it doesn't seem to work in the maya.env and since there are no environment variable directed to "My Documents" folder, it seems I'm stuck with having to copy and change the maya.env for each os version every now and then.


01 January 2011, 11:35 PM
you can't put MEL commands in the maya.env

just put BOTH paths into your maya.env. they won't ever both exist on the same PC right?


01 January 2011, 09:55 AM
Oh, I see. I was under the impression that only the last path specified had any say. Like the way it works with mel scripts. If you have two mel scripts with the same name, the latter one sourced, will be the one that is executed when you run the command, right?

So this would work just fine?


MAYA_SCRIPT_PATH = %CONFIG_DIR%\User_Setup;%CONFIG_DIR%\Dags_MEL_Scripts\modeling;

01 January 2011, 02:50 PM
Forgot to reply.
Just wanted to thank you, works nicely.

CGTalk Moderation
01 January 2011, 02:50 PM
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.