C++ API Reference

Parent class for dependency graph data function sets. More...

#include <MFnData.h>

+ Inheritance diagram for MFnData:

Public Member Functions

virtual MFn::Type type () const
 Function set type. More...
 
virtual ~MFnData ()
 Destructor.
 
 MFnData (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
 MFnData ()
 Default class constructor.
 
 OPENMAYA_ENUM (Type, kInvalid, kNumeric, kPlugin, kPluginGeometry, kString, kMatrix, kStringArray, kDoubleArray, kFloatArray, kIntArray, kPointArray, kVectorArray, kMatrixArray, kComponentList, kMesh, kLattice, kNurbsCurve, kNurbsSurface, kSphere, kDynArrayAttrs, kDynSweptGeometry, kSubdSurface, kNObject, kNId, kAny, kLast)
 Types of dependency graph data. More...
 
 MFnData (const MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
- Public Member Functions inherited from MFnBase
virtual ~MFnBase ()
 Class Destructor. More...
 
bool hasObj (MFn::Type) const
 Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More...
 
bool hasObj (const MObject &) const
 Determines whether or not the Function Set is compatible with the specified Maya Object within the API RTTI system. More...
 
MObject object (MStatus *ReturnStatus=NULL) const
 Returns the MObject that is attached to the Function Set. More...
 
virtual MStatus setObject (MObject &object)
 Attaches the Function Set to the specified Maya Object. More...
 
virtual MStatus setObject (const MObject &object)
 NO SCRIPT SUPPORT. More...
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 
- Static Public Member Functions inherited from MFnBase
static const char * className ()
 Returns the name of this class. More...
 
static const char * typeString (MFn::Type)
 Returns the type string for a given type. More...
 
static bool isValid (MFn::Type)
 Returns true if type is in the range of valid types. More...
 

Detailed Description

Parent class for dependency graph data function sets.

MFnData is the parent class for all dependency graph data function sets. Conceptually, data objects are what flow through the connections in the dependency graph.

Each node in the dependency graph has a data block associated with it. The data block holds the data objects for all of the node's attributes (see MDataBlock). The data block is only available during the compute method of a node. A data handle (MDataHandle) can be created to access a particular attribute's data inside of the data block.

Once a data handle is obtained, it is possible to get the data object from it. This is only necessary for heavier data structures such as geometry or strings. Simple numeric data can be manipulated straight through the data handle.

Note: using kDynSweptGeometry data requires that a plug-in or stand alone API application be linked with the OpenMayaFX library.

Constructor & Destructor Documentation

MFnData ( MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:
  • MS::kSuccess if the function set is successfully attached
  • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject
MFnData ( const MObject object,
MStatus ReturnStatus = NULL 
)

Constructor.

Class constructor that initializes the function set to the given MObject.

Parameters
[in]objectThe MObject to attach the function set to
[out]ReturnStatusthe return status
Status Codes:
  • MS::kSuccess if the function set is successfully attached
  • MS::kInvalidParameter if the MObject does not represent a valid Maya object or if the function set is not allowed to attach to this MObject

Member Function Documentation

OPENMAYA_MAJOR_NAMESPACE_OPEN const char * className ( )
static

Returns the name of this class.

Return the class name : "MFnData".

Returns
Name of this class.
OPENMAYA_ENUM ( Type  ,
kInvalid  ,
kNumeric  ,
kPlugin  ,
kPluginGeometry  ,
kString  ,
kMatrix  ,
kStringArray  ,
kDoubleArray  ,
kFloatArray  ,
kIntArray  ,
kPointArray  ,
kVectorArray  ,
kMatrixArray  ,
kComponentList  ,
kMesh  ,
kLattice  ,
kNurbsCurve  ,
kNurbsSurface  ,
kSphere  ,
kDynArrayAttrs  ,
kDynSweptGeometry  ,
kSubdSurface  ,
kNObject  ,
kNId  ,
kAny  ,
kLast   
)

Types of dependency graph data.

Parameters
kInvalidInvalid value
kNumericNumeric, use MFnNumericData extract the node data.
kPluginPlugin Blind Data, use MFnPluginData to extract the node data.
kPluginGeometryPlugin Geometry, use MFnGeometryData to extract the node data.
kStringString, use MFnStringData to extract the node data.
kMatrixMatrix, use MFnMatrixData to extract the node data.
kStringArrayString Array, use MFnStringArrayData to extract the node data.
kDoubleArrayDouble Array, use MFnDoubleArrayData to extract the node data.
kFloatArrayFloat Array, use MFnFloatArrayData to extract the node data.
kIntArrayInt Array, use MFnIntArrayData to extract the node data.
kPointArrayPoint Array, use MFnPointArrayData to extract the node data.
kVectorArrayVector Array, use MFnVectorArrayData to extract the node data.
kMatrixArrayMatrix Array, use MFnMatrixArrayData to extract the node data.
kComponentListComponent List, use MFnComponentListData to extract the node data.
kMeshMesh, use MFnMeshData to extract the node data.
kLatticeLattice, use MFnLatticeData to extract the node data.
kNurbsCurveNurbs Curve, use MFnNurbsCurveData to extract the node data.
kNurbsSurfaceNurbs Surface, use MFnNurbsSurfaceData to extract the node data.
kSphereSphere, use MFnSphereData to extract the node data.
kDynArrayAttrsArrayAttrs, use MFnArrayAttrsData to extract the node data.
kDynSweptGeometrySweptGeometry, use MFnDynSweptGeometryData to extract the node data. This data node is in OpenMayaFX which must be linked to.
kSubdSurfaceSubdivision Surface, use MFnSubdData to extract the node data.
kNObjectnObject data, use MFnNObjectData to extract node data
kNIdnId data, use MFnNIdData to extract node data
kAnyTypically used when the data can be one of several types.
kLastLast value. It does not represent real data, but can be used to loop on all possible types

The documentation for this class was generated from the following files: