MFnGeometryFilter Class Reference
[OpenMayaAnim - API module for animationFunctionSet classes]

#include <MFnGeometryFilter.h>
Inheritance diagram for MFnGeometryFilter:
Inheritance graph
[legend]
Collaboration diagram for MFnGeometryFilter:
Collaboration graph
[legend]

List of all members.


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.


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
MStatus  getOutputGeometry (MObjectArray &objects) const
MObject  inputShapeAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const
MObject  outputShapeAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const
unsigned int  indexForOutputShape (const MObject &shape, MStatus *ReturnStatus=NULL) const
MStatus  getPathAtIndex (unsigned int index, MDagPath &path) const
unsigned int  indexForGroupId (unsigned int groupId, MStatus *ReturnStatus=NULL) const
unsigned int  groupIdAtIndex (unsigned int index, MStatus *ReturnStatus=NULL) const
unsigned int  numOutputConnections (MStatus *ReturnStatus=NULL) const
unsigned int  indexForOutputConnection (unsigned int connectionIndex, MStatus *ReturnStatus=NULL) const
MObject  deformerSet (MStatus *ReturnStatus=NULL) const
float  envelope (MStatus *ReturnStatus=NULL) const
MStatus  setEnvelope (float envelope)
  MFnGeometryFilter (const MObject &object, MStatus *ReturnStatus=NULL)
  Constructor.

Protected Member Functions

virtual const char *  className () const
  Class name.

Constructor & Destructor Documentation

MFnGeometryFilter::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:

MFnGeometryFilter::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:

Member Function Documentation

MFn::Type MFnGeometryFilter::type (  )  const [virtual]

Function set type.

Return the class type : MFn::kGeometryFilt

Reimplemented from MFnDependencyNode.

Reimplemented in MFnSkinCluster, and MFnWeightGeometryFilter.

MStatus MFnGeometryFilter::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.

Parameters:
[out]  geomList  storage for the returned array
Returns:

MStatus MFnGeometryFilter::getOutputGeometry ( MObjectArray geomList  )  const

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:

MObject MFnGeometryFilter::inputShapeAtIndex ( unsigned int  index,
MStatus ReturnStatus = NULL  
) const

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:

MObject MFnGeometryFilter::outputShapeAtIndex ( unsigned int  index,
MStatus ReturnStatus = NULL  
) const

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:

unsigned int MFnGeometryFilter::indexForOutputShape ( const MObject shape,
MStatus ReturnStatus = NULL  
) const

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:

MStatus MFnGeometryFilter::getPathAtIndex ( unsigned int  index,
MDagPath dagPath  
) const

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:

unsigned int MFnGeometryFilter::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.

Parameters:
[in]  groupId  the groupId for the plug index
[out]  ReturnStatus  return status
Returns:
The plug index corresponding to the groupId
Status Codes:

unsigned int MFnGeometryFilter::groupIdAtIndex ( unsigned int  index,
MStatus ReturnStatus = NULL  
) const

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:

unsigned int MFnGeometryFilter::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
        }
Parameters:
[out]  ReturnStatus  return status
Returns:
The number of outputs
Status Codes:

unsigned int MFnGeometryFilter::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.

Parameters:
[in]  connectionIndex  the connection index
[out]  ReturnStatus  return status
Returns:
The plug index corresponding to the connection index
Status Codes:

MObject MFnGeometryFilter::deformerSet ( MStatus ReturnStatus = NULL  )  const

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:

float MFnGeometryFilter::envelope ( MStatus ReturnStatus = NULL  )  const

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:

MStatus MFnGeometryFilter::setEnvelope ( float  envelope  ) 

Sets the envelope value.

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

Parameters:
[in]  envelope  envelope value
Returns:

Autodesk® Maya® 2011 © 1997-2010 Autodesk, Inc. All rights reserved. Generated with doxygen 1.5.6