class MFnGeometryFilter

Jump to documentation

: public MFnDependencyNode geometry filter function set (OpenMayaAnim) (OpenMayaAnim.py)

Inheritance:

MFnGeometryFilter < MFnDependencyNode < MFnBase

public members:

MFnGeometryFilter ()
MFnGeometryFilter ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnGeometryFilter ()
virtual MFn::Type type () const
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 )

Inherited from MFnDependencyNode:

public members:

virtual MFn::Type type () const
enum MAttrClass
kGlobalDynamicAttr
kLocalDynamicAttr
MObject create ( const MTypeId & typeId , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId & typeId , const MString & name , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , MStatus * ReturnStatus = NULL )
MObject create ( const MString & type , const MString & name , MStatus * ReturnStatus = NULL )
MTypeId typeId ( MStatus * ReturnStatus = NULL ) const
MString typeName ( MStatus * ReturnStatus = NULL ) const
MString name ( MStatus * ReturnStatus = NULL ) const
MString setName ( const MString & name , MStatus * ReturnStatus = NULL )
MStatus getConnections ( MPlugArray & array ) const
unsigned int attributeCount ( MStatus * ReturnStatus=NULL) const
MObject attribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject reorderedAttribute ( unsigned int index, MStatus * ReturnStatus=NULL) const
MObject attribute ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MAttrClass attributeClass ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MStatus getAffectedAttributes ( const MObject & attr, MObjectArray & affectedAttributes ) const
MStatus getAffectedByAttributes ( const MObject & attr, MObjectArray & affectedByAttributes ) const
MPlug findPlug ( const MObject & attr, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, bool wantNetworkedPlug, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MObject & attr, MStatus * ReturnStatus=NULL) const
MPlug findPlug ( const MString & attrName, MStatus * ReturnStatus=NULL) const
MStatus addAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MStatus removeAttribute ( const MObject & attr, MAttrClass type = kLocalDynamicAttr )
MPxNode * userNode ( MStatus * ReturnStatus=NULL ) const
bool isFromReferencedFile ( MStatus * ReturnStatus=NULL) const
bool isShared ( MStatus * ReturnStatus=NULL) const
bool hasUniqueName ( MStatus * ReturnStatus=NULL) const
MString parentNamespace ( MStatus * ReturnStatus=NULL) const
bool isLocked ( MStatus * ReturnStatus=NULL) const
MStatus setLocked ( bool locked )
static MString classification ( const MString & nodeTypeName )
bool isNewAttribute ( const MObject & attr, MStatus * ReturnStatus=NULL) const
static unsigned int allocateFlag ( const MString pluginName, MStatus * ReturnStatus=NULL )
static MStatus deallocateFlag (const MString pluginName, unsigned int flag)
static MStatus deallocateAllFlags (const MString pluginName)
MStatus setFlag (unsigned int flag, bool state)
bool isFlagSet (unsigned int flag, MStatus * ReturnStatus=NULL) const
bool isDefaultNode ( MStatus * ReturnStatus=NULL) const
MStatus setDoNotWrite ( bool flag )
bool canBeWritten ( MStatus * ReturnStatus=NULL) const
bool hasAttribute (const MString & name , MStatus * ReturnStatus=NULL) const
MObject getAliasAttr (bool force, MStatus * ReturnStatus=NULL)
bool setAlias (const MString & alias,const MString & name , const MPlug & plug, bool add=true, MStatus * ReturnStatus=NULL)
bool findAlias (const MString & alias, MObject & attrObj, MStatus * ReturnStatus=NULL) const
bool getAliasList ( MStringArray & strArray, MStatus * ReturnStatus=NULL)
MString plugsAlias (const MPlug & plug, MStatus * ReturnStatus=NULL)
public
bool getPlugsAlias (const MPlug & plug, MString & aliasName, MStatus * ReturnStatus=NULL)

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

MFnGeometryFilter is the function set for deformers.
Description

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.

Functions

MFnGeometryFilter:: MFnGeometryFilter ()

Description

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

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

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

MFnGeometryFilter:: ~MFnGeometryFilter ()

Description

The class destructor.

MFn::Type MFnGeometryFilter:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kGeometryFilt

MStatus MFnGeometryFilter:: getInputGeometry ( MObjectArray &geomList) const

Description

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.

Arguments

  • objects storage for the returned array

Return Value

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

MStatus MFnGeometryFilter:: getOutputGeometry ( MObjectArray &geomList) const

Description

The output geometry is packed into the provided list of MObjects. Each of the MObjects will be a DAG node.

Arguments

  • objects storage for the returned array

Return Value

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

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

Description

Returns the input shape corresponding to the plug index.

Arguments

  • index the plug index for the input shape
  • ReturnStatus return status

Return Value

  • the input shape corresponding to the plug index

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

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

Description

Returns the output shape corresponding to the plug index

Arguments

  • index the plug index for the output shape
  • ReturnStatus return status

Return Value

  • the output shape corresponding to the plug index

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

unsigned int MFnGeometryFilter:: indexForOutputShape (const MObject &shape, MStatus *ReturnStatus) const

Description

Returns the plug index for the specified output shape.

Arguments

  • shape the shape for which the plug index is requested
  • ReturnStatus return status

Return Value

  • 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 MFnGeometryFilter:: getPathAtIndex (unsigned int index, MDagPath &dagPath) const

Description

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

Arguments

  • index the plug index
  • shape the DAG path whose index is requested

Return Value

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

unsigned int MFnGeometryFilter:: indexForGroupId (unsigned int groupId, MStatus *ReturnStatus) const

Description

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.

Arguments

  • groupId the groupId for the plug index
  • ReturnStatus return status

Return Value

  • the plug index corresponding to the groupId

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

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

Description

Returns the groupId at the specified plug index.

Arguments

  • index the plug index for which the groupId is requested
  • ReturnStatus return status

Return Value

  • the groupId at the specified index

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

unsigned int MFnGeometryFilter:: numOutputConnections ( MStatus *ReturnStatus) const

Description

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
	}
	

Arguments

  • ReturnStatus return status

Return Value

  • the number of outputs

Status Codes

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

unsigned int MFnGeometryFilter:: indexForOutputConnection ( unsigned int connectionIndex, MStatus *ReturnStatus) const

Description

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.

Arguments

  • connectionIndex the connection index
  • ReturnStatus return status

Return Value

  • the plug index corresponding to the connection index

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MObject MFnGeometryFilter:: deformerSet ( MStatus *ReturnStatus) const

Description

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.

Arguments

  • ReturnStatus return status

Return Value

  • the set containing the objects that are deformed

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

float MFnGeometryFilter:: envelope ( MStatus *ReturnStatus) const

Description

Returns the envelope value.

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

Arguments

  • ReturnStatus return status

Return Value

  • the envelope value

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

MStatus MFnGeometryFilter:: setEnvelope (float envelope )

Description

Sets the envelope value.

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

Arguments

  • envelope envelope value

Return Value

  • MS::kSuccess operation successful
  • MS::kFailure operation failed

Direct child classes:

- MFnWeightGeometryFilter
- MFnSkinCluster

Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright