Share
 
 

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
The default location of MAYA_APP_DIR is
Platform MAYA_APP_DIR default location
Windows \Users\<username>\Documents\Maya
macOS $HOME/Library/Preferences/Autodesk/Maya
Linux $HOME/Maya

You can change the location of MAYA_APP_DIR. You can set it in your global environment variables, or you can set it from a terminal or command window. You cannot set MAYA_APP_DIR in Maya.env. If you set MAYA_APP_DIR on the command line or in the terminal window, you will have to launch Maya from the same window.

MAYA_ENV_DIR
Set this variable to read the Maya.env file from a custom location instead of from MAYA_APP_DIR/<MayaVersion> (default location). See Read Maya.env from a custom location.
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 contentBrowser -addContentPath flag.

MAYA_WINDOWS_CRASH_LOG_DIR
Note: This variable is Windows-only.

This variable lets you specify where Maya writes files used for debugging crashes, instead of storing them in the system temporary directory by default.

You must supply a valid path to use this environment variable. If the path is invalid or nonexistent, an error message appears indicating the environment variable name, the invalid value, and a temporary location to save the files. This message appears in the crash dialog and the Maya Output window.

The files saved to this path are:
  • MayaCrashLog<date_and_time>.dmp
  • MayaCrashLog<date_and_time>.log
  • <current_file_name>[Recovered-<username>.<date_and_time>].ma

If you do not set this environment variable, Maya saves the file to your Temp directory, naming it <current_file_name>[Recovered-<username>.<date_and_time>].ma. For example, if your username is rsmith, and the recovery file was saved on September 28, 2022 at 10:47am, the name of the recovery file will be untitle[Recovered-rsmith.2022-09-28-10.47].ma.

See Locate recovery data for more information.

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_MODULE_PATH

Defines the search paths for Maya module files. A module file is a way to distribute Maya plug-ins. See Distributing Maya Plug-ins in the Maya Developer Help for more information.

Any paths you add to MAYA_MODULE_PATH in Maya.env will be added to the front of the list of search paths. This means that Maya will search for modules in the paths you specified before searching for them in the default modules paths.

Platform Default module search paths
Windows

C:/Program Files/Autodesk/Maya<version>/modules

C:/Users/<username>/Documents/maya/<version>/modules

C:/Users/<username>/Documents/maya/modules

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

macOS

/Applications/Autodesk/maya<version>/Maya.app/Contents/module

$HOME/Library/Preferences/Autodesk/maya/<version>/modules

$HOME/Library/Preferences/Autodesk/maya/modules

/Users/Shared/Autodesk/modules/maya/<version>

/Users/Shared/Autodesk/modules/maya

Linux

/usr/autodesk/maya<version>/modules

$HOME/maya/<version>/modules

$HOME/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 macOS, Maya is installed as /Applications/Maya <version>/Maya.app. Since macOS architecture makes it difficult to access the contents of the Maya application package, we strongly discourage the use of MAYA_LOCATION on macOS. Instead, use the following alternate locations:

  • /Users/Shared/Autodesk/Maya/<version>
  • /Users/Shared/Autodesk/Maya
  • under your Home folder, in Library/Preferences/Autodesk/Maya/<version>
  • under your Home folder, in Library/Preferences/Autodesk/Maya.
MAYA_PACKAGE_PATH
This variable lets you include a directory in a non-standard location in the default search path for Maya module files from the Autodesk App store, for example, Maya bonusTools.
Maya uses a different set of paths for each platform searched.
  • Windows/Linux: …./Autodesk/ApplicationPlugins
  • macOS: …./Autodesk/ApplicationsAddins

Setting this variable positions the specified path first in the search order. Works together with the Autoloader plug-in.

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 macOS

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.

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.

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

Defines the location of Python library files.

Add any external libraries that you want to use in your Python scripts to this environment variable before you start Maya.

Maya sets a PYTHONPATH when it starts. The paths you specify for PYTHONPATH will be added to the front of the list of paths set by Maya, meaning that these paths will be searched before Maya's own directories.

You can set PYTHONPATH either in Maya.env or at the system level. If PYTHONPATH is set at the system level, setting it in Maya.env will have no effect.

See Using external Python libraries with Maya Python for more information.

XBMLANGPATH

This variable specifies the location of icon files, including icons used for Shelf buttons.

When you set XBMLANGPATH, the paths you specify are added to the front of the list already set by Maya, meaning that these paths will be searched before Maya's own directories.

Was this information helpful?