Maya.env configuration of variables


A lot of people asked me, how Maya.env working, where is located, which variables can i use, how can i access to variables, or can i create my own variable? You can do it all very easy, it’s only about good configuration and logic of your Maya.env file. With Maya.env file, you can for example set all your Maya workstations and Render Slaves to one shared directory where you have stored all plugins, scripts, modules, MentalRay shaders, icons, etc… And in conjunction with userSetup.mel you can do unbelievable shared Maya config for all your network computers.


There is two locations where you can have Maya.env stored.

(Windows)
C:\Documents and Settings\[username]\My Documents\maya\[version]
C:\Documents and Settings\[username]\My Documents\maya

(Mac OS X)
/Users/[username]/Library/Preferences/Autodesk/maya/version
/Users/[username]/Library/Preferences/Autodesk/maya

(Linux)
~/maya/version
~/maya


Here is a list of variables you can use in Maya.env file

LM_LICENSE_FILE = C:\flexlm\aw.dat
- Location of license file.

MAYA_ALT_EN = [pathtolicensefile]\Flexlm\maya.lic
- If you have multiple license files in your FlexLM directory you can set this environment variable to uniquely define your Maya license file and speed up the Maya start time.

MAYA_LICENSE_METHOD = standalone
- Use network or standalone.

MAYA_LICENSE = unlimited
- Use unlimited or complete.

FLEXLM_DIAGNOSTICS = 3
- Use 1, 2 or 3 for verbose mode.

MAYA_NO_PARALLEL_MEMCPY = 1
- Set this environment variable to 1 to disable parallel memory copy. In some cases, parallel memory copy is faster on Opteron and Nehalem based systems. However, it may also be slower on Xeon systems, in which case you may want to disable parallel memory.
- New in Maya 2011

MAYA_IP_TYPE
- Use this environment variable to set your IP version, for example, ipv4.

MAYA_FORCE_REF_READ
- By default, if you reference the same file twice, on file open Maya copies the existing nodes instead of re-reading them from disk. Occasionally, using this built-in multiple reference optimization feature of file referencing can cause errors. This environment variable turns off the file referencing optimization and forces reference files to be explicitly read in all cases. This fixes Maya’s behavior in some situations that would otherwise be evaluated incorrectly.

MAYA_AUDIO_LIBRARY
- By default, this variable is set to 1 for the audio library used in previous versions of Maya. Set to 2 if you want to use the OpenAL audio library, which supports multiple track audio.
- New in Maya 2011

MAYA_AUDIO_OPENAL_DEVICE
- This variable provides a string which lets you specify the OpenAL device driver to use. The system default driver is used by default. (Linux) On Linux this can be set to one of the following: alsa, oos, solaris, dsound, winmm, port, pulse, wave
- New in Maya 2011

MAYA_APP_DIR
- This variable defines your personal Maya application directory.
~username/maya (Linux)
drive:\Documents and Settings\username\My Documents\maya (Windows)

MAYA_LOCATION
- The path for the Maya installation directory

MAYA_FILE_ICON_PATH
- This variable specifies the location of icon files, such as icons used for Shelf buttons.
- This variable has become obsolete since Maya 3.0.

XBMLANGPATH
- This variable specifies the location of icon files, such as icons used for Shelf buttons.

MAYA_SCRIPT_PATH = \\server\maya_config\scripts
- Location of scripts.

MAYA_PLUG_IN_PATH = \\server\maya_config\plug-ins
- Location of plugins.

XBMLANGPATH = \\server\maya_config\icons
- Location of icons (bmp/xpm).

MAYA_MODULE_PATH = \\server\maya_config\modules
- Locations of modules text files, like bonusTools.txt.

MAYA_PRESET_PATH = \\server\maya_config\presets
- Location of presets.

MAYA_PROJECTS_DIR = P:\
(be sure that your path is finished with \ on Windows systems)
- Location of projects directory.

MAYA_PROJECT = P:\default
- Maya will allways start in this project.

MAYA_MR_STARTUP_DIR = \\server\maya_config\mentalray
- Location of the maya.rayrc startup file.
- New in Maya 2008.

MI_CUSTOM_SHADER_PATH = \\server\maya_config\mentalray\include
- Locations of mentalray include *.mi files.

MI_LIBRARY_PATH = \\server\maya_setup\maya_config\lib
- Location of MentalRay library *.dll and *.so files.

MAYA_SHADER_LIBRARY_PATH = \\server\maya_config\ShaderLibrary
- Path for ShaderLibrary

TEMP = D:\maya_temp
- Temporary directory for Maya (playblasts, render, etc.). TMPDIR (Unix/Win)

MAYA_HELP_URL = file://///server/maya_config/help/en_US
- Location of Maya Documentation.

