File path variables

MAYA_APP_DIR

This variable defines your personal Maya application directory. This directory contains your projects and other important items:

  • the prefs directory
  • the projects directory
  • mayaRenderLog.txt
  • mayaLog
  • mayaJournal
  • the scripts directory
  • Maya.env, if you choose to create it, can also reside in this directory

You can only set MAYA_APP_DIR from the operating system; you cannot use Maya.env. If you set this variable in the Mac OS X operating system, you must launch Maya from the Terminal window. Otherwise, Maya will not use the set value.

If you do not set the MAYA_APP_DIR variable, the default values are:

  • Windows Vista, Windows 7, and Windows 8

    \Users\<username>\Documents\Maya

  • Mac OS X

    ~<username>/Library/Preferences/Autodesk/Maya

  • Linux (64-bit)

    ~<username>/Maya

MAYA_CMD_FILE_OUTPUT

This variable enables the cmdFileOutput command during startup so the content in the script editor automatically outputs to a designated file. If no file name is specified, then errors are sent to the standard error output, for example the Terminal window. This feature is useful for tracking down error messages when Maya crashes upon startup.

Note:

The content in the Script Editor displays in both the Script Editor and the designated output location.

MAYA_CONTENT_PATH

This variable obtains the paths to the content directories with which you can populate the Examples tab in the Content Browser. Plug-ins can add to this path with their own content directories by adding to the environment variable in their module template files, or by using the assetBrowser -addContentPath flag.

MAYA_CUSTOM_TEMPLATE_PATH

When used with the Attribute Editor: this variable is used to override the directory where custom Attribute Editor templates are found. The default is the scripts\AETemplates folder of the Maya install directory.

When used with the Node Editor: you can customize the list of attributes displayed for each node by creating a custom attribute list template. The next time that you create the same node, Maya searches for an existing template, and if one is found, then your node is displayed with the custom attribute list that you created. You can share these templates with other users on the network by setting this environment variable to the network location at which the custom templates are found. See Customizing the list of node attributes for more information. This environment variable supports multiple paths that can be separated with ; on Windows and : on Mac OS X/Linux.

MAYA_CUSTOM_TEMPLATE_WRITE_PATH

For use with the Node Editor. You can customize the list of attributes displayed for each node by creating a custom attribute list template. By default, your templates are saved to $MAYA_APP_DIR/<app_ver>/[localized]/prefs/viewTemplates/, but you can override the default location by setting this environment variable to the location that you desire. See Customizing the list of node attributes for more information.

MAYA_FILE_ICON_PATH

This variable has become obsolete since Maya 3.0. See XBMLANGPATH as this variable should be used instead.

MAYA_MODULE_PATH

Defines the search paths for Maya module files. A module file describes the install location of a plugin which has been distributed as a module. Maya will append subdirectories of this install location to the following path variables: MAYA_PLUG_IN_PATH, MAYA_PRESET_PATH, MAYA_SCRIPT_PATH, PYTHONPATH and XBMLANGPATH. See the individual descriptions of these variables below and Distributing Maya Plug-ins in the Maya Developer Help for more information.

The following tables list the default paths, which will always follow any path that you specify.

Default for Windows

<user’s directory>/My Documents/Maya/<version>/modules

<user’s directory>/My Documents/Maya/modules

C:/Program Files/Common Files/Autodesk Shared/Modules/Maya/<version>

C:/Program Files/Common Files/Autodesk Shared/Modules/Maya

<maya_directory>/modules/
Default for Mac OS X, Linux

$MAYA_APP_DIR/Maya/<version>/modules

$MAYA_APP_DIR/Maya/modules

/usr/autodesk/modules/Maya/<version>

/usr/autodesk/modules/Maya

Note:

If you use spaces in a file path that you create, you may have problems accessing icon image files stored within that directory, because the file path does not appear in Maya. You can avoid this problem by only specifying file paths that do not include spaces.

MAYA_MOVIE_DIR

This variable is used to override the directory where movie files are found. The default is $MAYA_LOCATION/movies.

MAYA_LOCATION

The path for the Maya installation directory. If it is not set, it defaults to /usr/autodesk/MayaVersionNumber (Linux) or C:\Program Files\Autodesk \MayaVersionNumber (Windows).

On Mac OS X, Maya is installed as /Applications/Maya <version>/Maya.app. Since Mac OS X architecture makes it difficult to access the contents of the Maya application package, we strongly discourage the use of MAYA_LOCATION on Mac OS X. Instead, use the following alternate locations:

MAYA_PLUG_IN_PATH

Search path for plug-ins. When a plug-in is specified by relative path name, the directories in this path are searched for the given plug-in name. This path also determines which directories are listed in the Plug-in Manager. In addition, for each module file found by Maya on startup, the plug-ins subdirectory of the module's root directory will be added to MAYA_PLUG_IN_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules in the Maya Developer Help for more information.

