Joakim - This is excellent :) I have two questions. I put the userSetup code into my userSetup.mel file, correctly me if I'm wrong, shouldn't this load the script menu automatically when Maya starts, or must I always run this command first ? def MyScript(): #Code MyScript() When I run the command listed above, the script…
The main script userSetup.py should call the menu script scriptMenu.py, correct ? If so I have a file called userSetup.py & a file called scriptMenu.py. The following code; def MyScript(): #Code MyScript() What is the purpose of this code ?
[code] [/code] Im not sure what you are looking for but you could put it in a menu or just have it as tabs in the script editor. Would any of that work? Here's how you make a menu for scripts:import maya.cmds as cmdsimport uuid, osdef ScriptsMenu(): if cmds.menu('scriptsMenu', ex=1): cmds.deleteUI('scriptsMenu')…
Ok so, 1. userSetup.py loads the scriptfolder AND runs your scriptMenu.py main function. - to test if this is actually working print TEST in your userSetup file. When starting Maya you open the script editor and if TEST is printed in the output field that means the userSetup file was loaded by Maya. While doing this you…
I prefer to have all scripts in my custom scripts path, that is the only hiccup with your script, which is Maya won't load the script from a custom scripts folder. :)
I think Maya expects it to be in the /2015-x64/scripts folder and I thought it was possible to change that inside maya but ive never done it. Anyway, what stops you from have the usersetup in that place and the actual scripts in your custom path?
Sure I can see that but the userSetup file is not a "custom" script in that way. I mean, you will never really touch it again since all scripts will be called from the menu anyway. Still odd that it can't be changed, though. Maybe try making a new thread asking how to change location of the userSetup file.
If you want to you can post your usersetup and menu script here and ill debug it. Will probably go faster than this ^^. In that case, only use one of your scripts inside the menu and send that one too.
Hi, I have changed the default path where script are to go in Maya, as you mentioned. And so the userSetup.py file is in the new path, when I start Maya there is no script menu in the Maya menu ?