PDA

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


deadalvs
12-21-2007, 09:17 AM
hi...

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

like for example:
sphere;

?

if yes - why would that be ?

Gravedigger
12-21-2007, 03: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!

deadalvs
12-22-2007, 12: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:
http://forums.cgsociety.org/showthread.php?f=89&t=575124

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

global proc loadScripts(){

//code
//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 ?

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

getenv MAYA_SCRIPT_PATH;

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;

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

Gravedigger
12-23-2007, 06: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ä

mhovland
12-24-2007, 12: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.

deadalvs
12-24-2007, 01: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 ?

cmogk
12-24-2007, 04: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

deadalvs
12-24-2007, 09:50 PM
aah.... nice...

i will try that ! thanks !

deadalvs
12-29-2007, 12: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
http://www.3dconnexion.de/3dmouse/spacepilot.php
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 !

Mark-J
01-03-2008, 08: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-03-2008, 08: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.