Python API 2.0 Reference
|
Public Member Functions | |
def | __init__ () |
def | __len__ () |
def | builder () |
def | copy () |
def | elementLogicalIndex () |
def | inputArrayValue () |
def | inputValue () |
def | isDone () |
def | jumpToLogicalElement () |
def | jumpToPhysicalElement () |
def | next () |
def | outputArrayValue () |
def | outputValue () |
def | set () |
def | setAllClean () |
def | setClean () |
Static Public Member Functions | |
def | __new__ () |
Data block handle for array data.
def OpenMaya.MArrayDataHandle.__init__ | ( | ) |
Initialize self. See help(type(self)) for accurate signature.
def OpenMaya.MArrayDataHandle.__len__ | ( | ) |
Return len(self).
|
static |
Create and return a new object. See help(type) for accurate signature.
def OpenMaya.MArrayDataHandle.builder | ( | ) |
builder() -> MArrayDataBuilder Returns a builder for this handle's array so that it can be expanded. This method will raise an exception if the current array does not support array data builders. This can be changed in a node's initialize routine using the usesArrayDataBuilder attribute in MFnAttribute. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle().
def OpenMaya.MArrayDataHandle.copy | ( | ) |
copy(source) -> self Copy data from source array. * source (MArrayDataHandle) - The source object to copy from
def OpenMaya.MArrayDataHandle.elementLogicalIndex | ( | ) |
elementLogicalIndex() -> int Returns the index that we are currently at in the array. It is possible for the index to be invalid, in which case the return status will report an error. These may be sparse arrays so the element index returned will be a logical index. Raises an exception if there is no current element (e.g. if there are no elements).
def OpenMaya.MArrayDataHandle.inputArrayValue | ( | ) |
inputArrayValue() -> MArrayDataHandle Gets a handle into this data block for the current array element. This method should be used when the array elements are also arrays. The data represented by the handle will be valid. If the data is from an dirty connection, then the connection will be evaluated. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle().
def OpenMaya.MArrayDataHandle.inputValue | ( | ) |
inputValue() -> MDataHandle Gets a handle into this data block for the current array element. The data represented by the handle will be valid. If the data is from an dirty connection, then the connection will be evaluated. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle().
def OpenMaya.MArrayDataHandle.isDone | ( | ) |
isDone() -> bool Specifies whether or not there are more elements to iterate over.
def OpenMaya.MArrayDataHandle.jumpToLogicalElement | ( | ) |
jumpToLogicalElement(index) -> self Jump to a specific logical element in the array. Since the logical array is sparse its indices may not be consecutive and a binary search is used internally to find the element. Thus when iterating through the elements of the array it is much faster to do so using physical indices. * index (int) - the logical index to jump to
def OpenMaya.MArrayDataHandle.jumpToPhysicalElement | ( | ) |
jumpToPhysicalElement(position) -> self Jump to a specific physical element in the array. Since physical elements are contiguous no search is required. * position (int) - the array position to jump to
def OpenMaya.MArrayDataHandle.next | ( | ) |
next() -> bool Advance to the next element in the array. Return True if there was a next element and False if there wasn't.
def OpenMaya.MArrayDataHandle.outputArrayValue | ( | ) |
outputArrayValue() -> MArrayDataHandle Gets a handle into this data block for the current array element. This method should be used when the array elements are also arrays. The array's elements are not evaluated and may no longer be valid. Therefore, this handle should only be used for writing over the data. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle().
def OpenMaya.MArrayDataHandle.outputValue | ( | ) |
outputValue() -> MDataHandle Gets a handle into this data block for the current array element. The element is not evaluated so its data may not be valid. Therefore, this handle should only be used for writing over the data. This method can also be used to retrieve handles to individual elements of non-datablock array handles, such as those returned by MPlug.getValue() and MPlug.asMDataHandle().
def OpenMaya.MArrayDataHandle.set | ( | ) |
set(builder) -> self Sets the data for this array from the data in the builder object Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle(). * builder (MArrayDataBuilder) - the builder object
def OpenMaya.MArrayDataHandle.setAllClean | ( | ) |
setAllClean() -> self Marks every element of the array attribute represented by the handle as clean. This method should be used if a compute function is asked to compute a single element of a multi, but instead calculates all the elements. Calling <i>setAllClean</i> in this situation will prevent further calls to the node's compute method for the other elements of the multi. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle()
def OpenMaya.MArrayDataHandle.setClean | ( | ) |
setClean() -> self Marks the data that is represented by this handle as being clean. This should be done after recalculating the data from the inputs. Do not use with an MArrayDataHandle which was returned by MPlug.asMDataHandle().