Default for Windows

<user’s directory>/Documents/Maya/<version>/plug-ins

<user’s directory>/Documents/Maya/plug-ins

<maya_directory>/bin/plug-ins

Default for Mac OS X

In your Home folder, under Library/Preferences/Autodesk/Maya/<version>/plug-ins

In your Home folder, under Library/Preferences/Autodesk/Maya/plug-ins

/Users/Shared/Autodesk/Maya/<version>/plug-ins

/Users/Shared/Autodesk/Maya/plug-ins

Inside the Maya package in /Applications/Maya <version>/Maya.app

Default for Linux

$MAYA_APP_DIR/Maya/<version>/plug-ins

$MAYA_APP_DIR/Maya/plug-ins

/usr/autodesk/userconfig/Maya/<version>/plug-ins

/usr/autodesk/userconfig/Maya/plug-ins

$MAYA_LOCATION/bin/plug-ins

Note:

When you are adding multiple paths to the MAYA_PLUG_IN_PATH environment variable, the paths must be separated by : (colon) on Mac OS X and ; (semi-colon) on Windows and Linux.

MAYA_PRESET_PATH

Defines the location for Maya presets. Each entry in the path points to the directory above the attrPresets directory. In addition, for each module file found by Maya on startup, the 'presets' subdirectory of the module's root directory will be added to MAYA_PRESET_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules in the Maya Developer Help for more information.

MAYA_PROJECT

Specifies the location of your project folder on startup.

In the Preferences window, under File/Projects > Project Settings, the folder location is displayed as Always start in this project. After setting the variable, you cannot change the location of the project folder from the Preferences window. You must either change or remove the variable.

Note:

Beginning Maya 2013, for the Linux and Mac platforms, there are checks to ensure that the directory pointed to by lastLocalWS is accessible before Maya attempts to use it. The directory must have 555 (r-xr-xr-x) permissions. Otherwise, if the directory only has 444(r--r--r--) permissions, Maya cannot use it; even cd or ls do not work.

In addition to lastLocalWS, there are other workspaces that Maya tries to use on startup, and the same check is being applied to these workspaces also. The order in which Maya tries to use these workspaces are as follows:

  • the value obtained from the -proj command line argument
  • the value obtained from the MAYA_PROJECT environment variable
  • the InitialProject optionVar (i.e. the preference labeled Always start in this project)
  • the lastLocalWS optionVar (stored automatically by Maya at exit to remember the last active workspace
  • the default project
MAYA_PROJECTS_DIR

Specifies the location of your project folder.

In the Preferences window, under File/Projects > Project Settings, the folder location is displayed as Default projects directory. After setting the variable, you cannot change the location of the project folder from the Preferences window. You must either change or remove the variable.

MAYA_SHELF_PATH

Specifies the directories that Maya searches to access the shelves. You can store shelves in a location accessible by different groups who then set the MAYA_SHELF_PATH variable for their workstation.

You can specify more than one directory using MAYA_SHELF_PATH, separated by colons; for example, Production/shelf:Shot/shelf:MyDir/shelf specifies three different shelf directories. At startup, Maya searches each directory in the order specified to instantiate shelves. After searching the directories specified in MAYA_SHELF_PATH, Maya continues to add shelves from the default shelf directory. Once a shelf exists, a shelf with the same name in the subsequent searched directories is ignored.

When a new shelf is created, it is always saved in the default shelf directory. To share it, move it to the desired directory (that is, one of the ones specified by MAYA_SHELF_PATH).

To restrict access to a shelf directory, disable the write permission of that directory. A warning appears when a user attempts to write into a restricted shelf directory (while exiting or saving all shelves).

MAYA_SCRIPT_PATH

Colon-separated search path for MEL scripts. If an unresolved MEL procedure is called, then this path will be searched for a script that implements it. Also, if a MEL file is sourced without giving the full path, then this path will be searched.

In addition, for each module file found by Maya on startup, the scripts subdirectory of the module's root directory is added to MAYA_SCRIPT_PATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules in the Maya Developer Help for more information.

Attention: If you choose to define both a custom script path and a custom shelf path (that is, you set both MAYA_SHELF_PATH and MAYA_SCRIPT_PATH), the MAYA_SHELF_PATH must be listed first (before MAYA_SCRIPT_PATH) in Maya.env.
MAYA_TOOLCLIPS_PATH

Specifies the directories that Maya searches for ToolClip content.

You can specify more than one directory using MAYA_TOOLCLIPS_PATH, separated by colons; for example, <drive:>\<path>;<drive2:>\<path2> specifies two different ToolClip directories. At startup, Maya searches each directory in the order specified. After searching the directories specified in MAYA_TOOLCLIPS_PATH, Maya continues to search the default user.toolclips directory and then the builtin.toolclips directory.

If a key name exists in two ToolClip.xml files within the ToolClip search path, Maya uses the key name that is encountered first.

PYTHONPATH

Location for your Python module files when you import them in a program. Set this variable to the list of directory names for your module directories. Separate this list by colons for UNIX and semicolons for Windows.

In addition, for each module file found by Maya on startup, the the scripts subdirectory of the module's root directory will be added to PYTHONPATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules in the Maya Developer Help for more information.

Use of this variable is not mandatory. Because Python always searches the home directory of the program’s top level file, you only need to set this environment variable if one of your modules needs to import another module that resides in a different directory.

Default for Windows

<user’s directory>/My Documents/Maya/projects/default/mel

<user’s directory>/My Documents/Maya/<version>/scripts

<user’s directory>/My Documents/Maya/scripts

<user’s directory>/My Documents/Maya/<version>/presets

<user’s directory>/My Documents/Maya/<version>/prefs/shelves

<user’s directory>/My Documents/Maya/<version>/prefs/markingMenus

<maya_directory>/scripts/startup

<maya_directory>/scripts/others

<maya_directory>/scripts/AETemplates

<maya_directory>/scripts/paintEffects

<maya_directory>/scripts/fluidEffects

<maya_directory>/scripts/hair

<maya_directory>/scripts/cloth

<maya_directory>/scripts/fur

Default for Linux

$MAYA_APP_DIR/Maya/<version>/scripts

$MAYA_APP_DIR/Maya/scripts

/usr/autodesk/userconfig/Maya/<version>/scripts

/usr/autodesk/userconfig/Maya/scripts

$MAYA_APP_DIR/Maya/<version>/prefs/shelves

$MAYA_LOCATION/scripts/startup

$MAYA_LOCATION/scripts/others

$MAYA_LOCATION/scripts/AETemplates

$MAYA_LOCATION/scripts/paintEffects

$MAYA_LOCATION/scripts/cloth

$MAYA_LOCATION/scripts/fur

Default for Mac OS X

In your Home folder, under Library/Preferences/Autodesk/Maya/<version>

In your Home folder, under Library/Preferences/Autodesk/Maya

/Users/Shared/Autodesk/Maya/<version>

/Users/Shared/Autodesk/Maya

Inside the Maya package in /Applications/Autodesk/Maya <version>/Maya.app

TEMP or TMPDIR

This variable specifies the directory location Maya uses for various temporary files, such as:

  • temporary render cache files during a render
  • crash files if Maya crashes

On Mac OS X and Linux, set TMPDIR only. On Windows, set both TEMP and TMPDIR.

If not set, the temporary directory is:

  • /tmp (Linux)
  • C:/temp (Windows), or under your Home folder in Documents/temp
  • /var/folders/xx/xxx/T, where xx and xxx can be any combination of characters. (Mac OS X)

    Alternatively, you can run the env command in your terminal window to return a list of all environment variables set and their corresponding values.

XBMLANGPATH

This variable specifies the location of icon files, such as icons used for Shelf buttons. On Linux, the syntax is slightly different then other paths. For example:

XBMLANGPATH = "./icons/%B:$HOME/dev/icons/%B"

In this example, %B is acts as a placeholder that will be replaced by Maya with the bitmap filename.

In addition, for each module file found by Maya on startup, the icons subdirectory of the module's root directory ('icons/%B on Linux) will be added to XBMLANGPATH. See the description of the MAYA_MODULE_PATH variable above and Distributing Multi-File Modules in the Maya Developer Help for more information.

The following table lists the default paths, which will always follow any path that you specify.

Default for Windows

%MAYA_APP_DIR%\Maya\<version>\prefs\icons

%MAYA_LOCATION%\icons

%MAYA_LOCATION%\icons \paintEffects

%MAYA_LOCATION%\icons \cloth

%MAYA_LOCATION%\icons \fur

Default for Mac OS X

In your Home folder, in Library/Preferences/Autodesk/Maya/<version>/prefs/icons

In your Home folder, in Library/Preferences/Autodesk/maya/prefs/icons

/Users/Shared/Autodesk/Maya/<version>/icons

/Users/Shared/Autodesk/Maya/icons

Inside the Maya package in /Applications/Autodesk/Maya <version>/Maya.app

Default for Linux

$MAYA_APP_DIR/maya/<version>/prefs/icons/%B

$MAYA_APP_DIR/maya/prefs/icons/%B

/usr/autodesk/userconfig/maya/<version>/icons/%B

/usr/autodesk/userconfig/maya/icons/%B

$MAYA_LOCATION/icons/%B

$MAYA_LOCATION/icons/paintEffects/%B

$MAYA_LOCATION/icons/cloth/%B

$MAYA_LOCATION/icons/fur/%B

MAYA_MR_STARTUP_DIR

This variable can be used to specify the location of the maya.rayrc file.