class MFnWireDeformer

Jump to documentation

: public MFnDependencyNode wire deformer function set (OpenMayaAnim) (OpenMayaAnim.py)

Inheritance:

MFnWireDeformer < MFnDependencyNode < MFnBase

public members:

MFnWireDeformer ()
MFnWireDeformer ( MObject & object, MStatus * ReturnStatus = NULL )
virtual ~MFnWireDeformer ()
virtual MFn::Type type () const
MObject create ( MStatus * ReturnStatus = NULL )
MStatus addGeometry ( const MObject & object )
MStatus removeGeometry ( const MObject & object )
MStatus getAffectedGeometry ( MObjectArray & objects )
unsigned int numWires ( MStatus * ReturnStatus = NULL ) const
MStatus addWire ( const MObject & object )
MObject wire ( unsigned int wireIndex, MStatus * ReturnStatus = NULL )
float wireDropOffDistance ( unsigned int wireIndex, MStatus * ReturnStatus = NULL ) const
MStatus setWireDropOffDistance ( unsigned int wireIndex, float dropOff )
float wireScale ( unsigned int wireIndex, MStatus * ReturnStatus = NULL ) const
MStatus setWireScale ( unsigned int wireIndex, float scale )
MObject holdingShape ( unsigned int wireIndex, MStatus * ReturnStatus = NULL ) const
MStatus setHoldingShape ( unsigned int wireIndex, MObject holdingCurve )
float envelope ( MStatus * ReturnStatus = NULL ) const
MStatus setEnvelope ( float envelope )
float rotation ( MStatus * ReturnStatus = NULL ) const
MStatus setRotation ( float rotation )
float localIntensity ( MStatus * ReturnStatus = NULL ) const
MStatus setLocalIntensity ( float localIntensity )
float crossingEffect ( MStatus * ReturnStatus = NULL ) const
MStatus setCrossingEffect ( float crossingEffect )
unsigned int numDropoffLocators ( unsigned int wireIndex, MStatus * ReturnStatus = NULL ) const
MStatus setDropoffLocator ( unsigned int wireIndex, unsigned int locatorIndex, float param, float percentage )
MStatus getDropoffLocator ( unsigned int wireIndex, unsigned int locatorIndex, float &param, float &percentage )
MFnWireDeformer ( 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

Function set for wire deformer
Description

MFnWireDeformer is the function set for wire deformers. Wire deformers modify geometry based on its proximity to controlling wire curves. As the wire curves are modified, the parts of the geometry close to the curve will follow.

The wire deformer is actually a small network of dependency nodes in the dependency graph. This function set is provided to make manipulation of the network easier. The main deformer node should be given to this function set as its object.

Functions

MFnWireDeformer:: MFnWireDeformer ()

Description

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

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

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

MFnWireDeformer:: ~MFnWireDeformer ()

Description

The class destructor.

MFn::Type MFnWireDeformer:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kWire

MObject MFnWireDeformer:: create ( MStatus * ReturnStatus )

Description

Creates a new wire deformer. This function set's object is set to be the new wire deformer node.

Arguments

  • ReturnStatus return status

Return Value

  • returns a handle to the new deformer

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure unexpected failure
  • MS::kLicenseFailure application not licensed for attempted operation
  • MS::kInsufficientMemory out of memory

MStatus MFnWireDeformer:: addGeometry ( const MObject & object )

Description

Adds a piece of geometry to the deformation.

After adding new geometry to the deformation. The new geometry will then be deformed by the existing wires.

Arguments

  • object the geometry

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure addition of geometry failed
  • MS::kInsufficientMemory out of memory

MStatus MFnWireDeformer:: removeGeometry ( const MObject & object )

Description

Removes a piece of geometry from the deformation.

Arguments

  • path the geometry

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure addition of geometry failed
  • MS::kInsufficientMemory out of memory

MStatus MFnWireDeformer:: getAffectedGeometry ( MObjectArray & objects )

Description

The geometry affected by this deformer is packed into the provided list of MObjects. Each of the MObjects will be a DAG node that has geometry.

Arguments

  • objects storage for the returned array

Return Value

  • return status

Status Codes

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

unsigned int MFnWireDeformer:: numWires ( MStatus * ReturnStatus ) const

Description

returns the number of wire curves connected to this deformer.

Arguments

  • ReturnStatus return status

Return Value

  • the number of wires

Status Codes

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

MStatus MFnWireDeformer:: addWire ( const MObject & object )

Description

Adds a new wire curve to the deformation.

Arguments

  • object the new wire

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure addition of geometry failed
  • MS::kInsufficientMemory out of memory

MObject MFnWireDeformer:: wire ( unsigned int wireIndex, MStatus * ReturnStatus )

Description

Return the wire at the given index. The returned object will be a nurbs curve shape suitable for use with the MFnNurbsCurve function set.

Arguments

  • wireIndex index of wire to return
  • ReturnStatus return status

Return Value

  • a handle to the given wire curve

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

float MFnWireDeformer:: wireDropOffDistance ( unsigned int wireIndex, MStatus * ReturnStatus ) const

Description

Return the drop off distance of the wire at the given index. Increasing this value will give the wire a greater area of influence.

Arguments

  • wireIndex index of wire to return the drop off distance for
  • ReturnStatus return status

Return Value

  • the drop off distance

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MStatus MFnWireDeformer:: setWireDropOffDistance ( unsigned int wireIndex, float dropOff )

Description

Sets the drop off distance of the wire at the given index. Increasing this value will give the wire a greater area of influence.

Arguments

  • wireIndex index of wire to set the drop off distance for
  • dropOff new drop off value

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

float MFnWireDeformer:: wireScale ( unsigned int wireIndex, MStatus * ReturnStatus ) const

Description

Return the radial scale of the wire at the given index. The scale value affects how the wire modifies the geometry in its area of influence. A value of between 0.0 and 1.0 causes the wire to pull the surrounding geometry points towards itself. A value of greater than one causes the wire to repulse the geometry points around it. A value of exactly 1.0 causes the wire to neither pull nor push the points around it.

The surrounding points will always deform with the wire, The scale factor just allows the points around the wire to be radially scaled closer to or further from the wire.

Arguments

  • wireIndex index of wire to return the scale value for
  • ReturnStatus return status

Return Value

  • the radial scale value

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MStatus MFnWireDeformer:: setWireScale ( unsigned int wireIndex, float scale )

Description

Sets the radial scale value of the wire at the given index. The scale value affects how the wire modifies the geometry in its area of influence. A value of between 0.0 and 1.0 causes the wire to pull the surrounding geometry points towards itself. A value of greater than one causes the wire to repulse the geometry points around it. A value of exactly 1.0 causes the wire to neither pull nor push the points around it.

The surrounding points will always deform with the wire, The scale factor just allows the points around the wire to be radially scaled closer to or further from the wire.

Arguments

  • wireIndex index of wire to set the drop off distance for
  • dropOff new drop off value

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MObject MFnWireDeformer:: holdingShape ( unsigned int wireIndex, MStatus * ReturnStatus ) const

Description

Returns the holding shape for the given wire. The holding shape may be a nurbs curve or a nurbs surface. If the given wire does not have a holding shape, then a null MObject handle will be returned.

A holding shape pins down the deforming shapes when the associated wire is moved. One possible application is to use a curve to limit the area that a wire affects.

Arguments

  • wireIndex index of wire to get the holding shape for
  • ReturnStatus return status

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MStatus MFnWireDeformer:: setHoldingShape ( unsigned int wireIndex, MObject holdingShape )

Description

Sets the holding shape for the given wire. The holding shape may be a nurbs curve or a nurbs surface.

A holding shape pins down the deforming shapes when the associated wire is moved. One possible application is to use a curve to limit the area that a wire affects.

Arguments

  • wireIndex index of wire to set the holding shape for
  • holding shape nurbs curve or surface to use as holding shape

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

float MFnWireDeformer:: envelope ( MStatus * ReturnStatus ) const

Description

Returns the envelope for this deformer.

The envelope is a scale factor that affects the dropoff distances of all wires that belong to this deformer.

Arguments

  • ReturnStatus return status

Return Value

  • the envelope value

Status Codes

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

MStatus MFnWireDeformer:: setEnvelope ( float envelope )

Description

Sets the envelope for this deformer.

The envelope is a scale factor that affects the dropoff distances of all wires that belong to this deformer.

Arguments

  • envelope envelope value

Return Value

  • return status

Status Codes

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

float MFnWireDeformer:: rotation ( MStatus * ReturnStatus ) const

Description

Returns the rotation value for this deformer.

The rotation value determines how much the tangency of the wire curve affects the deformation. When the rotation value is 0.0, the deformation will be linear. The geometry will pull straight towards the wire. When the rotation value is 1.0, the tangency of the wire curve is taken into effect. This will provide more natural deformations when the wire curve is twisted with respect to its original position. The surface will pull towards the wire in an arc rather than in a straight line.

Arguments

  • ReturnStatus return status

Return Value

  • the rotation value

Status Codes

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

MStatus MFnWireDeformer:: setRotation ( float rotation )

Description

Sets the rotation value for this deformer.

The rotation value determines how much the tangency of the wire curve affects the deformation. When the rotation value is 0.0, the deformation will be linear. The geometry will pull straight towards the wire. When the rotation value is 1.0, the tangency of the wire curve is taken into effect. This will provide more natural deformations when the wire curve is twisted with respect to its original position. The surface will pull towards the wire in an arc rather than in a straight line.

Arguments

  • rotation new rotation value

Return Value

  • return status

Status Codes

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

float MFnWireDeformer:: localIntensity ( MStatus * ReturnStatus ) const

Description

Returns the local intensity for this wire deformer.

The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.

Arguments

  • ReturnStatus return status

Return Value

  • the local intensity value

Status Codes

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

MStatus MFnWireDeformer:: setLocalIntensity ( float localIntensity )

Description

Sets the local intensity for this wire deformer.

The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.

Arguments

  • ReturnStatus return status

Return Value

  • the local intensity value

Status Codes

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

float MFnWireDeformer:: crossingEffect ( MStatus * ReturnStatus ) const

Description

Returns the crossing effect for this wire deformer.

The crossing effect applies when two wire curves cross each other. Normally, the deformation is dampened so that the surface is only affected by the most deformed curve at the intersection point. When the crossing effect is increased, the effect of the wires becomes additive. So, the object will be deform more near crossing wires.

Arguments

  • ReturnStatus return status

Return Value

  • the crossing effect value

Status Codes

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

MStatus MFnWireDeformer:: setCrossingEffect ( float crossingEffect )

Description

Sets the local intensity for this wire deformer.

The local intensity has an effect when two wire curves are positioned close to each other. Normally, only the most deformed of the two curves will affect the surface. When the local intensity is increased, the less deformed curve will start to pull the surface back towards itself.

Arguments

  • ReturnStatus return status

Return Value

  • the local intensity value

Status Codes

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

unsigned int MFnWireDeformer:: numDropoffLocators ( unsigned int wireIndex, MStatus * ReturnStatus ) const

Description

Returns the number of drop off locators.

A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.

Arguments

  • wireIndex the index of the wire curve to query
  • ReturnStatus return status

Return Value

  • the number of drop off locators for the given curve

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MStatus MFnWireDeformer:: setDropoffLocator ( unsigned int wireIndex, unsigned int locatorIndex, float param, float percentage )

Description

Sets the parameters of a drop off locator.

A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.

Arguments

  • wireIndex index of the wire curve
  • locatorIndex index of the locator on the given wire
  • param new param value along the curve at which to position the locator
  • percentage percentage of the drop off distance applied

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

MStatus MFnWireDeformer:: getDropoffLocator ( unsigned int wireIndex, unsigned int locatorIndex, float &param, float &percentage )

Description

Gets the parameters of a drop off locator.

A drop off locator allows the modification the wire curve drop off distance at a specific point on the wire curve.

Arguments

  • wireIndex index of the wire curve
  • locatorIndex index of the locator on the given wire
  • param storage for the param value along the curve that the locator is positioned at
  • percentage storage for the percentage value of the locator

Return Value

  • return status

Status Codes

  • MS::kSuccess operation successful
  • MS::kFailure function set does not have a valid object
  • MS::kInvalidParameter index is out of range

This class has no child classes.


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