OpenMaya.MDataBlock Class Reference
Dependency node data block.
OpenMaya.MDataBlock.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
OpenMaya.MDataBlock.context |
( |
| ) |
|
context() -> MDGContext
Returns a copy of the dependecy graph context for which this data block was created. The context is used to specify how a dependency node is going to be evaluated.
OpenMaya.MDataBlock.inputArrayValue |
( |
| ) |
|
inputArrayValue(plug) -> MArrayDataHandle
inputArrayValue(attribute) -> MArrayDataHandle
Gets an array handle to this data block for the given plug/attribute's data. This is only valid if the given plug has array data. The data represented by the handle will be valid. If the data is from a dirty connection, then the connection will be evaluated. If no connection is present, then the value that the plug has been set to will be returned. If the plug has not been set to a particular value, then the default value will be returned.
* plug (MPlug) - the plug whose data you wish to access
OR
* attribute (MObject) - the attribute whose data you wish to access
OpenMaya.MDataBlock.inputValue |
( |
| ) |
|
inputValue(plug) -> MDataHandle
inputValue(attribute) -> MDataHandle
Gets a handle to this data block for the given plug/attribute's data. The data represented by the handle is guaranteed to be valid for reading. If the data is from a dirty connection, then the connection will be evaluated. If no connection is present, then the value that the plug has been set to will be returned. If the plug has not been set to a particular value, then the default value will be returned.
* plug (MPlug) - the plug whose data you wish to access
OR
* attribute (MObject) - the attribute of the node that you want to access
OpenMaya.MDataBlock.isClean |
( |
| ) |
|
isClean(plug) -> bool
isClean(attribute) -> bool
Queries the dependency graph to see whether the given plug/attribute is clean.
* plug (MPlug) - the plug that is to be query
OR
* attribute (MObject) - the attribute that is to be query.
OpenMaya.MDataBlock.outputArrayValue |
( |
| ) |
|
outputArrayValue(plug) -> MArrayDataHandle
outputArrayValue(attribute) -> MArrayDataHandle
Gets a handle to this data block for the given plug/attribute's data. No dependency graph evaluations will be done, and therefore the data is not guaranteed to be valid (i.e. it may be dirty). Typically, this method is used to get the handle during compute in order to write output data to it.
Another usage of this method is to access an input array attribute without evaluating any of its array elements. One can then use MArrayDataHandle.jumpToElement() to get to the particular element of interest, and evaluate its value using MArrayDataHandle.inputValue().
* plug (MPlug) - the plug whose data you wish to access
OR
* attribute (MObject) - the attribute whose data you wish to access
OpenMaya.MDataBlock.outputValue |
( |
| ) |
|
outputValue(plug) -> MDataHandle
outputValue(attribute) -> MDataHandle
Gets a handle to this data block for the given plug/attribute's data. The data is not guaranteed to be valid. No dependency graph evaluations will be done. Therefore, this handle should be used only for writing.
* plug (MPlug) - the plug whose data you wish to access
OR
* attribute (MObject) - the attribute of the node that you want to access
OpenMaya.MDataBlock.setClean |
( |
| ) |
|
setClean(plug) -> self
setClean(attribute) -> self
Tells the dependency graph that the given plug/attribute has been updated and is now clean. This should be called after the data in the plug has been recalculated from the inputs of the node.
* plug (MPlug) - the plug that is to be marked clean
OR
* attribute (MObject) - the attribute that is to be marked clean
OpenMaya.MDataBlock.setContext |
( |
| ) |
|
setContext(ctx) -> self
Set the dependency graph context for this data block. The context is used to specify how a dependency node is going to be evaluated, thus replacing the context for the given datablock. This does not modify the dirty state of the datablock so that they apply to the new context.
This function should not be used for timed evaluation.
* ctx (MDGContext) - the dependency graph context