Work with lifespan
 
 
 

Starting with release 3.0, Maya simplifies how you work with particle lifespan. No longer do you need to use an expression to set random or constant lifespans on a per particle basis. See Set particle lifespan for details.

If you are using any lifespan mode other than lifespanPP only, you may read but not assign to finalLifespanPP in expression statements. For example, in past versions of Maya you might have written:

opacityPP = 1 - age/lifespanPP;

This works in Maya 3.0, but only if have you have lifespan mode set to lifespanPP only. Now the way to write this expression is:

opacityPP = 1 - age/finalLifespanPP;

This works for all lifespan modes because finalLifespanPP always stores the actual lifespan used for the particles in all modes.

Pre-Maya 3.0 expressions that refer to lifespanPP will work correctly now as long as you select lifespanPP only as the lifespan mode. If you select Constant or Random Range mode, you can read the value finalLifespanPP, not lifespanPP. You need to use finalLifespanPP only if you intend to make use of one of the other lifespan modes.