Environment Variables

Setting environment variables using Maya.env

There are two ways to set environment variables outside of Maya: using the standard operating system commands, or editing the Maya.env file. Using the Maya.env file is recommended so that you don't clutter the standard environment settings with Maya-specific variables. You can also set up Maya.env as a roaming profile to be shared by many machines; this can be useful, for example, when you are performing distributed rendering among several Windows machines. See your networking documentation for details on setting up roaming profiles.

(All platforms) To set environment variables in a Maya.env file

  1. Create a text file named Maya.env.
  1. Save it to one of the following directories:

Note

  • Make sure to capitalize Maya.env.
  • On Windows, Linux, and IRIX, you can change the location where Maya looks for Maya.env by setting the MAYA_APP_DIR environment variable using the operating system methods described below.

  1. Set each variable on a single line in the format:
NAME = value
  
MAYA_PLUG_IN_PATH = $MAYA_APP_DIR/scripts/test (IRIX, Linux and  Mac OS X)
MAYA_PLUG_IN_PATH = %MAYA_APP_DIR%\scripts\test (Windows)
  

Examples

USER_SCRIPT_PATH = /Volumes/Sapphire/render/scenes/lego pov library/Library;/Volumes/Sapphire/render/scenes/maya/scripts;
MAYA_SCRIPT_PATH = $USER_SCRIPT_PATH;$MAYA_SCRIPT_BASE/scripts/test;$MAYA_SCRIPT_BASE/scripts/unsupported;
SHARED_MAYA_DIR = HostName:/usr/localhome/public/maya/6.5
MAYA_SCRIPT_PATH = $SHARED_MAYA_DIR/scripts:$MAYA_APP_DIR/scripts/custom
MAYA_PLUG_IN_PATH = $SHARED_MAYA_DIR/plug-ins
TMPDIR = /disk2/tempspace
MAYA_SCRIPT_PATH = %MAYA_APP_DIR%\scripts\test
MAYA_PLUG_IN_PATH = %MAYA_LOCATION%\devkit\plug-ins;%MAYA_LOCATION%\devkit\test
TMPDIR = D:\tempspace

Note

Although we show platform-specific formatting for such things as path separators and variable markers above, Maya will understand the different formatting styles no matter which platform you are on.

We still recommend using the formatting conventions specific to your platform to avoid any possible errors (for example, copying and pasting paths between Maya.env and a shell).