pymel.core.language

Functions and classes related to scripting, including MelGlobals and Mel

Functions

callbacks This command allows you to add callbacks at key times during UI creation so that the Maya UI can be extended.
conditionExists Returns True if the named condition exists, False otherwise.
evalEcho Derived from mel command maya.cmds.evalEcho
evalNoSelectNotify Derived from mel command maya.cmds.evalNoSelectNotify
getLastError Derived from mel command maya.cmds.getLastError
getMelGlobal
getMelType return the name of the closest MEL type equivalent for the given python
getProcArguments Derived from mel command maya.cmds.getProcArguments
isValidMelType Returns whether typeStr is a valid MEL type identifier
melOptions Set and query options that affect the behavior of Maya’s Embedded Language (MEL).
python Derived from mel command maya.cmds.python
pythonToMel convert a python object to a string representing an equivalent value in mel
pythonToMelCmd Given a mel command name, and a set of python args / kwargs, return a mel string used to call the given command.
resourceManager List resources matching certain properties.
scriptJob This command creates a script job, which is a MEL command or script.
setMelGlobal
sortCaseInsensitive This command sorts all the strings of an array in a case insensitive way.
stackTrace

Flags:

waitCursor This command sets/resets a wait cursor for the entire Maya application.

Classes

Catch Reproduces the behavior of the mel command of the same name.
Env A Singleton class to represent Maya current optionVars and settings
Mel Acts as a namespace from which MEL procedures can be called as if they were python functions.
MelCallable Class for wrapping up callables created by Mel class’ procedure calls.
MelGlobals A dictionary-like class for getting and setting global variables between mel and python.
OptionVarDict A dictionary-like class for accessing and modifying optionVars.
OptionVarList

Exceptions

MelArgumentError The arguments passed to the MEL script are incorrect
MelConversionError MEL cannot process a conversion or cast between data types
MelError Generic MEL error
MelSyntaxError The MEL script has a syntactical error
MelUnknownProcedureError The called MEL procedure does not exist or has not been sourced