None.
Name | Type | Description |
---|---|---|
kInvalidArgIndex | int | Used by the flagIndex() method to indicate that the flag was not found. |
None.
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. |
None.
Signature | Parameters | Returns | Description |
---|---|---|---|
Available in Maya 2012 Gold: | |||
addArg(value) | arg - bool, int, float, string, MAngle, MDistance, MPoint, MTime or MVector | Add an argument to the end of the arg list. | |
asBool(index) | index - int | bool | Return an argument as a boolean. IndexError will be raised if index is out of bounds. |
asFloat(index) | index - int | float | Return an argument as a float. IndexError will be raised if index is out of bounds. |
asInt(index) | index - int | int | Return an argument as an integer. IndexError will be raised if index is out of bounds. |
asIntArray(index) | index - int | MIntArray | Return a sequence of arguments as an MIntArray. IndexError will be raised if index is out of bounds. |
asString(index) | index - int | string | Return an argument as a string. IndexError will be raised if index is out of bounds. |
asStringArray(index) | index - int | list of strings | Return a sequence of arguments as a list of strings. IndexError will be raised if index is out of bounds. |
flagIndex(shortName, longName=None) | shortName - string
longName - string |
int | Return the index of the first occurrence of the specified flag or kInvalidFlagIndex if the flag is not in the arg list. |
lastArgUsed() | int | Return the index of the last argument used by the most recent as*() method call, or -1 if no arguments have been used yet. | |
Available in Maya 2012 HotFix 1: | |||
asAngle(index) | index - int | MAngle | Return an argument as an MAngle. IndexError will be raised if index is out of bounds. |
asDistance(index) | index - int | MDistance | Return an argument as an MDistance. IndexError will be raised if index is out of bounds. |
asDouble(index) | index - int | float | Alias for asFloat(). |
asDoubleArray(index) | index - int | MDoubleArray | Return a sequence of arguments as an MDoubleArray. IndexError will be raised if index is out of bounds. |
asMatrix(index) | index - int | MMatrix | Return a sequence of arguments as an MMatrix. IndexError will be raised if index is out of bounds. |
asPoint(index, numElements=3) | index - int numElements - int |
MPoint | 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 |
asTime(index) | index - int | MTime | Return an argument as an MTime. IndexError will be raised if index is out of bounds. |
asVector(index, numElements=3) | index - int numElements - int |
MVector | 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. |
None.
Supports the length() function, which returns the number of arguments in the list.
None.
None.
© 2011 Autodesk, Inc. All rights reserved.