Python API 2.0 Reference
|
Public Member Functions | |
def | __init__ () |
def | __len__ () |
Available in Maya 2012 Gold: | |
def | addArg () |
def | asBool () |
def | asFloat () |
def | asInt () |
def | asIntArray () |
def | asString () |
def | asStringArray () |
def | flagIndex () |
def | lastArgUsed () |
Available in Maya 2012 HotFix 1: | |
def | asAngle () |
def | asDistance () |
def | asDouble () |
def | asDoubleArray () |
def | asMatrix () |
def | asPoint () |
def | asTime () |
def | asVector () |
Static Public Member Functions | |
def | __new__ () |
Static Public Attributes | |
int | kInvalidArgIndex = -1 |
Argument list for passing to commands.
Signature | Parameters | Description |
---|---|---|
MArgList() | Default constructor. Returns a new, empty MArgList object. | |
MArgList(src) | src - MArgList | Copy constructor. Returns a new MArgList object with the same args as src. |
Supports the length() function, which returns the number of arguments in the list.
def OpenMaya.MArgList.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
def OpenMaya.MArgList.__len__ | ( | ) |
Return len(self).
|
static |
Create and return a new object. See help(type) for accurate signature.
OpenMaya.MArgList.addArg | ( | ) |
addArg(arg) -> self , 'arg' is a numeric value, MAngle, MDistance, MTime, MPoint or MVector. Add an argument to the end of the arg list.
Signature: | addArg(value) |
Parameters: | arg - bool, int, float, string, MAngle, MDistance, MPoint, MTime or MVector |
Returns: | |
Description: | Add an argument to the end of the arg list. |
OpenMaya.MArgList.asAngle | ( | ) |
OpenMaya.MArgList.asBool | ( | ) |
asBool(index) -> bool Return an argument as a boolean.
Signature: | asBool(index) |
Parameters: | index - int |
Returns: | bool |
Description: | Return an argument as a boolean. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asDistance | ( | ) |
OpenMaya.MArgList.asDouble | ( | ) |
asDouble(index) -> float Alias for asFloat().
Signature: | asDouble(index) |
Parameters: | index - int |
Returns: | float |
Description: | Alias for asFloat(). |
OpenMaya.MArgList.asDoubleArray | ( | ) |
asDoubleArray(index) -> MDoubleArray Return a sequence of arguments as an MDoubleArray.
Signature: | asDoubleArray(index) |
Parameters: | index - int |
Returns: | MDoubleArray |
Description: | Return a sequence of arguments as an MDoubleArray. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asFloat | ( | ) |
asFloat(index) -> float Return an argument as a float.
Signature: | asFloat(index) |
Parameters: | index - int |
Returns: | float |
Description: | Return an argument as a float. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asInt | ( | ) |
asInt(index) -> int Return an argument as an integer.
Signature: | asInt(index) |
Parameters: | index - int |
Returns: | int |
Description: | Return an argument as an integer. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asIntArray | ( | ) |
OpenMaya.MArgList.asMatrix | ( | ) |
OpenMaya.MArgList.asPoint | ( | ) |
asPoint(index) -> MPoint Return a sequence of arguments as an MPoint.
Signature: | asPoint(index, numElements=3) |
Parameters: | index - int<br> numElements - int |
Returns: | MPoint |
Description: | Return a sequence of arguments as an MPoint. ValueError will be raised if numElements is greater than 4 as that is the maximum dimension for an MPoint. IndexError will be raised if index is out of bounds |
OpenMaya.MArgList.asString | ( | ) |
asString(index) -> string Return an argument as a string.
Signature: | asString(index) |
Parameters: | index - int |
Returns: | string |
Description: | Return an argument as a string. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asStringArray | ( | ) |
asStringArray(index) -> list of strings Return a sequence of arguments as a list of strings.
Signature: | asStringArray(index) |
Parameters: | index - int |
Returns: | list of strings |
Description: | Return a sequence of arguments as a list of strings. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.asTime | ( | ) |
OpenMaya.MArgList.asVector | ( | ) |
asVector(index) -> MVector Return a sequence of arguments as an MVector.
Signature: | asVector(index, numElements=3) |
Parameters: | index - int numElements - int |
Returns: | MVector |
Description: | Return a sequence of arguments as an MVector. ValueError will be raised if numElements is greater than 3 as that is the maximum dimension for an MVector. IndexError will be raised if index is out of bounds. |
OpenMaya.MArgList.flagIndex | ( | ) |
flagIndex(shortFlag, longFlag=None) -> int Return index of first occurrence of specified flag.
Signature: | flagIndex(shortName, longName=None) |
Parameters: | shortName - string longName - string |
Returns: | int |
Description: | Return the index of the first occurrence of the specified flag or kInvalidFlagIndex if the flag is not in the arg list. |
OpenMaya.MArgList.lastArgUsed | ( | ) |
lastArgUsed() -> int Return index of last argument used by the most recent as*() method.
Signature: | lastArgUsed() |
Parameters: | |
Returns: | int |
Description: | Return the index of the last argument used by the most recent as*() method call, or -1 if no arguments have been used yet. |
|
static |
Name: | kInvalidArgIndex |
Type: | int |
Description: | Used by the flagIndex() method to indicate that the flag was not found. |