pymel.core.nodetypes.Particle

Inheritance diagram of Particle

class Particle(*args, **kwargs)

class counterpart of mel function particle

The particle command creates a new particle object from a list of world space points. If a particle object is created, the command returns the names of the new particle shape and its associated particle object dependency node. If an object was queried, the results of the query are returned. Per particle attributes can be queried using the particleId or the order of the particle in the particle array. If an object was edited, nothing is returned.

Point

alias of ParticleComponent

RenderType = Enum( EnumValue('RenderType', 0, 'cloud'), EnumValue('RenderType', 1, 'tube'), EnumValue('RenderType', 2, 'blobby'), EnumValue('RenderType', 3, 'multiPoint'), EnumValue('RenderType', 4, 'multiStreak'), EnumValue('RenderType', 5, 'numeric'), EnumValue('RenderType', 6, 'points'), EnumValue('RenderType', 7, 'spheres'), EnumValue('RenderType', 8, 'sprites'), EnumValue('RenderType', 9, 'streak'))
acceleration()

To return acceleration array for all particles.

Return type:Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.acceleration

age(ages)

Populates the given array with the age values of the particles in this system.

Parameters :ages : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.age

Undo is not currently supported for this method

betterIllum()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.betterIllum

castsShadows()

Returns whether or not the rendering attribute for particles casting shadows has been enabled.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.castsShadows

deformedParticleShape()

To get the deformed particleShape.

Return type:PyNode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.deformedParticleShape

disableCloudAxis()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.disableCloudAxis

emission(emissions)

Populates the given array with the incandescence values of the particles in this system, if the particles have this attribute. See hasEmission() .

Parameters :emissions : Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.emission

Undo is not currently supported for this method

emit(v)

To add a new particle at the given position.

Parameters :
v : Point

The particle’s position

Derived from api method maya.OpenMayaFX.MFnParticleSystem.emit

Undo is not currently supported for this method

evaluateDynamics(to, runupFromStart)

Run up the particle system to a certain frame, from either the current frame, or from the start of the simulation.

Parameters :
to : Time

Time to run the particle system up to.

runupFromStart : bool

If true runup will begin at the start of the simulation, otherwise it will begin from the current frame.

Derived from api method maya.OpenMayaFX.MFnParticleSystem.evaluateDynamics

Undo is not currently supported for this method

flatShaded()

To check if a particle shape of cloud type is flat shaded. This is only for use with an MFnParticleSystem of renderType kCloud.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.flatShaded

floatValue(val=True, **kwargs)

Used only in per particle attribute edit. Specifies that the edit is of a float attribute and must be followed by the new float value.

Derived from mel command maya.cmds.particle

getAttribute(**kwargs)

Used in per particle attribute query and edit. Specifies the name of the attribute being queried or edited.

Derived from mel command maya.cmds.particle

getCache(**kwargs)

Turns caching on/off for the particle shape.

Derived from mel command maya.cmds.particle

getConserve(**kwargs)

Conservation of momentum control (between 0 and 1). Specifies the fraction of the particle shape’s existing momentum which is conserved from frame to frame. A value of 1 (the default) corresponds to true Newtonian physics, in which momentum is conserved.

Derived from mel command maya.cmds.particle

getCount()

Returns the particle count at the current frame.

Return type:int

Derived from api method maya.OpenMayaFX.MFnParticleSystem.count

getDynamicAttrList(**kwargs)

Returns a list of the dynamic attributes in the object.

Derived from mel command maya.cmds.particle

getGridSpacing(**kwargs)

Spacing between particles in the grid.

Derived from mel command maya.cmds.particle

getInherit(**kwargs)

Inherit this fraction (0-1) of emitting object’s velocity.

Derived from mel command maya.cmds.particle

getJitterBasePoint(**kwargs)

Base point (center point) for jitters. The command will create one swatch of jitters for each base point. It will pair up other flags with base points in the order they are given in the command line. If not enough instances of the other flags are availble, the last one on the line with be used for all other instances of -jpb.

Derived from mel command maya.cmds.particle

getJitterRadius(**kwargs)

