mesh = bpy.data.meshes['Cube'].copy()
obj = bpy.data.objects.new("copy", mesh)
bpy.context.scene.objects.link(obj)
obj.location = (0,3,3)
obj.material_slots[0].material = bpy.data.materials['blue']
|
Blender python API quick-start
Syntax highlighting by Pygments.