I am trying to run the userSetup.py file placed in Documents\maya\2020\prefs\scripts , but there are functions and variables which are not declared when Maya is open…
I basically did it:
def functionA(): varA = False cmds.scriptJob(event = ["SceneOpened", functionA])
The weird thing is that sometimes it runs, and sometimes do not.
The userSetup.mel runs always, so I think I could put at the end of the mel code, a line to call the python code.
Any suggestion? thanks!