MAYA_MR_STARTUP_DIR
- This variable can be used to specify the location of the maya.rayrc file.
- Maya 2009

MAYA_CMD_FILE_OUTPUT
- This feature is useful for tracking down error messages when Maya crashes upon startup.

MAYA_MRFM_SHOW_CUSTOM_SHADERS = 1
- For Maya 6.0 and lower to access MentalRay custom shaders tab.


MAYA_OVERRIDE_UI = yourMelScriptThatMakesJustHWbufferWindow.mel

WINEDITOR =

WEBBROWSER =
- For web browser.

MAYA_UI_LANGUAGE = en_US
- This is most useful when you want to run Maya in English on a Japanese Windows os.
- en_US/ja_JP


MAYA_PAINT_EFFECTS_THREADS = 3
- Threads to use when working with PaintEffects, max is 3.

MAYA_DISABLE_BACKSPACE_DELETE = 1
- Disable backspace key as delete key.

MAYA_DEBUG_ENABLE_CRASH_REPORTING = 1
- Enable writing of crash report logs and dump files to temp directory.
- Crash report file example: MayaCrashLog[yymmdd.hhmm].log


MAYA_SLOW_DRAWPIXELS = 1
- For NVidia cards so they don’t produce failures when using PaintEffects and ImagePlanes

MAYA_NO_VERTEX_ARRAY_SELECT = 1
- Use this, when your selection of objects in the viewport is slow. (Selection lag)

MAYA_HOTBOX_USE_SOFTWARE = 1
Maya will no longer check for RGB overlay and use its internal software composition mode. Maya 2011 Hotfix 3 adds support for using the system RGB hardware overlay (previous versions of Maya used Colour Index CI overlays).

MAYA_NON_POWER_TWO_OFF = 1
- Use, when you have problem with ImagePlanes in viewports.

MAYA_GEFORCE_SKIP_OVERLAY=1
Reduce flickering/stale view, if you are usinge Nvidia GeForce graphics cards/drivers.


MI_MAYA_SOCKETS = 1
- Set this flag to 1 so that you can preview your render in progress in imf_disp while rendering from the command line. You may need to adjust your firewall.
- New in Maya 2008.
- In Linux you dont need this variable (working without it)

MAYA_DISABLE_MRFORMATS = 0
- By default, Maya converts non-native image file formats into temporary IFF files so that they can be read. This variable allows you to disable the conversion of mental ray .ct and .st files.
To disable it, set the value to 0 (zero) or leave it undefined.

MAYA_DISABLE_MRMAP = 0
- By default, Maya converts non-native image file formats into temporary IFF files so that they can be read. This variable allows you to disable the conversion of mental ray .map files. Disabling this conversion saves scene export time and render time.
To disable it, set the value to 0 (zero) or leave it undefined.

MAYA_HW_FILE_TEXTURE_RESOLUTION_OVERRIDE = 1
- If you are using a file texture that uses MirrorUV and the resolution of the hardware rendered texture in the scene view appears degraded, use this environment variable.

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

MAYA_OFFSCREEN_HRB = 1
- Set this flag to 1 to expose the Render Offscreen option in the Hardware Render Buffer > Render menu. When enabled, an offscreen buffer is used when rendering sequences using the Hardware Render Buffer. Single-frame renders will continue to be rendered into an on-screen buffer. During offscreen rendering, moving windows over the Hardware Render Buffer window does not affect the rendered frames, as would normally be the case.
- New in Maya 2008.

AW_JPEG_Q_FACTOR = 100
- Quality of JPEG files that Maya renders out. (1-100) %

AW_JPEG_SUB_SAMPLING = 1×1,1×1,1×1
- Allows you to control the subsampling quality of the rendered image.
- For best quality of JPG set it to “1×1,1×1,1×1″, default is 2×2,1×1,1×1.

MAYA_NO_JITTER_FINAL_COLOR = 1
- Some randomness, or jitter, to the 8-bit color images are now disabled.

MAYA_RENDERER_RT_BACKGROUND_COLOR = 1
- Maya includes the camera background in the calculation of reflection and refraction rays.

MAYA_MAC_SET_UMASK = 0
- This environment variable lets you set file sharing permissions. This example sets the permissions of any file created by Maya to be readable/writable by any user.

MAYA_MAC_MENUS_ARE_OPAQUE = 1
- This enviroment variable lets you change the opacity of pane menus. If you set variable to 1, then the pane menus appear opaque. If you set the variable at 0 (zero) or leave it undefined, then the pane menus appear with Mac OS X default transparency. This varible does not affect the opacity of the main menus.

MAYA_MAC_WINDOW_OPACITY = 80
- This enviroment variable lets you set the opacity of editor windows. Set this variable to an integer number between 0 and 100, where 100 is full opacity.

