Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

Add the script to Simulation Flow (Ctrl/Cmd + F2) > FramesPost or StepsPost.

The script copies Dyverso particles from "DY_Doman01" to "DY_Domain02" when they are colliding with an object. In order to avoid instabilities, the original particles will be deleted. Both domains must have exactly the same "Resolution" and "Type" settings.

Use different colors for domains' particles to see the separation, or apply different daemons to the individual domains.

domainA   = scene.get_DY_Domain("DY_Domain01")
domainB   = scene.get_DY_Domain("DY_Domain02")
particles = domainA.getParticles()
 
for particle in particles:
	if (particle.isColliding() == True):
	domainB.addParticle(particle.getPosition(), particle.getVelocity())
	domainA.removeParticle(particle.getId())
  • No labels