...
You now can see how the clone objects are created and distributed to the vertices of the existing objects. Here The cubes on the right were dyed with a little script, adding random colours to the nodes. You should already be able to write this extension.
Here is the entire listing:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Batch script counter = 1 objectList = scene.getObjects() for single_object in objectList: vertexList = single_object.getVertices() for single_vertex in vertexList: vertex_position = single_vertex.getPosition() scene.addSphere() if (counter < 10): cloneObject_name= "Sphere0"+str(counter) else: cloneObject_name = "Sphere"+str(counter) cloneObject = scene.getObject(cloneObject_name) cloneObject.setParameter("Position", vertex_position) cloneObject.setParameter("Scale", Vector.new(0.2, 0.2, 0.2)) counter += 1 |
...