Share
 
 

Setting environment variables using system commands

The variables set in the operating system take priority over any settings in the Maya.env file. However, when Maya verifies the environment settings, it may add default settings.

  • On Linux and macOS, you can use export on the command line to set environment variables. You can add commands to your .bashrc file to make sure the environment variables are always available.

export MAYA_SCRIPT_PATH=/remote/scriptDisk/scriptFiles/
  • On Windows, you can use set to set environment variables.
set MAYA_SCRIPT_PATH=/remote/scriptDisk/scriptFiles/
  • Alternatively, on Windows, you can select System in the Control Panel, then click Advanced System Settings, and click Environment Variables.
  • On macOS, you can set environment variables in a shell as described above. However, those variables will only be available if you run Maya from the shell. If you run Maya from the Dock, it will not use any of the environment variables from your shell. An alternative is to place your environment variable settings in a Maya.env file instead.

Was this information helpful?