fillObjects = scene.getSelectedNodes()
if (len(fillObjects) != 1):
scene.message("Select one closed 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 selectSelect an object.")
scene.reset() |