geometry filter function set
MFnGeometryFilter is the function set for geometry filters, the node that is the base class for deformers. Geometry filter nodes include clusters, ffds, nonlinears, user-defined deformers, sculpts, wires and blendShapes. The purpose of the geometry filter is to connect to the geometry that is deformed. The geometry filter is independent of any algorithm that calculates the deformation.
This function set provides methods for finding out which geometries are connected to geometry filter nodes.
#include <MFnGeometryFilter.h>
Public Member Functions |
|
virtual MFn::Type | type () const |
Function set type. |
|
virtual | ~MFnGeometryFilter () |
Destructor. |
|
MFnGeometryFilter () | |
Default constructor. |
|
MFnGeometryFilter (MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
MStatus | getInputGeometry (MObjectArray &objects) const |
This method returns the input geometry for
the deformer by traversing the graph to find upstream shape nodes.
|
|
MStatus | getOutputGeometry (MObjectArray &objects) const |
The output geometry is packed into the
provided list of MObjects. |
|
MObject | inputShapeAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const |
Returns the input shape corresponding to the
plug index. |
|
MObject | outputShapeAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const |
Returns the output shape corresponding to
the plug index. |
|
unsigned int | indexForOutputShape (const MObject &shape, MStatus *ReturnStatus=NULL) const |
Returns the plug index for the specified
output shape. |
|
MStatus | getPathAtIndex (unsigned int index, MDagPath &path) const |
The DAG path of the output geometry at the
specified plug index is put in the dagPath argument. |
|
unsigned int | indexForGroupId (unsigned int groupId, MStatus *ReturnStatus=NULL) const |
Returns the plug index corresponding to the
groupId. |
|
unsigned int | groupIdAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const |
Returns the groupId at the specified plug
index. |
|
unsigned int | numOutputConnections (MStatus *ReturnStatus=NULL) const |
Returns the number of output geometries
connected to this node. |
|
unsigned int | indexForOutputConnection (unsigned int connectionIndex, MStatus *ReturnStatus=NULL) const |
Returns the plug index corresponding to the
connection index. |
|
MObject | deformerSet (MStatus *ReturnStatus=NULL) const |
Returns the set containing the objects that
are deformed. |
|
float | envelope (MStatus *ReturnStatus=NULL) const |
Returns the envelope value. |
|
MStatus | setEnvelope (float envelope) |
Sets the envelope value. |
|
MFnGeometryFilter (const MObject &object, MStatus *ReturnStatus=NULL) | |
Constructor. |
|
Protected Member Functions |
|
virtual const char * | className () const |
Class name. |
MFnGeometryFilter | ( | MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
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 |
MFnGeometryFilter | ( | const MObject & | object, |
MStatus * | ReturnStatus =
NULL |
||
) |
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 type | ( | ) | const [virtual] |
Function set type.
Return the class type : MFn::kGeometryFilt.
Reimplemented from MFnDependencyNode.
Reimplemented in MFnSkinCluster, and MFnWeightGeometryFilter.
MStatus getInputGeometry | ( | MObjectArray & | geomList | ) | const |
This method returns the input geometry for the deformer by traversing the graph to find upstream shape nodes.
It is possible for there to be nodes in between the shape and the deformer so that the returned shape may have a different topology or tweaks then the input data to the deformer. If the actual input geometry data for the deformer is required, this information can be accessed by using MPlug::getValue() to query the inputGeometry attribute on the deformer.
The input geometry is packed into the provided list of MObjects. Each of the MObjects will be a DAG node.
[out] | geomList | storage for the returned array |
MStatus getOutputGeometry | ( | MObjectArray & | geomList | ) | const |
The output geometry is packed into the provided list of MObjects.
Each of the MObjects will be a DAG node.
[out] | geomList | storage for the returned array |
Returns the input shape corresponding to the plug index.
[in] | index | the plug index for the input shape |
[out] | ReturnStatus | return status |
Returns the output shape corresponding to the plug index.
[in] | index | the plug index for the output shape |
[out] | ReturnStatus | return status |
Returns the plug index for the specified output shape.
[in] | shape | the shape for which the plug index is requested |
[out] | ReturnStatus | return status |
The DAG path of the output geometry at the specified plug index is put in the dagPath argument.
[in] | index | the plug index |
[out] | dagPath | the DAG path whose index is requested |
unsigned int indexForGroupId | ( | unsigned int | groupId, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the plug index corresponding to the groupId.
This ID can change from one Maya session to another, but it is unique for each Maya session.
[in] | groupId | the groupId for the plug index |
[out] | ReturnStatus | return status |
unsigned int groupIdAtIndex | ( | unsigned int | index, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the groupId at the specified plug index.
[in] | index | the plug index for which the groupId is requested |
[out] | ReturnStatus | return status |
unsigned int numOutputConnections | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the number of output geometries connected to this node.
This is typically equal to the number of input geometries unless an input or output geometry has been deleted, or a connection to an input or output geometry has been broken.
This method is useful in conjunction with indexForOutputConnection to iterate through the affected objects.
For example:
MFnGeometryFilter Fn(mObject); unsigned int numConnections = Fn.numOutputConnections(); for (unsigned int i = 0; i < numConnections; i++) { unsigned int plugIndex = Fn.indexForOutputConnection(i); // perform an operation on that plugIndex }
[out] | ReturnStatus | return status |
unsigned int indexForOutputConnection | ( | unsigned int | connectionIndex, |
MStatus * | ReturnStatus =
NULL |
||
) | const |
Returns the plug index corresponding to the connection index.
The connection index is the index specifying the nth output connection. The plug index (logical index) is the sparse array index used by many of MFnGeometryFilter's methods and in MEL scripts. The connection index is 0-based, hence, the maximum value of the connection index is numOutputs - 1.
[in] | connectionIndex | the connection index |
[out] | ReturnStatus | return status |
Returns the set containing the objects that are deformed.
Adding new components to the deformer set will cause them to be deformed. Removing components from the deformer set will prevent them from being influenced by the deformer.
Note that the wrap deformer and the skinCluster deformers are special cases. They allow only a single object to be deformed per wrap/skinCluster, so adding additional geometries to a wrap or skinCluster node will have no effect.
[out] | ReturnStatus | return status |
float envelope | ( | MStatus * | ReturnStatus =
NULL |
) | const |
Returns the envelope value.
The envelope is a global scale factor that is applied to all the values.
[out] | ReturnStatus | return status |
MStatus setEnvelope | ( | float | envelope | ) |
Sets the envelope value.
The envelope is a global scale factor that is applied to all the values.
[in] | envelope | envelope value |