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.

class Point(node, item)
class Particle.PointArray(name)
Particle.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'))
Particle.acceleration()

To return acceleration array for all particles.

Return type:Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.acceleration

Particle.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

Particle.betterIllum()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.betterIllum

Particle.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

Particle.deformedParticleShape()

To get the deformed particleShape.

Return type:PyNode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.deformedParticleShape

Particle.disableCloudAxis()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.disableCloudAxis

Particle.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

Particle.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

Particle.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

Particle.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

Particle.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

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

Particle.getCache(**kwargs)

Turns caching on/off for the particle shape.

Derived from mel command maya.cmds.particle

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

Particle.getCount()

Returns the particle count at the current frame.

Return type:int

Derived from api method maya.OpenMayaFX.MFnParticleSystem.count

Particle.getDynamicAttrList(**kwargs)

Returns a list of the dynamic attributes in the object.

Derived from mel command maya.cmds.particle

Particle.getGridSpacing(**kwargs)

Spacing between particles in the grid.

Derived from mel command maya.cmds.particle

Particle.getInherit(**kwargs)

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

Derived from mel command maya.cmds.particle

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

Particle.getJitterRadius(**kwargs)

Max radius from the center to place the particle instances.

Derived from mel command maya.cmds.particle

Particle.getLowerLeft(**kwargs)

Lower left point of grid.

Derived from mel command maya.cmds.particle

Particle.getName(**kwargs)

name of particle object

Derived from mel command maya.cmds.particle

Particle.getNumJitters(**kwargs)

Number of jitters (instances) per particle.

Derived from mel command maya.cmds.particle

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

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

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

Particle.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

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

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

Particle.getUpperRight(**kwargs)

Upper right point of grid.

Derived from mel command maya.cmds.particle

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

Particle.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

Particle.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

Particle.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

Particle.isDeformedParticleShape()

To return if this particle shape is deformed.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isDeformedParticleShape

Particle.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

Particle.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

Particle.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

Particle.isValid()

Returns false if the particle array is NULL.

Return type:bool

Derived from api method maya.OpenMayaFX.MFnParticleSystem.isValid

Particle.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

Particle.mass()

To return mass array for all particles.

Return type:float list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.mass

Particle.num()
Particle.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

Particle.originalParticleShape()

To get the original particleShape.

Return type:PyNode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.originalParticleShape

Particle.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

Particle.particleName()

Returns the name of this particle system.

Return type:unicode

Derived from api method maya.OpenMayaFX.MFnParticleSystem.particleName

Particle.pointCount()
Particle.points
Particle.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

Particle.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

Particle.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

Particle.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

Particle.pt
Particle.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

Particle.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

Particle.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

Particle.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

Particle.renderType()

Return the render type used by the particle object.

Return type:Particle.RenderType

Derived from api method maya.OpenMayaFX.MFnParticleSystem.renderType

Particle.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

Particle.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

Particle.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

Particle.setCache(val=True, **kwargs)

Turns caching on/off for the particle shape.

Derived from mel command maya.cmds.particle

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

Particle.setCount(count)

Set the particle count at the current frame.

Parameters :
count : int

Particle count.

Derived from api method maya.OpenMayaFX.MFnParticleSystem.setCount

Particle.setInherit(val=True, **kwargs)

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

Derived from mel command maya.cmds.particle

Particle.setName(val=True, **kwargs)

name of particle object

Derived from mel command maya.cmds.particle

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

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

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

Particle.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

Particle.surfaceShading()

Only for use with an MFnParticleSystem of renderType kCloud.

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.surfaceShading

Particle.tailSize()

Only for use with an MFnParticleSystem of renderType kTube.

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.tailSize

Particle.threshold()

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

Return type:float

Derived from api method maya.OpenMayaFX.MFnParticleSystem.threshold

Particle.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

Particle.velocity()

To return velocity array for all particles.

Return type:Vector list

Derived from api method maya.OpenMayaFX.MFnParticleSystem.velocity

Particle.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

Particle.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.ParentTessellate

Next topic

pymel.core.nodetypes.ParticleAgeMapper

Core

Core Modules

Other Modules

This Page