- Main Page
- Related Pages
- Modules
- Classes
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions

# MFnGeometryFilter Class Reference
OpenMayaAnim - API module for animation | FunctionSet classes

Search for all occurrences

## Detailed Description

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>`

Inheritance diagram for MFnGeometryFilter:
[legend]

List of all members.

## 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. Search for all occurrences

## Constructor & Destructor Documentation

MFnGeometryFilter | ( | MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

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

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the 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

MFnGeometryFilter | ( | const MObject & | object,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  |

Constructor.

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

Parameters:

  [in] | object | The MObject to attach the function set to
  [out] | ReturnStatus | the 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]`

Search for all occurrences

Function set type.

Return the class type : MFn::kGeometryFilt.

Reimplemented from MFnDependencyNode.

Reimplemented in MFnSkinCluster, and MFnWeightGeometryFilter.

MStatus getInputGeometry | ( | MObjectArray & | geomList | ) | const

Search for all occurrences

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.

Parameters:

  [out] | geomList | storage for the returned array

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object
  - MS::kInsufficientMemory out of memory

MStatus getOutputGeometry | ( | MObjectArray & | geomList | ) | const

Search for all occurrences

The output geometry is packed into the provided list of MObjects.

Each of the MObjects will be a DAG node.

Parameters:

  [out] | geomList | storage for the returned array

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object
  - MS::kInsufficientMemory out of memory

MObject inputShapeAtIndex | ( | unsigned int | index,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the input shape corresponding to the plug index.

Parameters:

  [in] | index | the plug index for the input shape
  [out] | ReturnStatus | return status

Returns:
  The input shape corresponding to the plug index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MObject outputShapeAtIndex | ( | unsigned int | index,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the output shape corresponding to the plug index.

Parameters:

  [in] | index | the plug index for the output shape
  [out] | ReturnStatus | return status

Returns:
  The output shape corresponding to the plug index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int indexForOutputShape | ( | const MObject & | shape,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the plug index for the specified output shape.

Parameters:

  [in] | shape | the shape for which the plug index is requested
  [out] | ReturnStatus | return status

Returns:
  The plug index leading to the specified shape

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed
  - MS::kInvalidParameter shape parameter is invalid

MStatus getPathAtIndex | ( | unsigned int | index,
|  | MDagPath & | dagPath
| ) |  | const

Search for all occurrences

The DAG path of the output geometry at the specified plug index is put in the dagPath argument.

Parameters:

  [in] | index | the plug index
  [out] | dagPath | the DAG path whose index is requested

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object

unsigned int indexForGroupId | ( | unsigned int | groupId,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

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.

Parameters:

  [in] | groupId | the groupId for the plug index
  [out] | ReturnStatus | return status

Returns:
  The plug index corresponding to the groupId

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int groupIdAtIndex | ( | unsigned int | index,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

Returns the groupId at the specified plug index.

Parameters:

  [in] | index | the plug index for which the groupId is requested
  [out] | ReturnStatus | return status

Returns:
  The groupId at the specified index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

unsigned int numOutputConnections | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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
        }

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The number of outputs

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure function set does not have a valid object

unsigned int indexForOutputConnection | ( | unsigned int | connectionIndex,
|  | MStatus * | ReturnStatus = `NULL`
| ) |  | const

Search for all occurrences

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.

Parameters:

  [in] | connectionIndex | the connection index
  [out] | ReturnStatus | return status

Returns:
  The plug index corresponding to the connection index

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MObject deformerSet | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

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.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The set containing the objects that are deformed

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

float envelope | ( | MStatus * | ReturnStatus = `NULL` | ) | const

Search for all occurrences

Returns the envelope value.

The envelope is a global scale factor that is applied to all the values.

Parameters:

  [out] | ReturnStatus | return status

Returns:
  The envelope value

Status Codes:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MStatus setEnvelope | ( | float | envelope | ) |

Search for all occurrences

Sets the envelope value.

The envelope is a global scale factor that is applied to all the values.

Parameters:

  [in] | envelope | envelope value

Returns:
  - MS::kSuccess operation successful
  - MS::kFailure operation failed

MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter
MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter MFnGeometryFilter