Max radius from the center to place the particle instances.

Derived from mel command maya.cmds.particle

getLowerLeft(**kwargs)

Lower left point of grid.

Derived from mel command maya.cmds.particle

getNumJitters(**kwargs)

Number of jitters (instances) per particle.

Derived from mel command maya.cmds.particle

getOrder(**kwargs)

Used in per particle attribute query and edit. Specifies the zero-based order (index) of the particle whose attribute is being queried or edited in the particle array. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

Derived from mel command maya.cmds.particle

getParticleId(**kwargs)

Used in per particle attribute query and edit. Specifies the id of the particle whose attribute is being queried or edited. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

Derived from mel command maya.cmds.particle

getPerParticleAttribute(attrName)

To get per particle integer attribute with its attribute name.

Parameters :
attrName : unicode

The input attribute name

Return type:

(int, int list)

Derived from api method maya.OpenMayaFX.MFnParticleSystem.getPerParticleAttribute

getPerParticleDouble(**kwargs)

Returns a list of the per-particle double attributes, excluding initial-state, cache, and information-only attributes.

Derived from mel command maya.cmds.particle

getPerParticleVector(**kwargs)

Returns a list of the per-particle vector attributes, excluding initial-state, cache, and information-only attributes.

Derived from mel command maya.cmds.particle

getShapeName(**kwargs)

Specify the shape name used for geometry instancing. DO not confuse this with the -n flag which names the particle object.

Derived from mel command maya.cmds.particle

getUpperRight(**kwargs)

Upper right point of grid.

Derived from mel command maya.cmds.particle

hasEmission()

Returns whether or not the particles in this system have an emission attribute. See emission() .

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.hasEmission

hasLifespan()

Returns whether or not the particles in this system have a lifespan attribute. See lifespan() .

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.hasLifespan

hasOpacity()

Returns whether or not the particles in this system have an opacity attribute. See opacity() .

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.hasOpacity

hasRgb()

Returns whether or not the particles in this system have an rgb attribute. See rgb() .

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.hasRgb

isDeformedParticleShape()

To return if this particle shape is deformed.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isDeformedParticleShape

isPerParticleDoubleAttribute(attrName)

To check if the input attribute is a per particle double attribute.

Parameters :
attrName : unicode

The input attribute name

Return type:

bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isPerParticleDoubleAttribute

isPerParticleIntAttribute(attrName)

To check if the input attribute is a per particle integer attribute.

Parameters :
attrName : unicode

The input attribute name

Return type:

bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isPerParticleIntAttribute

isPerParticleVectorAttribute(attrName)

To check if the input attribute is a per particle vector attribute.

Parameters :
attrName : unicode

The input attribute name

Return type:

bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isPerParticleVectorAttribute

isValid()

Returns false if the particle array is NULL.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isValid

lifespan(lifespans)

Populates the given array with the lifespan values of the particles in this system, if the particles have this attribute. See hasLifespan() .

Parameters :lifespans : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.lifespan

Undo is not currently supported for this method

mass()

To return mass array for all particles.

Return type:float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.mass

num()
opacity(opacities)

Populates the given array with the opacity values of the particles in this system, if the particles have this attribute. See hasOpacity() .

Parameters :opacities : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.opacity

Undo is not currently supported for this method

originalParticleShape()

To get the original particleShape.

Return type:PyNode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.originalParticleShape

particleIds()

Return an array of particle identifiers at the start of the time step. The array of particle id’s is correlated with the other per-particle arrays returned by this class, so ids[i] will be the id for the particle with position position[i], velocity[i], etc., as long as all these arrays were retrieved for the same time step.

Return type:int list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.particleIds

particleName()

Returns the name of this particle system.

Return type:unicode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.particleName

pointCount()
position(positions)

Compute each particle’s position at the start of the time step. This is done by taking the particle’s current position and velocity, and extrapolation backwards in time.

Parameters :positions : Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.position

Undo is not currently supported for this method

position0(positions)

Only for use with an MFnParticleSystem of renderType kTube.

Parameters :positions : Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.position0

Undo is not currently supported for this method

position1(positions)

