I have a question regarding scripts. Recently i have started to create a custom marking menu. to get hold of more good scripts i have downloaded alot of big scripts with a lot of small ones inside. I have attached the launch command for thoose scripts/functions to buttons on my marking menu. What i noticed recently is really annoying, some scripts doesnt work if i dont load up the scripts first. Is it possible to make maya load all the big scripts in the background when i launch maya? would be nice to not have to activate 20 scripts everytime i launch maya..
I am using Maya 2015, and theese are the scripts i am using the most at the moment:
You can create a userSetup.mel in your default scripts directory and run all sorts of stuff from it, including loading other scripts using the "source" command.
You can create a userSetup.mel in your default scripts directory and run all sorts of stuff from it, including loading other scripts using the "source" command.
Thanks for the answer, Have i understood this correctly:
1. Create a file called userSetup.mel in my Maya script folder.
2. If the ordinary command for launching the script is "cloud;" Then i simply write in: source cloud; in the mel file?
source wants a filename that will then be executed/loaded, so depending on where the cloud-function is defined, you need to source that file.
This is all in the case of MEL scripts btw, for Python you have to do it differently - either use the python() function in the userSetup.mel or make a userSetup.py as passerby mentioned.
Replies
http://download.autodesk.com/global/docs/maya2013/en_us/index.html?url=files/PC_Run_MEL_commands_whenever_Maya_starts_up.htm,topicNumber=d30e57434
Thanks for the answer, Have i understood this correctly:
1. Create a file called userSetup.mel in my Maya script folder.
2. If the ordinary command for launching the script is "cloud;" Then i simply write in: source cloud; in the mel file?
if the script is called cloud and has a function named cloud than simply running.
cloud(); would be enough.
if you want a script to run on maya startup, just put the same command in the userSetup.mel as you would normally use to run the script.
This is all in the case of MEL scripts btw, for Python you have to do it differently - either use the python() function in the userSetup.mel or make a userSetup.py as passerby mentioned.
http://nccastaff.bournemouth.ac.uk/jmacey/RobTheBloke/www/mel/PROC_source.html
I am sorry can i ask you for some help throught skype? I just cant get it to work.
:poly127: