class MFnSingleIndexedComponent

Jump to documentation

: public MFnComponent Single indexed component function set

Inheritance:

MFnSingleIndexedComponent < MFnComponent < MFnBase

public members:

MFnSingleIndexedComponent ()
MFnSingleIndexedComponent ( MObject & object, MStatus * ReturnStatus = NULL )
MFnSingleIndexedComponent ( const MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnSingleIndexedComponent ()
virtual MFn::Type type () const
MObject create ( MFn::Type compType, MStatus * ReturnStatus = NULL )
MStatus addElement ( int element )
MStatus addElements ( MIntArray & elements )
int element ( int index, MStatus * ReturnStatus = NULL ) const
MStatus getElements ( MIntArray & elements ) const
MStatus setCompleteData ( int numElements )
MStatus getCompleteData ( int & numElements ) const

Inherited from MFnComponent:

public members:

int elementCount ( MStatus * ReturnStatus = NULL )
MFn::Type type ( MStatus * ReturnStatus = NULL )
bool isEmpty ( MStatus * ReturnStatus = NULL ) const
bool isEqual ( MObject &, MStatus * ReturnStatus = NULL ) const
bool isComplete ( MStatus * ReturnStatus = NULL ) const
MStatus setComplete ( bool )

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

Single indexed component function set
Description

This function set allows you to create, edit, and query single indexed components. Single indexed components store 1 dimensional index values.

Functions

MFnSingleIndexedComponent:: MFnSingleIndexedComponent ()

Description

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

MFnSingleIndexedComponent:: MFnSingleIndexedComponent ( 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

MFnSingleIndexedComponent:: MFnSingleIndexedComponent ( 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

MFnSingleIndexedComponent:: ~MFnSingleIndexedComponent ()

Description

The class destructor.

MFn::Type MFnSingleIndexedComponent:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kSingleIndexedComponent

MObject MFnSingleIndexedComponent:: create ( MFn::Type compType, MStatus * ReturnStatus )

Description

Create a single indexed component of the given type. Allowable types are

MFn::kCurveCVComponent MFn::kCurveEPComponent MFn::kCurveKnotComponent MFn::kMeshEdgeComponent MFn::kMeshPolygonComponent MFn::kMeshVertComponent MFn::kMeshMapComponent

Arguments

  • compType the type of component to create
  • ReturnStatus status code

Return Value

  • the new component

Status Codes

  • MS::kSuccess the method was successful.
  • MS::kInvalidParameter invalid component type

MStatus MFnSingleIndexedComponent:: addElement ( int element )

Description

Add the specified element to the component.

Arguments

  • element the element index to be added

Return Value

  • status code

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

MStatus MFnSingleIndexedComponent:: addElements ( MIntArray & elements )

Description

Add the specified elements to the component.

Arguments

  • elements the array of element indices to be added

Return Value

  • status code

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

int MFnSingleIndexedComponent:: element ( int index, MStatus * ReturnStatus ) const

Description

Returns the specified element from the component.

Arguments

  • index the index of the element to retrieve
  • ReturnStatus status code

Return Value

  • the index of the specified component

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

MStatus MFnSingleIndexedComponent:: getElements ( MIntArray & elements ) const

Description

Get all of the element indices from the component.

Arguments

  • elements storage for the array of indices

Return Value

  • status code

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

MStatus MFnSingleIndexedComponent:: setCompleteData ( int numElements )

Description

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)).

Arguments

  • numElements the maximum number of elements in the component

Return Value

  • status code

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

MStatus MFnSingleIndexedComponent:: getCompleteData ( int & numElements ) const

Description

Returns the number of elements for the complete component. A complete component means that all elements are selected.

Arguments

  • numElements storage for the maximum number of elements

Return Value

  • status code

Status Codes

  • MS::kSuccess the method was successful
  • MS::kFailure an object error has occurred

This class has no child classes.


Autodesk® Maya® 8.0 © 1997-2006 Autodesk, Inc. All rights reserved. doc++ Copyright