Run MEL commands whenever Maya starts up

Maya runs any commands in the userSetup.mel file whenever it starts up. You can use this file to set up your working environment or execute commonly used MEL commands like aliasing.

The userSetup.mel/ userSetup.py script is executed during the initialization and setup phase of Maya so only commands which set up your working environment and have no dependencies on Maya functionality can be successfully run in this script.

To run a certain set of MEL commands every time Maya starts up

  1. Create a file named userSetup.mel or userSetup.py in the following folder:
    • Windows: ..\My Documents\maya\<Version>\scripts
    • Mac OS X: ~/Library/Preferences/Autodesk/maya/<version>/scripts.
    • Linux: ~/maya/<version>/scripts.
    • (where ~ is your home folder)

  2. In the userSetup.mel file, type the commands you want to Maya to run on start up.
Note: You can control whether Maya automatically reads/executes userSetup via the Security Preferences.