Oh sorry! All this is Python! Save the user setup stuff in your userSetup.py - if you dont have one create on. I dont write mel so im not sure what would happen if you run mel scripts through the menu but it might be alright seeing its only calling a file's main function. In the menu script you can decide to have whatever…
The userSetup file is read from the /Preferences/2015-x64/scripts folder, but not from my custom scripts folder set in my environment variable that is what I don't understand, I have another python script in my custom scripts folder that works flawlessly, but when I place the userSetup.py file in my custom scripts folder,…
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. :)
Hi, I moved the two script files into \ProgramFiles\Autodesk\Maya2015\Scripts, loaded Maya, there is no word 'test' printed in the script editor neither is there a script menu item in the menu bar ?
[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')…
print "test"import sysimport maya.utilsimport maya.cmds as cmdssys.path.append("<file path to scripts folder>") #Example path to where you store your scriptsdef menuImport(): import ScriptsMenumaya.utils.executeDeferred('menuImport()') The script is in my custom scripts folder, I have a few scripts in this folder they work…
The MAYA_APP_DIR is a system environment variable you can set that tells Maya that you want Maya look elsewhere for the Maya application directory. I have this custom environment variable set for for Maya. The only directory that Maya will read your script is the /Preferences/2015-x64/scripts of my custom path, if I move…