move particles to different emitter

Discussion about scripting with Python
aleymeow
Posts: 5
Joined: Thu Sep 29, 2011 1:35 pm

move particles to different emitter

Postby aleymeow » Mon Apr 28, 2014 4:50 pm

Hi all

I am trying to move particles from one emitter to another but seem to be running into all kinds of syntax and not defined errors any help would be great.

this is the script I am using.

def onSimulationStep():
emit01 = scene.getEmitter(Fill_Object01)
emit02 = scene.getEmitter(Container01)

for i in emit01.getParticles():
pos = i.getPosition()
vel = i.getVelocity()
if i.getAge() > 1:
emit01.removeParticle(i.getId())
emit02.addParticle(pos, vel)

thanks


Return to “Python-Scripting”

Who is online

Users browsing this forum: No registered users and 1 guest