0

I am trying to run a python script when Maya(2018) is launched on my Mac. I tried creating a file called 'userSetup.py' and placing it in my '/Users/Shared/Autodesk/maya/2018/scripts' directory.

right now the 'userSetup.py' script just has one line:

print 'its working'

so far, I am not able to get the print message to show up in the script editor when I launch Maya(2018).

google, Autodesk website

2
  • it should be in pref/scripts i think Commented Feb 1, 2019 at 6:17
  • ../maya/2018/prefs/scripts Commented Feb 1, 2019 at 6:18

2 Answers 2

1

Maya usually searches for userSetup.py in the paths defined in PYTHONPATH environment variable. By default $HOME/maya/2018/prefs/scripts directory is added to PYTHONPATHwhen Maya starts. Unless until you are not defining your own PYTHONPATH variable, you can put your userSetup.py in this directory to work with Maya.

Also most of the time you can find the print or log statements(basically stdout) from the userSetup.py files in the terminal(from where Maya is launched) instead of the Maya Script editor.

Sign up to request clarification or add additional context in comments.

Comments

0

Try this:

from Maya import cmds print ('its working') 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.