pymel.core.nodetypes.Field

Inheritance diagram of Field

class Field(*args, **kwargs)
falloffCurve(param)

Returns falloff given the param in [0,1]. This is enabled if the use the maximum distance is enabled.

Parameters :
param : float

Parameter

Return type:

float

Derived from api method maya.OpenMayaFX.MFnField.falloffCurve

getAttenuation()

Returns the rate of change where the strength of the field changes as the distance between the field and the affected object increases.

Return type:float

Derived from api method maya.OpenMayaFX.MFnField.attenuation

getForceAtPoint(point, velocity, mass, deltaTime=0.041666666666666664)

Compute the force of a field on an array of points, given their position, velocity, and mass. Note that only the Air and Vortex fields require a time increment to compute forces, all other fields will ignore this argument.

Parameters :
point : Point list

array of positions for each point.

velocity : Vector list

array of velocities for each point. If the length of the velocity array is 0, a velocity of 0.0 is assumed for all the points. Note the velocity array is a requirement for the Air and Drag fields to compute forces.

mass : float list

array of mass values for each point. If the length of the mass array is 0, a mass of 1.0 is assumed for all the points.

deltaTime : float

time increment in seconds for usage with the Air and Vortex fields. Default is (1.0 / 24.0 fps).

Return type:

Vector list

Derived from api method maya.OpenMayaFX.MFnField.getForceAtPoint

getMagnitude()

Returns the strength of the field.

Return type:float

Derived from api method maya.OpenMayaFX.MFnField.magnitude

getMaxDistance()

Returns the maximum distance from the field at which the force of the field is exerted. The Use Max Distance setting must be turned on for maximum distance to take effect. The maximum distance is scaled by the falloff curve’s non-zero range.

Return type:float

Derived from api method maya.OpenMayaFX.MFnField.maxDistance

getPerVertex()

Returns true if the field exerts its force on each individual point (cv, particle, vertex) equally. Returns false if the force is exerted only from the geometric center of the object or set of points.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnField.perVertex

getUseMaxDistance()

Returns true if the field will use the maximum distance setting to determine the area of influence.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnField.useMaxDistance

isFalloffCurveConstantOne()

Returns true if falloffCurve is a constant one (default) or false if not.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnField.isFalloffCurveConstantOne

setAttenuation(atten)

Sets the rate of change where the strength of the field changes as the distance between the field and the affected object increases.

Parameters :
atten : float

A positive value representing the exponent for rate of change. A value of 0 and the force remains constant over distance.

Derived from api method maya.OpenMayaFX.MFnField.setAttenuation

setMagnitude(mag)

Sets the strength of the field.

Parameters :
mag : float

A value representing the strength of the field.

Derived from api method maya.OpenMayaFX.MFnField.setMagnitude

setMaxDistance(dist)

Sets the maximum distance from the field at which the force of the field is exerted. The Use Max Distance setting must be turned on for maximum distance to take effect.

Parameters :
dist : float

A value representing distance in internal linear units.

Derived from api method maya.OpenMayaFX.MFnField.setMaxDistance

setPerVertex(enable)

Enables the field to exert its force on each individual point (cv, particle, vertex) equally. Otherwise, the force is exerted only from the geometric center of the object or set of points.

Parameters :
enable : bool

Flag to enable or disable individual point forces.

Derived from api method maya.OpenMayaFX.MFnField.setPerVertex

setUseMaxDistance(enable)

Enables the field to use the maximum distance setting to determine the area of influence.

Parameters :
enable : bool

Flag to enable or disable maximum distance.

Derived from api method maya.OpenMayaFX.MFnField.setUseMaxDistance

Previous topic

pymel.core.nodetypes.Ffd

Next topic

pymel.core.nodetypes.File

Core

Core Modules

Other Modules

This Page