pymel.core.nodetypes.AirField

Inheritance diagram of AirField

class AirField(*args, **kwargs)

class counterpart of mel function air

The air field simulates the effects of moving air. The affected objects will be accelerated or decelerated so that their velocities match that of the air. With the ‘-vco true’ flag thrown, only accelerations are applied. By parenting an air field to a moving part of an object (ie. a foot of a character) and using ‘-i 1 -m 0 -s .5 -vco true’ flags, one can simulate the movement of air around the foot as it moves, since the TOTAL velocity vector of the field would be only based on the movement of the foot. This can be done while the character walks through leaves or dust on the ground. For each listed object, the command creates a new field. The transform is the associated dependency node. Use connectDynamic to cause the field to affect a dynamic object. If fields are created, this command returns the field names. If a field was queried, the results of the query are returned. If a field was edited, the field name is returned. If the -pos flag is specified, a field is created at the position specified. If not, if object names are provided or the active selection list is non-empty, the command creates a field for every object in the list and calls addDynamic to add it to the object; otherwise the command defaults to -pos 0 0 0. Setting the -pos flag with objects named on the command line is an error.

fanSetup(val=True, **kwargs)

Similar to ‘windSetup’ except that the effects of a fan or a person blowing air are approximated. The user can pass the same flags on the command line to adjust them from the defaults. These are the values that get set to approximate a ‘fan’: inheritVelocity 1.0 inheritRotation true componentOnly false enableSpread true spread .5 (45 degrees from center )

Derived from mel command maya.cmds.air

getComponentOnly()

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.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnAirField.componentOnly

getDirection()

Returns the direction the air is blowing.

Return type:Vector

Derived from api method maya.OpenMayaFX.MFnAirField.direction

getDirectionX(**kwargs)

Derived from mel command maya.cmds.air

getDirectionY(**kwargs)

Derived from mel command maya.cmds.air

getDirectionZ(**kwargs)

Direction that the air will try to match the affected particles’ velocity to. NOTE: This is not the velocity; this is only the direction. Use the -s flag to set the speed.

Derived from mel command maya.cmds.air

getEnableSpread()

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

Return type:bool

Derived from api method maya.OpenMayaFX.MFnAirField.enableSpread

getInheritRotation()

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

Return type:bool

Derived from api method maya.OpenMayaFX.MFnAirField.inheritRotation

getInheritVelocity()

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

Return type:float

Derived from api method maya.OpenMayaFX.MFnAirField.inheritVelocity

getPosition(**kwargs)

Position in space where you want to place a field. The field then emanates from this position in space rather than from an object. Note that you can both use -pos (creating a field at a position) and also provide object names.

Derived from mel command maya.cmds.air

getSpeed()

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

Return type:float

Derived from api method maya.OpenMayaFX.MFnAirField.speed

getSpread()

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.

Return type:float

Derived from api method maya.OpenMayaFX.MFnAirField.spread

getTorusSectionRadius(**kwargs)

Derived from mel command maya.cmds.air

getVelocityComponentOnly(**kwargs)

If this is ‘false’, the air will accelerate or decelerate the affected objects so that their velocities will eventually match the TOTAL velocity vector of the air field. If this is ‘true’, only ACCELERTION is applied to the affected objects so that their velocity component along the TOTAL velocity vector matches or is greater in magnitude than the TOTAL velocity vector. This will not slow objects down to match velocities, only speed them up to match components. This is most useful when using the -iv flag with a value 0.

Derived from mel command maya.cmds.air

getVolumeExclusion(**kwargs)

Derived from mel command maya.cmds.air

getVolumeOffset(**kwargs)

Derived from mel command maya.cmds.air

getVolumeShape(**kwargs)

Derived from mel command maya.cmds.air

getVolumeSweep(**kwargs)

Derived from mel command maya.cmds.air

setComponentOnly(enable)

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

Parameters :
enable : bool

Flag to enable or disable combination of attributes.

Derived from api method maya.OpenMayaFX.MFnAirField.setComponentOnly

setDirection(airDirection)

Sets the direction vector for the air to blow.

Parameters :
airDirection : Vector

A vector representing direction.

Derived from api method maya.OpenMayaFX.MFnAirField.setDirection

setDirectionX(val=True, **kwargs)

Derived from mel command maya.cmds.air

setDirectionY(val=True, **kwargs)

Derived from mel command maya.cmds.air

setDirectionZ(val=True, **kwargs)

Direction that the air will try to match the affected particles’ velocity to. NOTE: This is not the velocity; this is only the direction. Use the -s flag to set the speed.

Derived from mel command maya.cmds.air

setEnableSpread(enable)

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

Parameters :
enable : bool

Flag to enable or disable use of the spread angle.

Derived from api method maya.OpenMayaFX.MFnAirField.setEnableSpread

setInheritRotation(enable)

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

Parameters :
enable : bool

Flag to enable or disable rotations effects.

Derived from api method maya.OpenMayaFX.MFnAirField.setInheritRotation

setInheritVelocity(velocity)

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

Parameters :
velocity : float

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

Derived from api method maya.OpenMayaFX.MFnAirField.setInheritVelocity

setPosition(val=True, **kwargs)

Position in space where you want to place a field. The field then emanates from this position in space rather than from an object. Note that you can both use -pos (creating a field at a position) and also provide object names.

Derived from mel command maya.cmds.air

setSpeed(value)

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

Parameters :
value : float

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.

Derived from api method maya.OpenMayaFX.MFnAirField.setSpeed

setSpread(value)

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.

Parameters :
value : float

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.

Derived from api method maya.OpenMayaFX.MFnAirField.setSpread

setTorusSectionRadius(val=True, **kwargs)

Derived from mel command maya.cmds.air

setVelocityComponentOnly(val=True, **kwargs)

If this is ‘false’, the air will accelerate or decelerate the affected objects so that their velocities will eventually match the TOTAL velocity vector of the air field. If this is ‘true’, only ACCELERTION is applied to the affected objects so that their velocity component along the TOTAL velocity vector matches or is greater in magnitude than the TOTAL velocity vector. This will not slow objects down to match velocities, only speed them up to match components. This is most useful when using the -iv flag with a value 0.

Derived from mel command maya.cmds.air

setVolumeExclusion(val=True, **kwargs)

Derived from mel command maya.cmds.air

setVolumeOffset(val=True, **kwargs)

Derived from mel command maya.cmds.air

setVolumeShape(val=True, **kwargs)

Derived from mel command maya.cmds.air

setVolumeSweep(val=True, **kwargs)

Derived from mel command maya.cmds.air

wakeSetup(val=True, **kwargs)

Like the ‘windSetup’ and ‘fanSetup’, ‘wakeSetup’ sets certain values in the field to approximate the movement of air near a moving object, such as a character’s foot or hand. The values that are set are: inheritVelocity 1.0 inheritRotation false componentOnly true enableSpread false speed 0.0Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list.

Derived from mel command maya.cmds.air

windSetup(val=True, **kwargs)

This will set some of the values above in a way that approximates the effects of a basic wind. This allows the user to then change certain values as he/she wishes on the same command line. First the preset values get set, and then any other flags that were passed get taken into account. These are the values that get set to approximate ‘wind’: inheritVelocity 0.0 inheritRotation true componentOnly false enableSpread false

Derived from mel command maya.cmds.air

Previous topic

pymel.core.nodetypes.AimConstraint

Next topic

pymel.core.nodetypes.AlembicNode

Core

Core Modules

Other Modules

This Page