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

Class Particle

source code

The Particle object

This object gives access to paticles data.

Instance Methods [hide private]
 
freeEdit()
Free edit mode.
source code
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.
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
list of floats
getAge(all=0, id=0)
Get the particles' age.
source code
Instance Variables [hide private]
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 ( Particle.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 number 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 ( 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 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 renderEmitter
Render emitter object.
int resolutionGrid
The resolution of the particle grid.
int seed
Set an offset in the random table.
float startFrame
Frame number 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 [hide private]

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 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)

source code 

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

getMat()

source code 

Get the particles' material.

Returns: Blender Material
The material assigned to particles

getSize(all=0, id=0)

source code 

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)

source code 

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.

Instance Variable Details [hide private]

drawAs

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