#include
<MFnComponent.h>
This is the base class for all function sets which deal with component objects.
Components are MObjects which hold index information for shapes. The component object does not contain any information about the shape, it just contains index values and type information.
Components can be marked as complete meaning that the component represents a complete set of indices from 0 to numElements-1;
Components come is 3 varieties based upon the dimensions of the index. The types are single, double, and triple indexed. Examples of these types are mesh vertices (single indexed), nurbs surface CVs (double indexed), and lattice points (triple indexed).
To create, edit, or query a specific type of component, use the derived classes MFnSingleIndexedComponent, MFnDoubleIndexedComponent, and MFnTripleIndexedComponent.
Public Member Functions |
|
virtual MFn::Type | type () const |
Function set type. |
|
virtual | ~MFnComponent () |
Destructor. |
|
MFnComponent (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MFnComponent () | |
int | elementCount (MStatus *ReturnStatus=NULL) |
MFn::Type | componentType (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) |
bool | hasWeights () const |
MWeight | weight (int index, MStatus *ReturnStatus=NULL) const |
MFnComponent (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MFn::Type | type (MStatus *ReturnStatus=NULL) |
Obsolete & no script support. |
|
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFnComponent::MFnComponent | ( | ) |
Default class constructor
Constructor.
Class constructor that initializes the function set to the given MObject.
[in] | object | The MObject to attach the function set to |
[out] | ReturnStatus | the return status |
MFn::Type MFnComponent::type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kComponent
Reimplemented from MFnBase.
Reimplemented in MFnDoubleIndexedComponent, MFnSingleIndexedComponent, MFnTripleIndexedComponent, and MFnUint64SingleIndexedComponent.
const char * MFnComponent::className | ( | ) | const [protected, virtual] |
Class name.
Return the class name : "MFnComponent"
Reimplemented from MFnBase.
Reimplemented in MFnDoubleIndexedComponent, MFnSingleIndexedComponent, MFnTripleIndexedComponent, and MFnUint64SingleIndexedComponent.
int MFnComponent::elementCount | ( | MStatus * | ReturnStatus =
NULL |
) |
Returns the number of elements that this component contains.
[out] | ReturnStatus | Status code |
Returns the MFn type of the component.
[out] | ReturnStatus | Status code |
bool MFnComponent::isEmpty | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Determines if this component is empty, i.e. there are no index elements.
[out] | ReturnStatus | Status code |
Compares this component with the given component.
[in] | component | component to compare |
[out] | ReturnStatus | Status code |
bool MFnComponent::isComplete | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the complete state of the component.
Components can be marked as complete meaning that the component represents a complete set of indices from 0 to numElements-1;
[out] | ReturnStatus | Status code |
MStatus MFnComponent::setComplete | ( | bool | complete | ) |
Sets the complete state of the component.
Components can be marked as complete meaning that the component represents a complete set of indices from 0 to numElements-1;
Important: if the component is set as complete, setCompleteData must also be called with the appropriate parameter (the total number of elements in the object). Note that setCompleteData(...) also sets the component as complete, thus 'setComplete(true)' may never need to appear in your code.
setCompleteData(...) is defined in derived classes.
[in] | complete | true sets the component as complete |
bool MFnComponent::hasWeights | ( | ) | const |
Query this component for the existance of attached weight data. Weight data will be added to a component as part of soft selection and/or symmetry. Note that this method does not test for the existance of external weight information (e.g. deformer weights stored in separate attributes).
Return the weight data for a given element within this component. Note that this method does not return external weight data (e.g. deformer weights stored in separate attributes).
[in] | index | The element to return weight data for (note that this is the linear index between 0 and elementCount()) |
[out] | ReturnStatus | Status code |
Obsolete & no script support.
This method is obsolete. This method is not available in Python.
[out] | ReturnStatus | Return status. |
Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. | Generated with 1.5.6 |