#include <MDataHandle.h>
An MDataHandle is a smart pointer into a data block (MDataBlock). A data handle corresponds to the data for a particular attribute or plug. For array data (eg CVs of a curve) use an MArrayDataHandle. To get a data handle, request it from the data block.
Some simple numeric data is handled directly by the dependency graph. If the data is more complicated (eg surface geometry), then the data handle can supply a pointer that should be given to the appropriate data function set.
MDataHandle allows the manipulation and setting of generic attributes as created by the MFnGenericAttribute class. It is possible to create numeric generic attributes using two scenarios. A plug-in may request that the generic attribute support singleton types such as MFnNumericData::kFloat or kChar. Or a plug-in may request array types such as MFnNumericData::k2Float k2Double. In the singleton case, getting and setting the attribute using MDataHandle is done with the asGeneric*() or setGeneric*() methods. In the case of the array types, the MDataHandle.data() method can be used to retrieve the MObject for the attribute and to initialize the MFnNumericData function set. A call to MDataHandle::setData() on the updated attribute must be made to pass the information back to Maya. NOTE: It is not possible to distinguish the singleton generic types from one another. There is no method that can be called to return if the singleton generic attribute is a float, char etc.
MDataHandle methods cannot be assumed to be threadsafe.
affectsNode.cpp, animCubeNode.cpp, anisotropicShader.cpp, apiMeshCreator.cpp, apiMeshShape.cpp, apiMeshShape.h, arcLenNode.cpp, backfillShader.cpp, blindDataMesh.cpp, blindDataShader.cpp, brickShader.cpp, buildRotationNode.cpp, cellShader.cpp, cgfxShaderNode.cpp, cgfxShaderNode.h, cgfxVector.cpp, checkerShader.cpp, circleNode.cpp, clearcoat.cpp, closestPointOnCurveNode.cpp, compositingShader.cpp, contrastShader.cpp, customImagePlane.cpp, cvColorNode.cpp, cvColorShader.cpp, depthShader.cpp, displacementShader.cpp, dynExprField.cpp, flameShader.cpp, fullLoftNode.cpp, gammaShader.cpp, genericAttributeNode.cpp, geometrySurfaceConstraint.cpp, geomShader.cpp, GLSLShaderNode.cpp, GLSLShaderNode.h, hlslShader.cpp, hlslShader.h, hwColorPerVertexShader.cpp, hwDecalBumpShader_NV20.cpp, hwPhongShader.cpp, hwPhongShader.h, hwReflectBumpShader_NV20.cpp, hwRefractReflectShader_NV20.cpp, hwToonShader_NV20.cpp, hwUnlitShader.cpp, interpShader.cpp, jitterNode.cpp, lambertShader.cpp, latticeNoiseNode.cpp, lavaShader.cpp, lightShader.cpp, meshOpNode.cpp, mixtureShader.cpp, multiCurveNode.cpp, noiseShader.cpp, offsetNode.cpp, ownerEmitter.cpp, ownerEmitter.h, phongShader.cpp, pnTrianglesNode.cpp, pnTrianglesNode.h, pointOnMeshInfoNode.cpp, pointOnSubdNode.cpp, quadricShape.cpp, renderAccessNode.cpp, rockingTransform.cpp, rockingTransform.h, rockingTransformCheck.cpp, shadowMatteShader.cpp, shellNode.cpp, shiftNode.cpp, simpleEmitter.cpp, simpleEmitter.h, simpleFluidEmitter.cpp, simpleLoftNode.cpp, simpleSpring.h, sineNode.cpp, slopeShaderNode.cpp, solidCheckerShader.cpp, splitUVNode.cpp, stringFormatNode.cpp, sweptEmitter.cpp, sweptEmitter.h, testNobjectNode.cpp, torusField.cpp, torusField.h, transCircleNode.cpp, volumeShader.cpp, weightListNode.cpp, and yTwistNode.cpp.
Public Member Functions | |
MDataHandle () | |
bool | isNumeric () const |
bool | isGeneric (bool &isNumeric, bool &isNull) const |
MFnNumericData::Type | numericType () const |
MFnData::Type | type () const |
MTypeId | typeId () const |
MStatus | acceptedTypeIds (MUintArray &) const |
MObject | data () |
MStatus | copy (const MDataHandle &src) |
void | setClean () |
bool & | asBool () const |
char & | asChar () const |
unsigned char & | asUChar () const |
short & | asShort () const |
int & | asLong () const |
This method is obsolete. | |
int & | asInt () const |
void *& | asAddr () const |
float & | asFloat () const |
double & | asDouble () const |
MDistance | asDistance () const |
MAngle | asAngle () const |
MTime | asTime () const |
short2 & | asShort2 () const |
long2 & | asLong2 () const |
This method is obsolete. | |
int2 & | asInt2 () const |
float2 & | asFloat2 () const |
double2 & | asDouble2 () const |
short3 & | asShort3 () const |
long3 & | asLong3 () const |
This method is obsolete. | |
int3 & | asInt3 () const |
float3 & | asFloat3 () const |
double3 & | asDouble3 () const |
MVector & | asVector () const |
MFloatVector & | asFloatVector () const |
MMatrix & | asMatrix () const |
MFloatMatrix & | asFloatMatrix () const |
MString & | asString () const |
MObject | asNurbsCurve () const |
MObject | asNurbsSurface () const |
MObject | asMesh () const |
MObject | asSubdSurface () const |
MObject | asNurbsCurveTransformed () const |
MObject | asNurbsSurfaceTransformed () const |
MObject | asMeshTransformed () const |
MObject | asSubdSurfaceTransformed () const |
const MMatrix & | geometryTransformMatrix () const |
MPxData * | asPluginData () const |
void | set (bool) |
No script support. | |
void | set (char) |
No script support. | |
void | set (short) |
No script support. | |
void | set (int) |
No script support. | |
void | set (float) |
No script support. | |
void | set (double) |
No script support. | |
void | set (const MMatrix &) |
No script support. | |
void | set (const MFloatMatrix &) |
No script support. | |
void | set (const MVector &) |
No script support. | |
void | set (const MFloatVector &) |
No script support. | |
void | set (const MDistance &) |
No script support. | |
void | set (const MAngle &) |
No script support. | |
void | set (const MTime &) |
No script support. | |
void | set (short, short) |
No script support. | |
void | set (int, int) |
No script support. | |
void | set (float, float) |
No script support. | |
void | set (double, double) |
No script support. | |
void | set (short, short, short) |
No script support. | |
void | set (int, int, int) |
No script support. | |
void | set (float, float, float) |
No script support. | |
void | set (double, double, double) |
No script support. | |
void | set (const MString &) |
No script support. | |
MStatus | set (const MObject &data) |
No script support. | |
MStatus | set (MPxData *data) |
No script support. | |
void | setBool (bool) |
void | setChar (char) |
void | setShort (short) |
void | setInt (int) |
void | setFloat (float) |
void | setDouble (double) |
void | setMMatrix (const MMatrix &) |
void | setMFloatMatrix (const MFloatMatrix &) |
void | setMVector (const MVector &) |
void | setMFloatVector (const MFloatVector &) |
void | setMDistance (const MDistance &) |
void | setMAngle (const MAngle &) |
void | setMTime (const MTime &) |
void | set2Short (short, short) |
void | set2Int (int, int) |
void | set2Float (float, float) |
void | set2Double (double, double) |
void | set3Short (short, short, short) |
void | set3Int (int, int, int) |
void | set3Float (float, float, float) |
void | set3Double (double, double, double) |
void | setString (const MString &) |
MStatus | setMObject (const MObject &data) |
MStatus | setMPxData (MPxData *data) |
bool | asGenericBool () const |
unsigned char | asGenericChar () const |
double | asGenericDouble () const |
float | asGenericFloat () const |
short | asGenericShort () const |
int | asGenericInt () const |
void | setGenericBool (bool value, bool force) |
void | setGenericChar (unsigned char value, bool force) |
void | setGenericDouble (double value, bool force) |
void | setGenericFloat (float value, bool force) |
void | setGenericShort (short value, bool force) |
void | setGenericInt (int value, bool force) |
MDataHandle | child (const MPlug &plug) |
MDataHandle | child (const MObject &attribute) |
MDataHandle & | operator= (const MDataHandle &other) |
MDataHandle (const MDataHandle &) | |
Friends | |
class | MDataBlock |
class | MArrayDataBuilder |
class | MArrayDataHandle |
class | MItGeometry |
MDataHandle::MDataHandle | ( | ) |
Constructor for MDataHandle.
Typically, data handles will be obtained from the data block (MDataBlock). A user constructed MDataHandle should not be used until a valid data handle has been assigned to it (ie. using the assignment operator).
MDataHandle::MDataHandle | ( | const MDataHandle & | other | ) | [inline] |
Copy constructor.
bool MDataHandle::isNumeric | ( | ) | const |
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.
bool MDataHandle::isGeneric | ( | bool & | isNumeric, | |
bool & | isNull | |||
) | const |
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.
[out] | isNumeric | returns true if this handle is for simple generic numeric data |
[out] | isNull | returns true if this handle is not set |
MFnNumericData::Type MDataHandle::numericType | ( | ) | const |
Returns the type of data represented by this handle. This method is only valid for data handles of simple numeric types.
MFnData::Type MDataHandle::type | ( | ) | const |
Returns the type of data represented by this handle.
MTypeId MDataHandle::typeId | ( | ) | const |
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.
MStatus MDataHandle::acceptedTypeIds | ( | MUintArray & | typids | ) | const |
This method returns an array of MTypeId ids that the data handle can accept. The MTypeId can be reconstructed using the unsigned int in id.
[out] | typids | an unsigned int array to copy the ids to |
MObject MDataHandle::data | ( | ) |
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.
MStatus MDataHandle::copy | ( | const MDataHandle & | src | ) |
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.
[in] | src | the handle to the attribute to copy |
void MDataHandle::setClean | ( | ) |
Marks the data that is represented by this handle as being clean. This should be done after recalculating the data from the inputs.
bool & MDataHandle::asBool | ( | ) | const |
Returns the data represented by this handle in the data block.
char & MDataHandle::asChar | ( | ) | const |
Returns the data represented by this handle in the data block.
unsigned char & MDataHandle::asUChar | ( | ) | const |
Returns the data represented by this handle in the data block.
short & MDataHandle::asShort | ( | ) | const |
Returns the data represented by this handle in the data block.
int & MDataHandle::asLong | ( | ) | const |
This method is obsolete.
int & MDataHandle::asInt | ( | ) | const |
Returns the data represented by this handle in the data block.
void *& MDataHandle::asAddr | ( | ) | const |
Returns the data represented by this handle in the data block.
float & MDataHandle::asFloat | ( | ) | const |
Returns the data represented by this handle in the data block.
double & MDataHandle::asDouble | ( | ) | const |
Returns the data represented by this handle in the data block.
MDistance MDataHandle::asDistance | ( | ) | const |
Returns the data represented by this handle in the data block.
MAngle MDataHandle::asAngle | ( | ) | const |
Returns the data represented by this handle in the data block.
MTime MDataHandle::asTime | ( | ) | const |
Returns the data represented by this handle in the data block. Even though this method does not return a reference to an MTime, modifications to the MTime 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.
short2 & MDataHandle::asShort2 | ( | ) | const |
Returns the data represented by this handle in the data block.
long2 & MDataHandle::asLong2 | ( | ) | const |
This method is obsolete.
int2 & MDataHandle::asInt2 | ( | ) | const |
Returns the data represented by this handle in the data block.
float2 & MDataHandle::asFloat2 | ( | ) | const |
Returns the data represented by this handle in the data block.
double2 & MDataHandle::asDouble2 | ( | ) | const |
Returns the data represented by this handle in the data block.
short3 & MDataHandle::asShort3 | ( | ) | const |
Returns the data represented by this handle in the data block.
long3 & MDataHandle::asLong3 | ( | ) | const |
This method is obsolete.
int3 & MDataHandle::asInt3 | ( | ) | const |
Returns the data represented by this handle in the data block.
float3 & MDataHandle::asFloat3 | ( | ) | const |
Returns the data represented by this handle in the data block.
double3 & MDataHandle::asDouble3 | ( | ) | const |
Returns the data represented by this handle in the data block.
MVector & MDataHandle::asVector | ( | ) | const |
Returns the data represented by this handle in the data block.
MFloatVector & MDataHandle::asFloatVector | ( | ) | const |
Returns the data represented by this handle in the data block.
MMatrix & MDataHandle::asMatrix | ( | ) | const |
Returns the data represented by this handle in the data block. This method is only valid for attributes created using the MFnMatrixAttribute function set.
MFloatMatrix & MDataHandle::asFloatMatrix | ( | ) | const |
Returns the data represented by this handle in the data block. This method is only valid for attributes created using the MFnMatrixAttribute function set.
MString & MDataHandle::asString | ( | ) | const |
Returns the data represented by this handle in the data block.
MObject MDataHandle::asNurbsCurve | ( | ) | const |
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.
MObject MDataHandle::asNurbsSurface | ( | ) | const |
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.
MObject MDataHandle::asMesh | ( | ) | const |
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.
MObject MDataHandle::asSubdSurface | ( | ) | const |
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.
MObject MDataHandle::asNurbsCurveTransformed | ( | ) | const |
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.
MObject MDataHandle::asNurbsSurfaceTransformed | ( | ) | const |
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.
MObject MDataHandle::asMeshTransformed | ( | ) | const |
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.
MObject MDataHandle::asSubdSurfaceTransformed | ( | ) | const |
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.
const MMatrix & MDataHandle::geometryTransformMatrix | ( | ) | const |
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.
MPxData * MDataHandle::asPluginData | ( | ) | const |
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.
void MDataHandle::set | ( | bool | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setBool method instead.
[in] | val | the new value |
void MDataHandle::set | ( | char | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setChar method instead.
[in] | val | the new value |
void MDataHandle::set | ( | short | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setShort method instead.
[in] | val | the new value |
void MDataHandle::set | ( | int | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setInt method instead.
[in] | val | the new value |
void MDataHandle::set | ( | float | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setFloat method instead.
[in] | val | the new value |
void MDataHandle::set | ( | double | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setDouble method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MMatrix & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block. This method is only valid for attributes created using the MFnMatrixAttribute function set.
Python Notes
This method is not available from Python. See setMMatrix method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MFloatMatrix & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMFloatMatrix method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MVector & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMVector method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MFloatVector & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMFloatVector method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MDistance & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMDistance method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MAngle & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMAngle method instead.
[in] | val | the new value |
void MDataHandle::set | ( | const MTime & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setMTime method instead.
[in] | val | the new value |
void MDataHandle::set | ( | short | val1, | |
short | val2 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set2Short method instead.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set | ( | int | val1, | |
int | val2 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set2Int method instead.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set | ( | float | val1, | |
float | val2 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set2Float method instead.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set | ( | double | val1, | |
double | val2 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set2Double method instead.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set | ( | short | val1, | |
short | val2, | |||
short | val3 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set3Short method instead.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set | ( | int | val1, | |
int | val2, | |||
int | val3 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set3Int method instead.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set | ( | float | val1, | |
float | val2, | |||
float | val3 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set3Float method instead.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set | ( | double | val1, | |
double | val2, | |||
double | val3 | |||
) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See set3Double method instead.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set | ( | const MString & | val | ) |
No script support.
This method is not available in Python.
Set the data that this handle represents in the data block.
Python Notes
This method is not available from Python. See setString method instead.
[in] | val | the new string value |
No script support.
This method is not available in Python.
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.
Python Notes
This method is not available from Python. See setMObject method instead.
[in] | data | the data object |
No script support.
This method is not available in Python.
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.
Python Notes
This method is not available from Python. See setMPxData method instead.
[in] | data | the data object |
void MDataHandle::setBool | ( | bool | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setChar | ( | char | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setShort | ( | short | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setInt | ( | int | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setFloat | ( | float | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setDouble | ( | double | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMMatrix | ( | const MMatrix & | val | ) |
Set the data that this handle represents in the data block. This method is only valid for attributes created using the MFnMatrixAttribute function set.
[in] | val | the new value |
void MDataHandle::setMFloatMatrix | ( | const MFloatMatrix & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMVector | ( | const MVector & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMFloatVector | ( | const MFloatVector & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMDistance | ( | const MDistance & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMAngle | ( | const MAngle & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::setMTime | ( | const MTime & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new value |
void MDataHandle::set2Short | ( | short | val1, | |
short | val2 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set2Int | ( | int | val1, | |
int | val2 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set2Float | ( | float | val1, | |
float | val2 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set2Double | ( | double | val1, | |
double | val2 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the two element array |
[in] | val2 | the second value in the two element array |
void MDataHandle::set3Short | ( | short | val1, | |
short | val2, | |||
short | val3 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set3Int | ( | int | val1, | |
int | val2, | |||
int | val3 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set3Float | ( | float | val1, | |
float | val2, | |||
float | val3 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::set3Double | ( | double | val1, | |
double | val2, | |||
double | val3 | |||
) |
Set the data that this handle represents in the data block.
[in] | val1 | the first value in the three element array |
[in] | val2 | the second value in the three element array |
[in] | val3 | the third value in the three element array |
void MDataHandle::setString | ( | const MString & | val | ) |
Set the data that this handle represents in the data block.
[in] | val | the new string value |
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.
[in] | data | the data object |
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.
[in] | data | the data object |
bool MDataHandle::asGenericBool | ( | ) | const |
Returns the generic data represented by this handle in the data block.
unsigned char MDataHandle::asGenericChar | ( | ) | const |
Returns the generic data represented by this handle in the data block.
double MDataHandle::asGenericDouble | ( | ) | const |
Returns the generic data represented by this handle in the data block.
float MDataHandle::asGenericFloat | ( | ) | const |
Returns the generic data represented by this handle in the data block.
short MDataHandle::asGenericShort | ( | ) | const |
Returns the generic data represented by this handle in the data block.
int MDataHandle::asGenericInt | ( | ) | const |
Returns the generic data represented by this handle in the data block.
void MDataHandle::setGenericBool | ( | bool | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new bool value |
[in] | force | force the new type of the attribute to be bool |
void MDataHandle::setGenericChar | ( | unsigned char | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new char value |
[in] | force | force the new type of the attribute to be char |
void MDataHandle::setGenericDouble | ( | double | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new double value |
[in] | force | force the new type of the attribute to be double |
void MDataHandle::setGenericFloat | ( | float | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new float value |
[in] | force | force the new type of the attribute to be float |
void MDataHandle::setGenericShort | ( | short | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new short value |
[in] | force | force the new type of the attribute to be short |
void MDataHandle::setGenericInt | ( | int | value, | |
bool | force | |||
) |
Set the data that this handle represents in the data block.
[in] | value | the new int value |
[in] | force | force the new type of the attribute to be int |
MDataHandle MDataHandle::child | ( | const MPlug & | plug | ) |
Get a handle to a child of this handle. This is used if you have a handle to a compound attribute.
[in] | plug | the plug of the child |
MDataHandle MDataHandle::child | ( | const MObject & | attribute | ) |
Get a handle to a child of this handle. This is used if you have a handle to a compound attribute.
[in] | attribute | the attribute of the child |
MDataHandle & MDataHandle::operator= | ( | const MDataHandle & | other | ) | [inline] |
Assignment operator.
[in] | other | Data handle to copy from. |
Autodesk® Maya® 2009 © 1997-2008 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |