# creating an array of clones
import bpy
def army(mesh):
scn = bpy.context.scene
for r in range(10):
for c in range(4):
obj = bpy.data.objects.new("army", mesh)
obj.location = ( r*3, c*3, 2)
scn.objects.link(obj)
army(bpy.data.meshes["Cube"])
|
Blender python API quick-start
Syntax highlighting by Pygments.