Module Particle :: Class Particle

Class Particle

source code

The Particle object

This object gives access to paticles data.

Instance Methods
 
freeEdit()
Free edit mode.
source code
list of vectors (tuple of 3 floats and optionnaly the id) or list of list of vectors
getLoc(all=0, id=0)
Get the particles locations.
source code
list of tuple of 4 or 5 elements (if id is not zero)
getRot(all=0, id=0)
Get the particles rotations as quaternion.
source code
Blender Material
getMat()
Get the particles material.
source code
list of floats
getSize(all=0, id=0)
Get the particles size.
source code
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 displayPercentage
Particle display percentage.
int distribution
How to distribute particles on selected element Paricle.DISTRIBUTION[ 'GRID' | 'RANDOM' | 'JITTERED' ] ).
int drawAs
Get 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 # to stop emitting particles.
int evenDistribution
Use even distribution from faces based on face areas or edge lengths.
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.
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 ( Paricle.REACTON[ 'NEAR' | 'COLLISION' | 'DEATH' ] ).
Blender Object object
Constrain boids to object's surface.
int particleDistribution
Where to emit particles from Paricle.EMITFROM[ 'PARTICLE' | 'VOLUME' | 'FACES' | 'VERTS' ] )
int pf
Emission locations / face (0 = automatic).
int randemission
Give the particle life a random variation
float randlife
Give the particle life a random variation.
float reactshape
Power of reaction strength dependence on distance to target.
int renderEmitter
Render emitter object.
int resolutionGrid
The resolution of the particle grid.
int seed
Set an offset in the random table.
float startFrame
Frame # to start emitting particles.
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

freeEdit()

source code 
Free edit mode.
Returns:
None

getLoc(all=0, id=0)

source code 
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 list of 3 floats in world space.
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 optionnaly the id) or list of list of vectors
list of vectors or list of list of vectors (hair mode)

getRot(all=0, id=0)

source code 
Get the particles rotations as quaternion. A list of tuple is returned in particle mode. The tuple is a vector list of 4 floats (quaternion).
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

getMat()

source code 
Get the particles material.
Returns: Blender Material
The marterial assigned to particles

getSize(all=0, id=0)

source code 
Get the particles size. A list of float.
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).

Instance Variable Details

drawAs

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