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 ?
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…
[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…