Dyverso Melt Script

Discussion about scripting with Python
NinoZ
Posts: 1
Joined: Mon Mar 14, 2016 11:55 am

Dyverso Melt Script

Postby NinoZ » Mon Mar 14, 2016 11:59 am

Hi there,

I use this melt script by Karl Richter for a current project.
Somebody has any idea how i can make it work with Dyverso Emitters?

Heres the current script

Code: Select all

def onSimulationFrame():
   emitter = scene.getEmitter("Fill_Object01")
   emitter2 = scene.getEmitter("Circle01")
   particle = emitter.getFirstParticle()
   
   while particle:
      nor = particle.getNormal()
      mag = nor.module()
      if mag > .67:
         pos = particle.getPosition()
         id = particle.getId()
         vel = particle.getVelocity()
         emitter.removeParticle(id)
         emitter2.addParticle(pos,vel)


      particle = particle.getNextParticle()


Return to “Python-Scripting”

Who is online

Users browsing this forum: No registered users and 3 guests