View Full Version : userSetup.mel --> not full range of commands?

12 December 2007, 10:17 AM

can it be that some commands are not executed in the userSetup.mel file ?

like for example:


if yes - why would that be ?

12 December 2007, 04:06 PM
why do you want to create a sphere with the usersetup.mel? what are you trying to do. i'm not sure but i think this script isn't meant to do a lot of stuff like modeling, animation or whatever. its to setup your maya.

maybe i could help you more when you explain what you are trying to do, i'm sorry

Offtopic: Oho, einä us dr schwitz!

12 December 2007, 01:51 AM
heya there ! *saletti*

well, the reason i tried the sphere command is that it simply gives a fast feedback if something worked or not. i could also have used a print command.... which didn't work either...

well. in conjunction with my other script:

i wanted to add the lines to the userSetup.mel as a procedure like this:

global proc loadScripts(){

//load all scripts from dis ...

loadScripts(); // and execute it immediately

--> like this it would not source the scripts while it worked with only the sourcing code by itself, not packed in a proper script.... am i communicating this clearly ? hmm...

well. so i tried to put in the sphere-command that automatically should creating a sphere at startup just so see...

* * *

OT: wohär chunnsch dänn Du ? i was fürme bisness bischn Duu ?

12 December 2007, 04:45 AM
I wonder if the userSetup.mel file you're editing is not in your MAYA_SCRIPT_PATH? Try:


If it is in your path, check if you have more than one - or that the right one is being sourced. Try:

whatIs userSetup.mel;

12 December 2007, 03:38 PM
I use the print command in my userSetup.mel as well! And it works very properly!
yea check that env-crap

12 December 2007, 07:08 PM
must be the thing with the environement variables. print command worked properly with my system. so it sounds as if it isn't executed at all.

where is your script file located?

offtopic: bi vo bärn und mis buisness isch im momänt no gymer. nächär muesi no luägä

12 December 2007, 01:11 PM
I also remember reading something about the order in which Maya does things on startup.

It may be that your script is getting executed, and then the "new Scene" is called, thus nullifying the sphere command.

12 December 2007, 02:53 PM
well.. i'll check that env stuff when i get back to my nicey-computer-box that currently is placed in the office where i work.

it makes sense that there should only be one userSetup.mel file for each maya version, placed on the correct spot. i thought this should be the correct one.

* * *

it would also make sense what mhovland says... thanks for that input !

so i'll get back to You guys when i have the news !

* * *

other question...

could the prefs/presets/scripts folders be «sourced» from a network drive so only one copy has to be edited for multiple users working on the same set of prefs ?

* * *

OT: ui kuul... bern isch ganz en tolle kanton ! ich lieb dä dialäkt ...
hehe, sorry. ich bin e so en sprichwörtliche (anschinend hochnäsige *hehe*) zürcher...
sitt wänn schaffsch Du uf maya ? woher chunnt das bi Dir scho im gymi das programm z' bruche ?

12 December 2007, 05:40 PM
could the prefs/presets/scripts folders be «sourced» from a network drive so only one copy has to be edited for multiple users working on the same set of prefs ?

You can use env var's for this, too: MAYA_PRESET_PATH, MAYA_SHELF_PATH, MAYA_SCRIPT_PATH

12 December 2007, 10:50 PM
aah.... nice...

i will try that ! thanks !

12 December 2007, 01:28 PM
here i'm back ...

with news...

i'm currently sitting in the office and checking out the paths ( while eating pineapple with honey... hehe... )

the script path i use is one of the paths printed out by the getenv command.

i also am sure that it is the correct path since normally, a userSetup.mel file does not exist (i never created one), but there IS one that was created by installing my spacePilot
so there was the startup command of the driver software inside that userSetup.mel file.

what i have seen now is that mhovland was right. the scripteditor really shows first the driver starting feedback, then my "hello\n"; print command.
next then is the command "file -f -new;" that really creates a blank scene... then, last but not least, mental ray is started...

so it seems that only sourcing commands make sense ! it's also obvious why the sphere command didn't work "properly".

very good to know, thanks a lot, guys !

01 January 2008, 09:26 AM
You could always try using the evalDeferred command during the boot sequence..... something we do regularly to ensure Maya waits for an idle period before executing a command. During boot that means it waits till Maya's up before running.

CGTalk Moderation
01 January 2008, 09:26 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.