Module Particle :: Class Particle
[frames] | no frames]

Class Particle

The Particle object

This object gives access to paticles data.

Instance Methods
string
getName()
Get the name of this Particle System object.
 
setName(name)
Set the name of this Particle System object.
 
freeEdit()
Free edit mode.
list of vectors (tuple of 3 floats and optionally the id) or list of list of vectors
getLoc(all=0, id=0)
Get the particles locations.
list of tuple of 4 or 5 elements (if id is not zero)
getRot(all=0, id=0)
Get the particles' rotations as quaternion.
 
setMat(mat)
Set the particles' material.
Blender Material
getMat()
Get the particles' material.
list of floats
getSize(all=0, id=0)
Get the particles' size.
list of floats
getAge(all=0, id=0)
Get the particles' age.
list of objects
getVertGroup(attribute)
Get vertex group name and negation bit assigned to affect parameter attribute.
 
setVertGroup(name, attribute, negated)
Set vertex group and negation bit to affect particles system attribute.
Instance Variables
float 2d
Constrain boids to a surface.
int amount
The total number of particles.
float avvel
The usual speed % of max velocity.
int childAmount
The total number of children
int childBranch
Branch child paths from eachother
int childBranchAnim
Animate branching
int childBranchSymm
Start and end points are the same
float childBranchThre
Threshold of branching
float childClump
Amount of clumpimg
int childKink
Type of periodic offset on the path (Particle.CHILDKINK[ 'BRAID' | 'WAVE' | 'RADIAL' | 'CURL' | 'NOTHING' ])
float childKinkAmp
The amplitude of the offset
int childKinkAxis
Which axis to use for offset (Particle.CHILDKINKAXIS[ 'Z' | 'Y' | 'X' ])
float childKinkFreq
The frequency of the offset (1/total length)
float childKinkShape
Adjust the offset to the beginning/end
float childRadius
Radius of children around parent
float childRand
Random variation to the size of the child particles
int childRenderAmount
Amount of children/parent for rendering
float childRough1
Amount of location dependant rough
float childRough1Size
Size of location dependant rough
float childRough2
Amount of random rough
float childRough2Size
Size of random rough
float childRough2Thresh
Amount of particles left untouched by random rough
float childRoughE
Amount of end point rough
float childRoughEShape
Shape of end point rough
float childRound
Roundness of children around parent
float childShape
Shape of clumpimg
float childSize
A multiplier for the child particle size
int childType
Type of childrens ( Particle.CHILDTYPE[ 'FACES' | 'PARTICLES' | 'NONE' ] )
int displayPercentage
Particle display percentage.
int distribution
How to distribute particles on selected element ( Particle.DISTRIBUTION[ 'GRID' | 'RANDOM' | 'JITTERED' ] ).
int drawAs
Draw type Particle.DRAWAS([ 'NONE' | 'OBJECT' | 'POINT' | ...
Blender Object duplicateObject
Get the duplicate object.
int editable
Finalize hair to enable editing in particle mode.
float endFrame
Frame number to stop emitting particles.
int evenDistribution
Use even distribution from faces based on face areas or edge lengths.
float glAccX
Specify a constant acceleration along the X-axis
float glAccY
Specify a constant acceleration along the Y-axis
float glAccZ
Specify a constant acceleration along the Z-axis
float glBrown
Specify the amount of brownian motion
float glDamp
Specify the amount of damping
float glDrag
Specify the amount of air-drag
float groundz
Default Z value.
int hairDisplayStep
How many steps paths are drawn with (power of 2) in visu mode.
int hairRenderStep
How many steps paths are rendered with (power of 2) in render mode."
int hairSegments
Amount of hair segments.
float inVelNor
Let the surface normal give the particle a starting speed
float inVelObj
Let the object give the particle a starting speed
float inVelPart
Let the target particle give the particle a starting speed
float inVelRan
Give the starting speed a random variation
float inVelReact
Let the vector away from the target particles location give the particle a starting speed
float inVelRot
Rotate the surface tangent
float inVelTan
Let the surface tangent give the particle a starting speed
int integration
Select physics integrator type Particle.INTEGRATOR([ 'RK4' | 'MIDPOINT' | 'EULER' ])
int invert
Invert what is considered object and what is not.
float jitterAmount
Amount of jitter applied to the sampling.
float latacc
Lateral acceleration % of max velocity
float lifetime
Specify the life span of the particles.
float maxvel
Maximum velocity.
int multireact
React multiple times ( Particle.REACTON[ 'NEAR' | 'COLLISION' | 'DEATH' ] ).
Blender Object object
Constrain boids to object's surface.
int particleDistribution
Where to emit particles from ( Particle.EMITFROM[ 'PARTICLE' | 'VOLUME' | 'FACES' | 'VERTS' ] )
int pf
Emission locations / face (0 = automatic).
int physics
Select particle physics type Particle.PHYSICS([ 'BOIDS' | 'KEYED' | 'NEWTONIAN' | 'NONE' ])
int randemission
Emit particles in random order.
float randlife
Give the particle life a random variation.
float reactshape
Power of reaction strength, dependent on distance to target.
int renderDied
Show particles after they have died.
int renderEmitter
Render emitter object.
int renderMatCol
Draw particles using material's diffuse color.
int renderMaterial
Specify material used for the particles.
int renderParents
Render parent particles.
int renderUnborn
Show particles before they are emitted.
int resolutionGrid
The resolution of the particle grid.
int rotAnV
Select particle angular velocity mode Particle.ANGULARV([ 'RANDOM' | 'SPIN' | 'NONE' ])
float rotAnVAm
Angular velocity amount
int rotDyn
Sets rotation to dynamic/constant
float rotPhase
Initial rotation phase
float rotPhaseR
Randomize rotation phase
float rotRand
Randomize rotation
int rotation
Particles initial rotation Particle.ROTATION([ 'OBZ' | 'OBY' | 'OBX' | 'GLZ' | 'GLY' | 'GLX' | 'VEL' | 'NOR' | 'NONE' ])
int seed
Set an offset in the random table.
float startFrame
Frame number to start emitting particles.
int strandRender
Use the strand primitive to render.
int strandRenderAngle
How many degrees path has to curve to make another render segment.
float tanacc
Tangential acceleration % of max velocity
Blender object targetObject
The object that has the target particle system (empty if same object).
int targetpsys
The target particle system number in the object.
int type
Type of particle system ( Particle.TYPE[ 'HAIR' | 'REACTOR' | 'EMITTER' ] ).
Method Details

setName(name)

 

Set the name of this Particle System object.

Parameters:
  • name (string) - The new name.

freeEdit()

 

Free edit mode.

Returns:
None

getLoc(all=0, id=0)

 

Get the particles locations. A list of tuple is returned in particle mode. A list of list of tuple is returned in hair mode. The tuple is a vector of 3 or 4 floats in world space (x,y,z, optionally the particle's id).

Parameters:
  • all (int) - if not 0 export all particles (uninitialized (unborn or died)particles exported as None).
  • id (int) - add the particle id in the end of the vector tuple
Returns: list of vectors (tuple of 3 floats and optionally the id) or list of list of vectors
list of vectors or list of list of vectors (hair mode) or None if system is disabled

getRot(all=0, id=0)

 

Get the particles' rotations as quaternion. A list of tuple is returned in particle mode. The tuple is vector of 4 or 5 floats (x,y,z,w, optionally the id of the particle).

Parameters:
  • all (int) - if not 0, export all particles (uninitialized (unborn or died) particles exported as None).
  • id (int) - add the particle id in the return tuple
Returns: list of tuple of 4 or 5 elements (if id is not zero)
list of 4-tuples or None if system is disabled

setMat(mat)

 

Set the particles' material. This method checks if the argument given is really a material, imposes a limit of 16 materials and adds the material if it wasn't already in the list of the object.

Parameters:
  • mat (Blender Material) - The material to be assigned to particles

getMat()

 

Get the particles' material.

Returns: Blender Material
The material assigned to particles

getSize(all=0, id=0)

 

Get the particles' size. A list of float or list of tuple (particle's size,particle's id).

Parameters:
  • all (int) - if not 0, export all particles (uninitialized (unborn or died) particles exported as None).
  • id (int) - add the particle id in the return tuple
Returns: list of floats
list of floats or list of tuples if id is not zero (size,id) or None if system is disabled.

getAge(all=0, id=0)

 

Get the particles' age. A list of float or list of tuple (particle's age, particle's id).

Parameters:
  • all (int) - if not 0, export all particles (uninitialized (unborn or died) particles exported as None).
  • id (int) - add the particle id in the return tuple
Returns: list of floats
list of floats or list of tuples if id is not zero (size,id) or None if system is disabled.

getVertGroup(attribute)

 

Get vertex group name and negation bit assigned to affect parameter attribute. A list of string and integer (vertex group name, negation bit).

Parameters:
  • attribute (int) - Particle.VERTEXGROUPS([ 'DENSITY' | 'VELOCITY' | ... ])
Returns: list of objects
first element is the vg name and second the negation bit

setVertGroup(name, attribute, negated)

 

Set vertex group and negation bit to affect particles system attribute.

Parameters:
  • name (string) - Name of the vertex group
  • attribute (int) - Particle.VERTEXGROUPS([ 'DENSITY' | 'VELOCITY' | ... ])
  • negated (int) - Negate the effect of the vertex group
Returns:
None

Instance Variable Details

drawAs

Draw type Particle.DRAWAS([ 'NONE' | 'OBJECT' | 'POINT' | ... ]).
Type:
int