OpenMaya.MDataHandle Class Reference
Data handle for information contained in a data block.
OpenMaya.MDataHandle.__init__ |
( |
| ) |
|
x.__init__(...) initializes x; see help(type(x)) for signature
OpenMaya.MDataHandle.acceptedTypeIds |
( |
| ) |
|
acceptedTypeIds() -> array of MTypeIds
This method returns an array of MTypeIds.
OpenMaya.MDataHandle.asAddr |
( |
| ) |
|
asAddr() -> long
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asAngle |
( |
| ) |
|
asAngle() -> MAngle
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asBool |
( |
| ) |
|
asBool() -> bool
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asChar |
( |
| ) |
|
asChar() -> int
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asDistance |
( |
| ) |
|
asDistance() -> MDistance
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asDouble |
( |
| ) |
|
asDouble() -> float
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asDouble2 |
( |
| ) |
|
asDouble2() -> [float, float]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asDouble3 |
( |
| ) |
|
asDouble3() -> [float, float, float]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asFloat |
( |
| ) |
|
asFloat() -> float
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asFloat2 |
( |
| ) |
|
asFloat2() -> [float, float]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asFloat3 |
( |
| ) |
|
asFloat3() -> [float, float, float]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asFloatMatrix |
( |
| ) |
|
asFloatMatrix() -> MFloatMatrix
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asFloatVector |
( |
| ) |
|
asFloatVector() -> MFloatVector
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericBool |
( |
| ) |
|
asGenericBool() -> bool
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericChar |
( |
| ) |
|
asGenericChar() -> int
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericDouble |
( |
| ) |
|
asGenericDouble() -> float
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericFloat |
( |
| ) |
|
asGenericFloat() -> float
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericInt |
( |
| ) |
|
asGenericInt() -> int
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asGenericShort |
( |
| ) |
|
asGenericShort() -> int
Returns the generic data represented by this handle in the data block.
OpenMaya.MDataHandle.asInt |
( |
| ) |
|
asInt() -> int
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asInt2 |
( |
| ) |
|
asInt2() -> [int, int]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asInt3 |
( |
| ) |
|
asInt3() -> [int, int, int]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asMatrix |
( |
| ) |
|
asMatrix() -> MMatrix
Returns the data represented by this handle in the data block.This method is only valid for attributes created using the MFnMatrixAttribute function set.
OpenMaya.MDataHandle.asMesh |
( |
| ) |
|
asMesh() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the mesh function set and iterators. Even though this method does not return a reference to an MObject, modifications to the MObject instance will update the contents of the handle in the data block. The method MDataHandle.setClean() should be called after the data block has been modified.
The surface returned by this method will be in local space even if the connection is supplying world space geometry. This occurs mostly for efficiency reasons. In the case of a world space geometry connection, the MObject returned by this method will also contain the world space transformation matrix. This means that world space operations may be performed on this object using the mesh function set and iterators.
It is possible to get the matrix that defines the local to world transformation for this geometry using the MDataHandle.geometryTransformMatrix() method.
OpenMaya.MDataHandle.asMeshTransformed |
( |
| ) |
|
asMeshTransformed() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the mesh function set (MFnMesh) or any of the mesh iterators.
If the incoming mesh comes with world space transformation data, then it will be applied to the data that is returned. In other words, the mesh that is returned will be the mesh as it exists in world space.
The mesh that is returned from this method should not be modified. This method is only provided to make it easier to take world space geometry as input.
OpenMaya.MDataHandle.asNurbsCurve |
( |
| ) |
|
asNurbsCurve() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the nurbs curve function set and iterator. Even though this method does not return a reference to an MObject, modifications to the MObject instance will update the contents of the handle in the data block. The method MDataHandle.setClean() should be called after the data block has been modified.
The curve returned by this method will be in local space even if the connection is supplying world space geometry. This occurs mostly for efficiency reasons. In the case of a world space geometry connection, the MObject returned by this method will also contain the world space transformation matrix. This means that world space operations may be performed on this object using the nurbs curve function set and iterator.
It is possible to get the matrix that defines the local to world transformation for this geometry using the MDataHandle.geometryTransformMatrix() method.
OpenMaya.MDataHandle.asNurbsCurveTransformed |
( |
| ) |
|
asNurbsCurveTransformed() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the nurbs curve function set (MFnNurbsCurve) or the nurbs curve CV iterator (MItCurveCV).
If the incoming curve comes with world space transformation data, then it will be applied to the data that is returned. In other words, the curve that is returned will be the curve as it exists in world space.
The curve that is returned from this method should not be modified. This method is only provided to make it easier to take world space geometry as input.
OpenMaya.MDataHandle.asNurbsSurface |
( |
| ) |
|
asNurbsSurface() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the nurbs surface function set and iterator. Even though this method does not return a reference to an MObject, modifications to the MObject instance will update the contents of the handle in the data block. The method MDataHandle.setClean() should be called after the data block has been modified.
The surface returned by this method will be in local space even if the connection is supplying world space geometry. This occurs mostly for efficiency reasons. In the case of a world space geometry connection, the MObject returned by this method will also contain the world space transformation matrix. This means that world space operations may be performed on this object using the nurbs surface function set and iterator.
It is possible to get the matrix that defines the local to world transformation for this geometry using the MDataHandle.geometryTransformMatrix() method.
OpenMaya.MDataHandle.asNurbsSurfaceTransformed |
( |
| ) |
|
asNurbsSurfaceTransformed() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the nurbs surface function set (MFnNurbsSurface) or the nurbs surface CV iterator (MItSurfaceCV).
If the incoming surface comes with world space transformation data, then it will be applied to the data that is returned. In other words, the surface that is returned will be the surface as it exists in world space.
The surface that is returned from this method should not be modified. This method is only provided to make it easier to take world space geometry as input.
OpenMaya.MDataHandle.asPluginData |
( |
| ) |
|
asPluginData() -> MPxData
Returns the data represented by this handle in the data block. The object is returned as plugin data. This should be used to access data types defined by plugins.
OpenMaya.MDataHandle.asShort |
( |
| ) |
|
asShort() -> int
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asShort2 |
( |
| ) |
|
asShort2() -> [int, int]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asShort3 |
( |
| ) |
|
asShort3() -> [int, int, int]
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asString |
( |
| ) |
|
asString() -> MString
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asSubdSurface |
( |
| ) |
|
asSubdSurface() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the subdivision surface function set and iterator. Even though this method does not return a reference to an MObject, modifications to the MObject instance will update the contents of the handle in the data block. The method MDataHandle.setClean() should be called after the data block has been modified.
The subdivision surface returned by this method will be in local space even if the connection is supplying world space geometry. This occurs mostly for efficiency reasons. In the case of a world space geometry connection, the MObject returned by this method will also contain the world space transformation matrix. This means that world space operations may be performed on this object using the subdivision surface function set and iterator.
It is possible to get the matrix that defines the local to world transformation for this geometry using the MDataHandle.geometryTransformMatrix() method.
OpenMaya.MDataHandle.asSubdSurfaceTransformed |
( |
| ) |
|
asSubdSurfaceTransformed() -> MObject
Returns the data represented by this handle in the data block. The object returned by this call may be used directly with the subdivision surface function set (MFnSubdSurface) or the subdivision surface iterators (MItSubdVertex, MItSubdFace, MItSubdEdge).
If the incoming surface comes with world space transformation data, then it will be applied to the data that is returned. In other words, the surface that is returned will be the surface as it exists in world space.
The surface that is returned from this method should not be modified. This method is only provided to make it easier to take world space geometry as input.
OpenMaya.MDataHandle.asTime |
( |
| ) |
|
asTime() -> MTime
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asUChar |
( |
| ) |
|
asUChar() -> int
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.asVector |
( |
| ) |
|
asVector() -> MVector
Returns the data represented by this handle in the data block.
OpenMaya.MDataHandle.child |
( |
| ) |
|
child(MPlug) -> MDataHandle
child(MObject) -> MDataHandle
Get a handle to a child of this handle. This is used if you have a handle to a compound attribute.
OpenMaya.MDataHandle.copy |
( |
| ) |
|
copy(src) -> self
Copies the attribute from the src attribute to the attribute referenced by this handle. This is the only method which can completely copy a compound attribute from one handle to another. The construct outputHandle.set (inputHandle.data()) will not work for compound or multi attributes.
* src (MDataHandle) - the handle to the attribute to copy.
OpenMaya.MDataHandle.copyWritable |
( |
| ) |
|
copyWritable(src) -> self
Copies the attribute from the <i>src</i> attribute to the attribute referenced by this handle. When the copy is made it ensures that the data in this handle is writable. That is, if the src handle has a writable copy of the data then it will be duplicated, otherwise this handle will claim the writer status for the data.
* src (MDataHandle) - the handle to the attribute to copy.
OpenMaya.MDataHandle.data |
( |
| ) |
|
data() -> MObject
Returns the data object from this handle. The object returned should be used with the appropriate data function set. This method is not valid for simple numeric types.
OpenMaya.MDataHandle.geometryTransformMatrix |
( |
| ) |
|
geometryTransformMatrix() -> MMatrix
This method returns a reference to the local-to-world transformation matrix that can accompany a geometry data object. Only use this method on handles to geometry data (curves, surfaces, and meshes).
If no local-to-world transformation information has been provided then this will be an identity matrix.
OpenMaya.MDataHandle.isGeneric |
( |
| ) |
|
isGeneric() -> [bool, isNumeric, isNull]
Returns True if this handle is for generic data. There are 2 forms of generic data. The first is for simple data and is used if the isNumeric parameter returns True. In this case, the asGeneric*() and setGeneric*() methods of this class are used to query and set values.
The second form of generic data is for more complex attribute types. As a result the type of the object must be checked and an appropriate attribute function set initialized with the object.Returns isNumeric True if this handle is for simple generic numeric data.
Returns isNull True if this handle is not set.
OpenMaya.MDataHandle.isNumeric |
( |
| ) |
|
isNumeric() -> bool
Returns True if this handle is for simple numeric data. That means that the numeric data is directly accessible through the non-generic as*() and set*() methods of this handle. For example, depending on handle initialization, the asBool() may be called but the asGenericBool() should not be called.
OpenMaya.MDataHandle.numericType |
( |
| ) |
|
numericType() -> int
Returns the type of data represented by this handle. This method is only valid for data handles of simple numeric types.
OpenMaya.MDataHandle.set2Double |
( |
| ) |
|
set2Double(float, float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set2Float |
( |
| ) |
|
set2Float(float, float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set2Int |
( |
| ) |
|
set2Int(int, int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set2Short |
( |
| ) |
|
set2Short(int, int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set3Double |
( |
| ) |
|
set3Double(float, float, float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set3Float |
( |
| ) |
|
set3Float(float, float, float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set3Int |
( |
| ) |
|
set3Int(int, int, int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.set3Short |
( |
| ) |
|
set3Short(int, int, int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setBool |
( |
| ) |
|
setBool(bool) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setChar |
( |
| ) |
|
setChar(int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.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.
OpenMaya.MDataHandle.setDouble |
( |
| ) |
|
setDouble(float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setFloat |
( |
| ) |
|
setFloat(float) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericBool |
( |
| ) |
|
setGenericBool(bool, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericChar |
( |
| ) |
|
setGenericChar(int, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericDouble |
( |
| ) |
|
setGenericDouble(float, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericFloat |
( |
| ) |
|
setGenericFloat(float, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericInt |
( |
| ) |
|
setGenericInt(int, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setGenericShort |
( |
| ) |
|
setGenericShort(int, force) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setInt |
( |
| ) |
|
setInt(int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMAngle |
( |
| ) |
|
setMAngle(MAngle) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMDistance |
( |
| ) |
|
setMDistance(MDistance) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMFloatMatrix |
( |
| ) |
|
setMFloatMatrix(MFloatMatrix) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMFloatVector |
( |
| ) |
|
setMFloatVector(MFloatVector) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMMatrix |
( |
| ) |
|
setMMatrix(MMatrix) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMObject |
( |
| ) |
|
setMObject(MObject) -> self
Set the data that this handle represents in the data block. This method assumes that the MObject is a dependency graph data object. These objects can be created using the appropriate MFn..Data function set.
Note that this method cannot be used to copy compound or multi attributes from one handle to another via the construct outputHandle.set (inputHandle.data()).
To copy these user defined attributes, the method MDataHandle.copy() must be used.
OpenMaya.MDataHandle.setMPxData |
( |
| ) |
|
setMPxData(MPxData) -> self
Set the data that this handle represents in the data block. This method takes a pointer to a user defined data object. The data block will become the new owner of the data object that you pass in. Do not delete it.
OpenMaya.MDataHandle.setMTime |
( |
| ) |
|
setMTime(MTime) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setMVector |
( |
| ) |
|
setMVector(MVector) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setShort |
( |
| ) |
|
setShort(int) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.setString |
( |
| ) |
|
setString(string) -> self
Set the data that this handle represents in the data block.
OpenMaya.MDataHandle.type |
( |
| ) |
|
type() -> int
Returns the type of data represented by this handle.
OpenMaya.MDataHandle.typeId |
( |
| ) |
|
typeId() -> MTypeId
Returns the type of data represented by this handle as a type id. A type id is a four character code that is used to identify the data type.
If no data exists for this handle, the type id will be 0x0.