It is well known that one of the biggest limitations to the Blender particle system is the fact that you can not animate the particle count with keyframes. But I wondered, what would happen if a script, running in an event handler, tried to make the change. Surely this would crash Blender, right…?
It looks like you can actually do this. I assumed the particle count was a read-only parameter but when I tried to write to it, it worked fine. It seems to render Ok as well. Simple testing done on Blender Internal and Cycles using the official 2.65 release of Blender, 64 bit.
import bpy def pre_frame_change(scene): particle_rate = 2 #Multiplier per frame ob_emitter = bpy.data.objects.get('emitter') if ob_emitter != None: #print("PASSED: Emitter check.") if ob_emitter.particle_systems: #print("PASSED: Particle System check.") ps = ob_emitter.particle_systems if ps != None: settings = ps.settings fc = scene.frame_current settings.count = fc * particle_rate bpy.app.handlers.frame_change_pre.append(pre_frame_change)
The rate is fixed in this example, but it probably could be fetched from a custom property and actually animated so the rate could grow and shrink.