Write creation expressions
 
 
 

A creation expression is useful for attributes that don’t need to change during animation. For example, you might want all particles in an object to have a single velocity for the duration of an animation.

A creation expression is also useful for initializing an attribute’s value for the first frame before a runtime expression takes control of the attribute value in subsequent frames. See Write runtime expressions for an example of the interaction between a runtime and creation expression.

Example

Suppose you’ve used the Particle Tool to place a collection of particles in the workspace. You then create the following creation expression to control their velocity:

particleShape1.velocity = <<0,1,0>>;

All the particles move in a Y-axis direction at one grid unit per second as the animation plays.

Important To use an expression to control particle attributes, make sure the selected object in the Expression Editor is a particle shape node, not the transform node of the particle object.

If a particle object’s transform node is selected rather than the particle shape node, move the mouse pointer to the workspace and press your keyboard’s down arrow. This selects the particle shape node.