MAYA_MAC_BUTTON_MAP = 1
- Set to 1 to use one-button mouse with Maya, 2 for two-button mouse, leave undefined or set to 3 for a three-button mouse.

MAYA_MAC_NUMBER_OF_CPUS = 3
- This environment will limit the CPUs used by Maya to 3 but it will allow Maya to render on all CPUs.

MAYA_FUR_OLD_BEHAVIOR

MAYA_FUR_LIGHT_CLAMPING

MAYA_NO_TBB = 1
- Resolve random crashes. Threading problem in the Maya 2010 Batch executable on 64bit. Fixed in Maya 2011.

MAYA_SOUND_SCRUB
- Disables the ability to scrub sound.

MAYA_MMSET_DEFAULT_XCURSOR
- Creates a left pointer cursor to use when resetting the cursor on use of the Marking Menus. Useful when using GNOME window managers that otherwise revert back to the default “X” cursor.

MAYA_DISABLE_CIP = 1
- Maya.exe cannot start because splash.dll is missing. If you have Maya 2010 and 3dsMax 2010 on the same computer. You will need to set the this environment variable for Maya.


And at last, in Maya.env file you can use variables from system:
%PATH%, %ProgramFiles%, %USERNAME%, %SystemRoot%, %XBMLANGPATH%, etc.
In env file you can use comments too. // MAYA_DISABLE_BACKSPACE_DELETE = 1
Creating of your own variables is allowed too, MY_PATH = C:\test and you can access to your own variable in Maya with getenv “MY_PATH”.

MAYA_VP2_DEVICE_OVERRIDE = VirtualDeviceDx11
Viewport 2 use DirectX


Here is example of Maya.env file…

MY_PATH = \\server\maya_config
MAYA_SHELF_PATH = $MY_PATH\shelves
MAYA_SCRIPT_PATH = $MY_PATH\scripts
XBMLANGPATH = $MY_PATH\icons
MAYA_PLUG_IN_PATH = $MY_PATH\plug-ins
MAYA_PRESET_PATH = $MY_PATH\presets
MAYA_MODULE_PATH = $MY_PATH\modules
// MAYA_HELP_URL = \\server\maya_config\help\en_US
// MAYA_WEBBROWSER =

// MAYA_RENDERER_RT_BACKGROUND_COLOR = 1
MAYA_NO_JITTER_FINAL_COLOR = 1
AW_JPEG_Q_FACTOR = 100
MAYA_PAINT_EFFECTS_THREADS = 2
MAYA_DISABLE_BACKSPACE_DELETE = 1
MAYA_NO_VERTEX_ARRAY_SELECT = 1
MAYA_SLOW_DRAWPIXELS = 1
MAYA_NON_POWER_TWO_OFF = 1

MAYA_DEBUG_ENABLE_CRASH_REPORTING = 1

MI_MAYA_SOCKETS = 1

PYTHONPATH = %PYTHONPATH%;$MY_PATH\pyth_scripts

PATH = %PATH%;C:\mybin


When you have your Maya.env file configured, you can access to all system’s and your self defined variables in Maya.env with getenv mel-command.

getenv “MY_PATH”;
// Result: //server/maya_config //

getenv “USERNAME”;
// Result: toxik //

getenv “ProgramFiles”;
// Result: C:/Program Files //

getenv “PROCESSOR_IDENTIFIER”;
// Result: EM64T Family 6 Model 15 Stepping 6, GenuineIntel //

getenv “SystemRoot”;
// Result: C:/WINDOWS //

getenv “PATH”;
// Result: C:/Program Files/Autodesk/Maya2008/bin;C:/WINDOWS/system32;C:/WINDOWS;C:/mybin //


— Maya’s old environment variables:

MAYA_USE_V1_CAMERA (Maya 1.0/1.5/2.0)
MAYA_USE_VERSION1_DISPLACEMENT (Maya 1.0/1.5/2.0)
MAYA_USE_VERSION1_POLY_TANGENT (Maya 1.0/1.5/2.0)


Posted by toxik on Jan 19 2009 under Maya, Mel-Scripts, News |


5 Responses to “Maya.env configuration of variables”

  1. Vojtisek Says:

    Zdar,
    diky za toto info. Neni to vec, kterou bych ja osobne potreboval menit kazdy den, ale rekneme, ze obcas se vyskytne nutnost (zadana prace do nejakeho engine atd). Ostatne cely tvuj maya blog je prinosna vec, musim prolezt.

  2. MaxtorAG Says:

    Naozaj prakticka vecicka…kde si vytiahol cely tneto zoznam?

  3. rasto Says:

    Casom sa to nazbieralo… :-)

  4. rakesh Says:

    thanks a lot.very helpful

  5. Ganesh Says:

    Thanks. Its well documented and very helpful in customizing maya as per needed.

Leave a Comment

Spam protection by WP Captcha-Free