Go to: Synopsis. Flags. Return value. Python examples.

Synopsis

internalVar([userAppDir=boolean], [userBitmapsDir=boolean], [userMarkingMenuDir=boolean], [userPrefDir=boolean], [userPresetsDir=boolean], [userScriptDir=boolean], [userShelfDir=boolean], [userTmpDir=boolean], [userWorkspaceDir=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

internalVar is undoable, queryable, and editable.

This command returns the values of internal variables. No modification of these variables is supported.

Flags

userAppDir, userBitmapsDir, userMarkingMenuDir, userPrefDir, userPresetsDir, userScriptDir, userShelfDir, userTmpDir, userWorkspaceDir
Long name (short name) [argument types] Properties
userAppDir(uad) boolean create
Return the user application directory.
userScriptDir(usd) boolean create
Return the user script directory.
userPrefDir(upd) boolean create
Return the user preference directory.
userPresetsDir(ups) boolean create
Return the user presets directory.
userShelfDir(ush) boolean create
Return the user shelves directory.
userMarkingMenuDir(umm) boolean create
Return the user marking menu directory.
userBitmapsDir(ubd) boolean create
Return the user bitmaps prefs directory.
userTmpDir(utd) boolean create
Return a temp directory. Will check for TMPDIR environment variable, otherwise will return the current directory.
userWorkspaceDir(uwd) boolean create
Return the user workspace directory (also known as the projects directory).

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Return value


The value of the variable specified by the flag use.

Python examples

import maya.cmds as cmds

myScriptDir = cmds.internalVar(userScriptDir=True)