class MFnArrayAttrsData

Jump to documentation

: public MFnData Function set for multiple arrays of attributes for dependency node data. (OpenMaya) (OpenMaya.py)

Inheritance:

MFnArrayAttrsData < MFnData < MFnBase

public members:

MFnArrayAttrsData ()
MFnArrayAttrsData ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnArrayAttrsData ()
virtual MFn::Type type () const
kInvalid
kVectorArray
use vectorArray() method to extract the attribute array.
kDoubleArray
use doubleArray() method to extract the attribute array.
kIntArray
use intArray() method to extract the attribute array.
kStringArray
use stringArray() method to extract the attribute array.
kLast
MStatus clear ()
unsigned int count () const
MStringArray list ( MStatus *ReturnStatus = NULL) const
bool checkArrayExist ( const MString attrName, MFnArrayAttrsData::Type &arrayType, MStatus *ReturnStatus = NULL)
MVectorArray vectorArray ( const MString attrName, MStatus *ReturnStatus = NULL )
MDoubleArray doubleArray ( const MString attrName, MStatus *ReturnStatus = NULL )
MIntArray intArray ( const MString attrName, MStatus *ReturnStatus = NULL )
MStringArray stringArray ( const MString attrName, MStatus *ReturnStatus = NULL )
MObject create ( MStatus *ReturnStatus = NULL )
MVectorArray getVectorData ( const MString attrName, MStatus *ReturnStatus = NULL)
MDoubleArray getDoubleData ( const MString attrName, MStatus *ReturnStatus = NULL)
MIntArray getIntData ( const MString attrName, MStatus *ReturnStatus = NULL)
MStringArray getStringData ( const MString attrName, MStatus *ReturnStatus = NULL)
public
NO SCRIPT SUPPORT
MFnArrayAttrsData ( const MObject & object, MStatus * ReturnStatus = NULL )

Inherited from MFnData:

public members:

enum Type
kInvalid
kNumeric
Numeric, use MFnNumericData extract the node data.
kPlugin
Plugin Blind Data, use MFnPluginData to extract the node data.
kPluginGeometry
Plugin Geometry, use MFnGeometryData to extract the node data.
kString
String, use MFnStringData to extract the node data.
kMatrix
Matrix, use MFnMatrixData to extract the node data.
kStringArray
String Array, use MFnStringArrayData to extract the node data.
kDoubleArray
Double Array, use MFnDoubleArrayData to extract the node data.
kIntArray
Int Array, use MFnIntArrayData to extract the node data.
kPointArray
Point Array, use MFnPointArrayData to extract the node data.
kVectorArray
Vector Array, use MFnVectorArrayData to extract the node data.
kComponentList
Component List, use MFnComponentListData to extract the node data.
kMesh
Mesh, use MFnMeshData to extract the node data.
kLattice
Lattice, use MFnLatticeData to extract the node data.
kNurbsCurve
Nurbs Curve, use MFnNurbsCurveData to extract the node data.
kNurbsSurface
Nurbs Surface, use MFnNurbsSurfaceData to extract the node data.
kSphere
Sphere, use MFnSphereData to extract the node data.
kDynArrayAttrs
ArrayAttrs, use MFnArrayAttrsData to extract the node data.
kDynSweptGeometry
SweptGeometry, use MFnDynSweptGeometryData to extract the node data.
kSubdSurface
Subdivision Surface, use MFnSubdData to extract the node data.
kNObject
nObject data, use MFnNObjectData to extract node data
kLast

Inherited from MFnBase:

public members:

virtual MFn::Type type () const
bool hasObj ( MFn::Type ) const
bool hasObj ( const MObject & ) const
MObject object ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( MObject & object )
virtual MStatus setObject ( const MObject & object )

Documentation

Function set for multiple arrays of attributes for dependency node data.

Description

MFnArrayAttrsData allows the creation and manipulation of multiple arrays of attributes as a data object over a single connection for use as dependency graph data.

If a user written dependency node either accepts or produces MFnArrayAttrsData, then this class is used to extract or create the data that comes from or goes to other dependency graph nodes. The MDataHandle::type method will return kDynArrayAttrsData when data of this type is present. To access it, the MDataHandle::data() method is used to get an MObject for the data and this should then be used to initialize an instance of MFnArrayAttrsData.

NOTE: these data attributes are not storable.

Functions

MFnArrayAttrsData:: MFnArrayAttrsData ()

Description

Default class constructor. The function set is not attached to an MObject.

MFnArrayAttrsData:: MFnArrayAttrsData ( MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the MObject to attach the function set to
  • ReturnStatus the return status
    • 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

MFnArrayAttrsData:: MFnArrayAttrsData ( const MObject & object, MStatus * ReturnStatus )

Description

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

Arguments

  • object the const MObject to attach the function set to
  • ReturnStatus the return status
    • 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

MFnArrayAttrsData:: ~MFnArrayAttrsData ()

Description

The class destructor.

MFn::Type MFnArrayAttrsData:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kDynArrayAttrsData

MStatus MFnArrayAttrsData:: clear ()

Description

Clear the contents of all of the arrays.

Return Value

  • kSuccess operation successful
  • kFailure MS::kFailure if the instance is not attached to an MObject

unsigned int MFnArrayAttrsData:: count () const

Description

Returns the number of attribute arrays.

Return Value

  • the number or arrays

MStringArray MFnArrayAttrsData:: list ( MStatus *ReturnStatus ) const

Description

Returns a list of names for the attribute arrays.

Return Value

  • a list of all the names of all the arrays stored in the data.

bool MFnArrayAttrsData:: checkArrayExist ( const MString name, MFnArrayAttrsData::Type &arrayType, MStatus *ReturnStatus)

Description

Check if the attribute array related to the given name has been created. If the named array exists return true and the array data type.

Arguments

  • name the name of the array to check
  • arrayType the type of the array to extract
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • true if the array exists and false otherwise.

MVectorArray MFnArrayAttrsData:: vectorArray ( const MString name, MStatus *ReturnStatus )

Description

Return an MVectorArray containing the vector array currently operated upon by the function set. The MVectorArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MVectorArray held in this instance

MDoubleArray MFnArrayAttrsData:: doubleArray ( const MString name, MStatus * ReturnStatus )
Description

Return an MDoubleArray containing the double array currently operated upon by the function set. The MDoubleArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MDoubleArray held in this instance

MIntArray MFnArrayAttrsData:: intArray ( const MString name, MStatus * ReturnStatus )
Description

Return an MIntArray containing the int array currently operated upon by the function set. The MIntArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MIntArray held in this instance

MStringArray MFnArrayAttrsData:: stringArray ( const MString name, MStatus * ReturnStatus )
Description

Return an MStringArray containing the string array currently operated upon by the function set. The MStringArray returned by this method is editable, so any changes to the return instance also affects the MObject operated upon by this function set. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MStringArray held in this instance

MObject MFnArrayAttrsData:: create ( MStatus * ReturnStatus )

Description

Create a new MObject, attach it to this instance, and initialize it to be empty.

Arguments

  • ReturnStatus kSuccess

Return Value

  • the newly created MObject

MVectorArray MFnArrayAttrsData:: getVectorData ( const MString attrName, MStatus *ReturnStatus )

Description

Return an MVectorArray containing the vector array currently operated upon by the function set. The MVectorArray returned by this method is read only. If the array did not exist it will be created.

Arguments

  • name the name of the array to read
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MVectorArray held in this instance

MDoubleArray MFnArrayAttrsData:: getDoubleData ( const MString attrName, MStatus *ReturnStatus )
Description

Return an MDoubleArray containing the double array currently operated upon by the function set. The MDoubleArray returned by this method is read only. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MDoubleArray held in this instance

MIntArray MFnArrayAttrsData:: getIntData ( const MString attrName, MStatus *ReturnStatus )
Description

Return an MIntArray containing the int array currently operated upon by the function set. The MIntArray returned by this method is read only. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MIntArray held in this instance

MStringArray MFnArrayAttrsData:: getStringData ( const MString attrName, MStatus *ReturnStatus )
Description

Return an MStringArray containing the string array currently operated upon by the function set. The MStringArray returned by this method is read only. If the array did not exist it will be created.

Arguments

  • name the name of the array to edit or create.
  • ReturnStatus kFailure if the instance is not attached to an MObject, and kSuccess otherwise.

Return Value

  • a copy of the MStringArray held in this instance

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright