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,…
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…
UserSetup.py is the only one that shouldn't by default be in the same folder as the scripts. By default yuou should have userSetup.py here: C:\Users\User\Documents\maya\2015-x64\scripts It is possible to change that in maya. Also, Its possible to to have all scripts in the same folder as the usersetup file if you write…
Ok. I have no idea why your usersetup wont run.. do you have a usersetup.mel in the same folder or in the folder your supposedly changed to? In that case remove the mel file. Otherwise you can try creating a userSetup.mel and just print test in there, just to see if maya only fails to load python.
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?
Ok. Does this conclude your userSetup file or is that one read? if not you should seek into solving that because thats probably why nothing else works and I dont know why your maya wont read it. Maybe something you changed when you tried changing the maya script folders? Anyway, if you cant get that to work - why dont you…
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…