Only for use with an MFnParticleSystem of renderType kTube.

Parameters :positions : Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.position1

Undo is not currently supported for this method

primaryVisibility()

Returns whether or not the rendering attribute for primary visibility in reflections has been enabled.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.primaryVisibility

radius(radii)

Calculates particle radii.

Parameters :radii : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.radius

Undo is not currently supported for this method

radius0(radii)

Only for use with an MFnParticleSystem of renderType kTube.

Parameters :radii : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.radius0

Undo is not currently supported for this method

radius1(radii)

Only for use with an MFnParticleSystem of renderType kTube.

Parameters :radii : float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.radius1

Undo is not currently supported for this method

receiveShadows()

Returns whether or not the rendering attribute for particles receiving shadows has been enabled.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.receiveShadows

renderType()

Return the render type used by the particle object.

Return type:Particle.RenderType

Derived from api method maya.OpenMayaFX.MFnParticleSystem.renderType

rgb(colors)

Populates the given array with the color values of the particles in this system, if the particles have this attribute. See hasRgb() .

Parameters :colors : Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.rgb

Undo is not currently supported for this method

saveInitialState()

To reset the particle’s current state as the initial state. Derived from api method maya.OpenMayaFX.MFnParticleSystem.saveInitialState

Undo is not currently supported for this method

setAttribute(val=True, **kwargs)

Used in per particle attribute query and edit. Specifies the name of the attribute being queried or edited.

Derived from mel command maya.cmds.particle

setCache(val=True, **kwargs)

Turns caching on/off for the particle shape.

Derived from mel command maya.cmds.particle

setConserve(val=True, **kwargs)

Conservation of momentum control (between 0 and 1). Specifies the fraction of the particle shape’s existing momentum which is conserved from frame to frame. A value of 1 (the default) corresponds to true Newtonian physics, in which momentum is conserved.

Derived from mel command maya.cmds.particle

setCount(count)

Set the particle count at the current frame.

Parameters :
count : int

Particle count.

Derived from api method maya.OpenMayaFX.MFnParticleSystem.setCount

setInherit(val=True, **kwargs)

Inherit this fraction (0-1) of emitting object’s velocity.

Derived from mel command maya.cmds.particle

setOrder(val=True, **kwargs)

Used in per particle attribute query and edit. Specifies the zero-based order (index) of the particle whose attribute is being queried or edited in the particle array. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

Derived from mel command maya.cmds.particle

setParticleId(val=True, **kwargs)

Used in per particle attribute query and edit. Specifies the id of the particle whose attribute is being queried or edited. Querying the value of a per particle attribute requires the -attribute and -id or -order flags and their arguments to precede the -q flag.

Derived from mel command maya.cmds.particle

setPerParticleAttribute(attrName, array)

To set the per particle vector attribute of the given name with the given values.

Parameters :
attrName : unicode

The input attribute name

array : Vector list

The input vector array

Derived from api method maya.OpenMayaFX.MFnParticleSystem.setPerParticleAttribute

setShapeName(val=True, **kwargs)

Specify the shape name used for geometry instancing. DO not confuse this with the -n flag which names the particle object.

Derived from mel command maya.cmds.particle

surfaceShading()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.surfaceShading

tailSize()

Only for use with an MFnParticleSystem of renderType kTube.

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.tailSize

threshold()

Only for use with an MFnParticleSystem of renderType kCloud or kBlobby.

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.threshold

vectorValue(val=True, **kwargs)

Used only in per particle attribute edit. Specifies that the edit is of a vector attribute and must be followed by all three float values for the vector.

Derived from mel command maya.cmds.particle

velocity()

To return velocity array for all particles.

Return type:Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.velocity

visibleInReflections()

Returns whether or not the rendering attribute for particle visibility in reflections has been enabled.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.visibleInReflections

visibleInRefractions()

Returns whether or not the rendering attribute for particle visibility in refractions has been enabled.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.visibleInRefractions

Previous topic

pymel.core.nodetypes.Parti_volume_photon

Next topic

pymel.core.nodetypes.ParticleAgeMapper

Core

Core Modules

Other Modules

This Page