class MFnAirField

Jump to documentation

: public MFnField Function set for Air Fields (OpenMayaFX) (OpenMayaFX.py)

Inheritance:

MFnAirField < MFnField < MFnDagNode < MFnDependencyNode < MFnBase

public members:

MFnAirField ( const MObject & object, MStatus * ReturnStatus = NULL )
MVector direction ( MStatus *ReturnStatus = NULL ) const
MStatus setDirection ( const MVector & airDirection )
double speed ( MStatus *ReturnStatus = NULL ) const
MStatus setSpeed ( double value )
double inheritVelocity ( MStatus *ReturnStatus = NULL ) const
MStatus setInheritVelocity ( double velocity )
bool inheritRotation ( MStatus *ReturnStatus = NULL ) const
MStatus setInheritRotation ( bool enable )
bool componentOnly ( MStatus *ReturnStatus = NULL ) const
MStatus setComponentOnly ( bool enable )
double spread ( MStatus *ReturnStatus = NULL ) const
MStatus setSpread ( double value )
bool enableSpread ( MStatus *ReturnStatus = NULL ) const
MStatus setEnableSpread ( bool enable )

Inherited from MFnField:

public members:

MStatus getForceAtPoint (const MPointArray & point, const MVectorArray & velocity, const MDoubleArray & mass, MVectorArray & force, double deltaTime = 1.0 / 24.0 )
MStatus getForceAtPoint (const MVectorArray & point, const MVectorArray & velocity, const MDoubleArray & mass, MVectorArray & force, double deltaTime = 1.0 / 24.0 )
double magnitude ( MStatus *ReturnStatus = NULL ) const
MStatus setMagnitude ( double mag )
double attenuation ( MStatus *ReturnStatus = NULL ) const
MStatus setAttenuation ( double atten )
double maxDistance ( MStatus *ReturnStatus = NULL ) const
MStatus setMaxDistance ( double maxDist )
bool perVertex ( MStatus *ReturnStatus = NULL ) const
MStatus setPerVertex ( bool enable )
bool useMaxDistance ( MStatus *ReturnStatus = NULL ) const
MStatus setUseMaxDistance ( bool enable )
double falloffCurve ( const double param, MStatus *ReturnStatus = NULL )
bool isFalloffCurveConstantOne ( MStatus *ReturnStatus = NULL)

Inherited from MFnDagNode:

public members:

