C++ API Reference
MFnTripleIndexedComponent Class Reference

Triple indexed component function set. More...

#include <MFnTripleIndexedComponent.h>

+ Inheritance diagram for MFnTripleIndexedComponent:

Public Member Functions

virtual MFn::Type type () const
 Function set type. More...
 
virtual ~MFnTripleIndexedComponent ()
 Destructor.
 
 MFnTripleIndexedComponent ()
 Default constructor.
 
 MFnTripleIndexedComponent (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
MObject create (MFn::Type compType, MStatus *ReturnStatus=NULL)
 Create a triple indexed component of the given type. More...
 
MStatus addElement (int sIndex, int tIndex, int uIndex)
 Add the specified element to the component. More...
 
MStatus addElements (const MIntArray &sIndexArray, const MIntArray &tIndexArray, const MIntArray &uIndexArray)
 Add the specified elements to the component. More...
 
MStatus getElement (int index, int &sIndex, int &tIndex, int &uIndex) const
 Get the specified element from the component. More...
 
MStatus getElements (MIntArray &sIndexArray, MIntArray &tIndexArray, MIntArray &uIndexArray) const
 Get all of the element indices from the component. More...
 
MStatus setCompleteData (int maxS, int maxT, int maxU)
 Marks the component as complete (meaning all items are selected) and uses the argument to identify the total number of elements selected. More...
 
MStatus getCompleteData (int &maxS, int &maxT, int &maxU) const
 Returns the number of elements for the complete component. More...
 
 MFnTripleIndexedComponent (const MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
- Public Member Functions inherited from MFnComponent
virtual ~MFnComponent ()
 Destructor.
 
 MFnComponent (MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
 MFnComponent ()
 Default class constructor.
 
int elementCount (MStatus *ReturnStatus=NULL) const
 Returns the number of elements that this component contains. More...
 
MFn::Type componentType (MStatus *ReturnStatus=NULL) const
 Returns the MFn type of the component. More...
 
bool isEmpty (MStatus *ReturnStatus=NULL) const
 Determines if this component is empty, i.e. More...
 
bool isEqual (MObject &, MStatus *ReturnStatus=NULL) const
 Compares this component with the given component. More...
 
bool isComplete (MStatus *ReturnStatus=NULL) const
 Returns the complete state of the component. More...
 
MStatus setComplete (bool)
 Sets the complete state of the component. More...
 
bool hasWeights () const
 Query this component for the existance of attached weight data. More...
 
MWeight weight (int index, MStatus *ReturnStatus=NULL) const
 Return the weight data for a given element within this component. More...
 
MStatus setWeight (int index, const MWeight &weight)
 Set the weight data for a given element within this component. More...
 
MStatus setWeights (const MWeight &weight)
 Set the weight data for all elements within this component. More...
 
 MFnComponent (const MObject &object, MStatus *ReturnStatus=NULL)
 Constructor. More...
 
MFn::Type type (MStatus *ReturnStatus=NULL)
 This method is obsolete. 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=nullptr) 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 MFnComponent
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

Triple indexed component function set.

This function set allows you to create, edit, and query triple indexed components. Triple indexed components store 3 dimensional index values.

Examples:
customComponentTagNode/customComponentTagNode.cpp, and listRichSelectionCmd/listRichSelectionCmd.cpp.

Constructor & Destructor Documentation

MFnTripleIndexedComponent ( 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
MFnTripleIndexedComponent ( 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

MFn::Type type ( ) const
virtual

Function set type.

Return the class type : MFn::kTripleIndexedComponent.

Returns
the class type.

Reimplemented from MFnComponent.

OPENMAYA_MAJOR_NAMESPACE_OPEN const char * className ( )
static

Returns the name of this class.

Return the class name : "MFnTripleIndexedComponent".

Returns
Name of this class.
MObject create ( MFn::Type  compType,
MStatus ReturnStatus = NULL 
)

Create a triple indexed component of the given type.

Allowable types are

MFn::kLatticeComponent

Parameters
[in]compTypethe type of component to create
[out]ReturnStatusstatus code
Returns
The new component
Status Codes:
  • MS::kSuccess the method was successful.
  • MS::kInvalidParameter invalid component type
Examples:
customComponentTagNode/customComponentTagNode.cpp.
MStatus addElement ( int  sIndex,
int  tIndex,
int  uIndex 
)

Add the specified element to the component.

Parameters
[in]sIndexthe s index to add
[in]tIndexthe t index to add
[in]uIndexthe u index to add
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred
Examples:
customComponentTagNode/customComponentTagNode.cpp.
MStatus addElements ( const MIntArray sIndices,
const MIntArray tIndices,
const MIntArray uIndices 
)

Add the specified elements to the component.

Parameters
[in]sIndicesthe array of s indices to be added
[in]tIndicesthe array of t indices to be added
[in]uIndicesthe array of u indices to be added
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred
MStatus getElement ( int  index,
int &  sIndex,
int &  tIndex,
int &  uIndex 
) const

Get the specified element from the component.

Parameters
[in]indexthe index of the element to retrieve
[out]sIndexthe s index of the component
[out]tIndexthe t index of the component
[out]uIndexthe u index of the component
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred
MStatus getElements ( MIntArray sIndices,
MIntArray tIndices,
MIntArray uIndices 
) const

Get all of the element indices from the component.

Parameters
[out]sIndicesstorage for the array of s indices
[out]tIndicesstorage for the array of t indices
[out]uIndicesstorage for the array of u indices
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred
MStatus setCompleteData ( int  maxS,
int  maxT,
int  maxU 
)

Marks the component as complete (meaning all items are selected) and uses the argument to identify the total number of elements selected.

If the component should contain N element indices, then the range would be [0,N-1].

Also sets the complete state of the component to 'true' (i.e. setComplete(true)).

Parameters
[in]maxSthe maximum number of S elements
[in]maxTthe maximum number of T elements
[in]maxUthe maximum number of U elements
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred
MStatus getCompleteData ( int &  maxS,
int &  maxT,
int &  maxU 
) const

Returns the number of elements for the complete component.

A complete component means that all elements are selected.

Parameters
[out]maxSstorage for the maximum number of S elements
[out]maxTstorage for the maximum number of T elements
[out]maxUstorage for the maximum number of U elements
Returns
Status code
Status Codes:
  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

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