
For example, the callback MEL script for a float slider control could contain #1. Positional arguments refer to the arguments that UI elements pass to their callback scripts. Python: skinCluster (q=True, inf='joint1', dr=True) Query where a flag/argument does not take a value Query where a flag/argument takes a value MEL: move -objectSpace 2.0 1.0 1.0 nurbsSphere1 The same as MEL except arguments must come first (You can also use a tuple or tuples, a list of lists, or a tuple of lists.) Use a list to hold the multiple flag values MEL: ls -type nurbsSurface -type transform Use a tuple to specify multiple arguments All old flags have been left in place.įlags with no arguments get a boolean True/False switch In all cases, the flags are backwards compatible. The use of all of these flags is documented in the CommandsPython reference documentation. roundConstantRadius : a new side flag replaces the use of sidea and sideb that are supposed to be intermixed.pol圜reateFacet : the existing point flag as been modified so that it may be also used to specify holes.polySplit : new insertpoint flag which can be used in place of the facepoint and edgepoint flags.polyAppend : new append flag which can be used in place of the point, edge, and hole flags.polyAppendVertex : new append flag which can be used in place of the point, vertex, and hole flags.The few commands which relied on this have been extended so that a single multi-use flag handles the job of the individual multi-use flags. Since each multi-use flag’s arguments are provided in a separate list in Python, there is no way to intermix them. This causes a problem for commands in which different multi-use flags must be mixed-and-matched. For more information, see "Maya Python API 2.0" and "Maya Python API 2.Certain flag changes to Maya commands are necessary because the arguments for multi-use flags in Python must be passed as a list to the flag. It is also a newer API, and is still under development, so not all classes exposed in 1.0 are available. This wrapper has better performance and is more "Pythonic" than the Python API 1.0. This is a Python wrapper for the Maya C++ API, and referred to as Python API 2.0. For more information, see "Maya Python API 1.0" in the To understand the exposed classes, you should refer to the conceptual topics and the "C++ API Reference" in the It is suitable for developing plug-ins, and other tasks that require functionality not exposed by MEL. This is a Python wrapper for the Maya C++ API, and referred to as Python API 1.0. It organizes commands differently, and takes an object-oriented approach compared to the procedural approach of It is shipped with Maya, but not supported by Autodesk. re Pymel is an alternative wrapper for MEL, developed by a third party. This is a Python wrapper for MEL commands, and can be used in place of MEL. The following is a brief overview of the Python libraries shipped with Maya: maya.cmds Python scripting can be used for many tasks in Maya, from running simple commands to developing plug-ins, and several different Maya-related libraries are available targeting different tasks.
