spline = scene.getSpline("Spline01")
numCP = spline.getNumberOfControlPoints()
radius = 2.0
existingGroups = scene.getGroups()
if (len(existingGroups) == 0):
group = scene.addGroup()
group.setName("Noise_Daemons")
else:
for entry in existingGroups:
if (entry.getName() == "Noise_Daemons"):
group = entry
else:
group = scene.addGroup()
group.setName("Noise_Daemons")
for controlPoint in range(0, numCP):
cpPosition = spline.getControlPointPosition(controlPoint)
daemon = scene.addDaemon("Noise Field")
daemon.setParameter("Enable falloff", True)
daemon.setParameter("@ Display falloff", True)
daemon.setParameter("@ Falloff percent", 0.0)
daemon.setParameter("@ Falloff bounds", "Sphere")
daemon.setParameter("Scale", Vector.new(radius, radius, radius))
daemon.setParameter("Position", cpPosition)
group.add(daemon.getName()) |