Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
emitter   = scene.get_PB_Emitter("Circle01")
particles = emitter.getParticles()

for particle in particles:
	particle.freeze()

Unfreeze Particles

...

Code Block
languagepy
emitter        = scene.get_PB_Emitter("Circle01")
particles      = emitter.getParticles()
unfreezeObject = scene.getObject("Sphere01")
 
for particle in particles:
	particlePosition = particle.getPosition()
	objectPosition = unfreezeObject.getParameter("Position")
	particleObjectDistance = particlePosition.distance(objectPosition)
 
	if (particleObjectDistance <= 0.75): particle.unfreeze()