pymel.core.nodetypes.Particle¶
digraph inheritance3cc7ed18a7 { rankdir=TB; ranksep=0.15; nodesep=0.15; size="8.0, 12.0"; "ContainerBase" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.ContainerBase.html#pymel.core.nodetypes.ContainerBase",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DependNode" -> "ContainerBase" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DagNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DagNode.html#pymel.core.nodetypes.DagNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Entity" -> "DagNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DeformableShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DeformableShape.html#pymel.core.nodetypes.DeformableShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "GeometryShape" -> "DeformableShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "DependNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.DependNode.html#pymel.core.nodetypes.DependNode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" -> "DependNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Entity" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Entity.html#pymel.core.nodetypes.Entity",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "ContainerBase" -> "Entity" [arrowsize=0.5,style="setlinewidth(0.5)"]; "GeometryShape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.GeometryShape.html#pymel.core.nodetypes.GeometryShape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "Shape" -> "GeometryShape" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Particle" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="#pymel.core.nodetypes.Particle",style="setlinewidth(0.5)",tooltip="class counterpart of mel function `particle`",height=0.25,shape=box,fontsize=8]; "DeformableShape" -> "Particle" [arrowsize=0.5,style="setlinewidth(0.5)"]; "ProxyUnicode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.util.utilitytypes/pymel.util.utilitytypes.ProxyUnicode.html#pymel.util.utilitytypes.ProxyUnicode",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "PyNode" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="../pymel.core.general/pymel.core.general.PyNode.html#pymel.core.general.PyNode",style="setlinewidth(0.5)",tooltip="Abstract class that is base for all pymel nodes classes.",height=0.25,shape=box,fontsize=8]; "ProxyUnicode" -> "PyNode" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Shape" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",URL="pymel.core.nodetypes.Shape.html#pymel.core.nodetypes.Shape",style="setlinewidth(0.5)",height=0.25,shape=box,fontsize=8]; "DagNode" -> "Shape" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
- 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 nullptr.
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. Flag can have multiple arguments, passed either as a tuple or a list.
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