Versions Compared

Key

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

...

Code Block
languagepy
fillObjects    = scene.getSelectedNodes()
dyversoDomain  = scene.add_DY_Domain()
dyversoEmitter
=
scene.add_DY_Emitter("Fill")

if (len(fillObjects) =!= 01):
	scene.message("Select exactlyone oneclosed object!")

else:
	for node in fillObjects:

		if (node.getType() == TYPE_OBJECT):
			dyversoDomain  = scene.add_DY_Domain()
			dyversoEmitter = scene.add_DY_Emitter("Fill")

			dyversoEmitter.setParameter("Object", node.getName())
			node.setParameter("Volume mode", "Solid inside")

			scene.removeGlobalLink(node)
			scene.addExclusiveLink(dyversoDomain, dyversoEmitter)

			nodeCopy = node.clone()
			nodeCopy.setParameter("Volume mode", "Solid outside")

		else:
			scene.message("You must select an object.")

	scene.reset()