kNextPos
MObject create ( const MTypeId &typeId, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MTypeId &typeId, const MString &name, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MString &type, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
MObject create ( const MString &type, const MString &name, MObject & parent = MObject::kNullObj , MStatus * ReturnStatus = NULL )
unsigned int parentCount ( MStatus * ReturnStatus = NULL ) const
MObject parent ( unsigned int i, MStatus * ReturnStatus = NULL ) const
MStatus addChild ( MObject & child , unsigned int index = kNextPos , bool keepExistingParents = false )
MStatus removeChild ( MObject & child )
MStatus removeChildAt ( unsigned int index )
unsigned int childCount ( MStatus * ReturnStatus = NULL ) const
MObject child ( unsigned int i, MStatus * ReturnStatus = NULL ) const
MObject dagRoot ( MStatus * ReturnStatus = NULL )
bool hasParent ( const MObject & node, MStatus * ReturnStatus = NULL ) const
bool hasChild (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool isChildOf (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool isParentOf (const MObject & node, MStatus * ReturnStatus = NULL ) const
bool inUnderWorld ( MStatus * ReturnStatus = NULL ) const
bool inModel ( MStatus * ReturnStatus = NULL ) const
bool isInstanceable ( MStatus * ReturnStatus=NULL ) const
MStatus setInstanceable ( const bool how )
bool isInstanced ( bool indirect = true, MStatus * ReturnStatus = NULL ) const
bool isInstancedAttribute ( const MObject & attr, MStatus * ReturnStatus = NULL ) const
unsigned int instanceCount ( bool total, MStatus * ReturnStatus = NULL ) const
MObject duplicate ( bool instance = false, bool instanceLeaf = false, MStatus * ReturnStatus = NULL ) const
MStatus getPath ( MDagPath & path )
MStatus getAllPaths ( MDagPathArray & paths )
MString fullPathName ( MStatus *ReturnStatus = NULL)
MString partialPathName ( MStatus *ReturnStatus = NULL)
MMatrix transformationMatrix ( MStatus * ReturnStatus = NULL ) const
bool isIntermediateObject ( MStatus * ReturnStatus = NULL ) const
MStatus setIntermediateObject ( bool isIntermediate )
int objectColor ( MStatus * ReturnStatus = NULL ) const
MStatus setObjectColor ( int color )
bool usingObjectColor ( MStatus * ReturnStatus = NULL ) const
MStatus setUseObjectColor ( bool useObjectColor )
MBoundingBox boundingBox ( MStatus * ReturnStatus = NULL ) const
MDagPath dagPath ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( const MDagPath & path )
virtual MStatus setObject ( MObject & object )
MObject model ( MStatus * ReturnStatus = NULL ) const
virtual MStatus setObject ( const MObject & object )

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

Description

Function set for creation, edit, and query of Air Fields.

An air field simulates the effects of moving air.

Functions

MFnAirField:: MFnAirField ()

Description

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

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

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

MFnAirField:: MFnAirField ( const MDagPath & object, MStatus * ReturnStatus )

Description

Class constructor that initializes the function set to the given constant MDagPath object.

Arguments

  • object the const MDagPath 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

MFn::Type MFnAirField:: type () const

Description

Return the type of this function set.

Return Value

  • the constant MFn::kAir

MFnAirField:: ~MFnAirField ()

Description

Class destructor.

MVector MFnAirField:: direction ( MStatus * ReturnStatus ) const

Description

Returns the direction the air is blowing.

Arguments

  • ReturnStatus Status code

Return Value

  • A vector representing direction.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setDirection ( const MVector & airDirection )

Description

Sets the direction vector for the air to blow.

Arguments

  • airDirection A vector representing direction.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

double MFnAirField:: speed ( MStatus * ReturnStatus ) const

Description

Returns the control setting on how quickly objects match the velocity of the air field.

Arguments

  • ReturnStatus Status code

Return Value

  • The value of the speed setting.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setSpeed ( double value )

Description

Sets the control setting on how quickly the objects match the velocity of the air field.

Arguments

  • value A value representing speed.
  • A value of 0 is equivalent of turning the air field off.
  • A value of 1 and objects will match the velocity almost instantaneously.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

double MFnAirField:: inheritVelocity ( MStatus * ReturnStatus ) const

Description

Returns the amount of the moving air field's velocity that is added to the direction and magnitude of the wind.

Arguments

  • ReturnStatus Status code

Return Value

  • A value from 0 to 1 representing the amount of velocity added.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setInheritVelocity ( double velocity )

Description

Sets the amount of the moving air field's velocity that is added to the direction and magnitude of the wind.

Arguments

  • velocity A value from 0 to 1 representing the amount of velocity that is added.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

bool MFnAirField:: inheritRotation ( MStatus * ReturnStatus ) const

Description

Returns true if the air field is rotating or parented to a rotating object, and will undergo that same rotation.

Arguments

  • ReturnStatus Status code

Return Value

  • true Rotations will change the direction the air field points.
  • false Rotations do not change the air field direction.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setInheritRotation ( bool enable )

Description

Enables the air field to undergo rotations and effect the direction that the air field points.

Arguments

  • enable Flag to enable or disable rotations effects.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

bool MFnAirField:: componentOnly ( MStatus * ReturnStatus ) const

Description

Returns true if the air field will apply force only in the direction specified by the combination of its direction, speed, and inherit velocity attributes. Returns false if the force is made to effect the object's velocity to match the air field's velocity.

Arguments

  • ReturnStatus Status code

Return Value

  • true Force applied only in direction of attributes.
  • false Force applied to match velocities.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setComponentOnly ( bool enable )

Description

Enables the air field to apply force specified as a combination of its direction, speed, and inherit veloicty attributes.

Arguments

  • enable Flag to enable or disable combination of attributes.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

double MFnAirField:: spread ( MStatus * ReturnStatus ) const

Description

Returns a value that represents an angle which objects are affected by the air fields direction setting. This value is taken into account when the Enable Spread attribute is turned on.

Arguments

  • ReturnStatus Status code

Return Value

  • A value from 0 to 1 representing an angle.
  • A value of 0 effects objects only exactly in front of the direction vector.
  • A value of 1 effects objects in front by 180 degrees along the direction vector.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setSpread ( double value )

Description

Sets the value representing an angle which objects are affected by the air fields direction setting. This value is taken into account when the Enable Spread attribute is turned on.

Arguments

  • value A value representing an angle.
  • A value of 0 effects objects only exactly in front of the direction vector.
  • A value of 1 effects objects in front by 180 degrees along the direction vector.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

bool MFnAirField:: enableSpread ( MStatus * ReturnStatus ) const

Description

Returns true if the air field is using the spread angle to define the influence of the air field.

Arguments

  • ReturnStatus Status code

Return Value

  • true Objects are affected in the area of the spread angle.
  • false Objects are affected by the max distance setting.

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

MStatus MFnAirField:: setEnableSpread ( bool enable )

Description

Enables the air field to influence objects based on the spread angle setting.

Arguments

  • enable Flag to enable or disable use of the spread angle.

Return Value

  • Status code

Status Codes

  • MS::kSuccess The method was successful.
  • MS::kFailure An object error has occurred.

This class has no child classes.


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