Duplicate(mesh=0,
surface=0,
curve=0,
text=0,
metaball=0,
armature=0,
lamp=0,
material=0,
texture=0,
ipo=0)
Duplicate selected objects on visible layers from Blenders current
scene, de-selecting the currently visible, selected objects and making
a copy where all new objects are selected. By default no data linked to
the object is duplicated; use the keyword arguments to change this. Object.GetSelected() will return the list
of objects resulting from duplication.
-
- Parameters:
mesh -
When non-zero, mesh object data will be duplicated with the
objects.
(type=bool)
surface -
When non-zero, surface object data will be duplicated with the
objects.
(type=bool)
curve -
When non-zero, curve object data will be duplicated with the
objects.
(type=bool)
text -
When non-zero, text object data will be duplicated with the
objects.
(type=bool)
metaball -
When non-zero, metaball object data will be duplicated with
the objects.
(type=bool)
armature -
When non-zero, armature object data will be duplicated with
the objects.
(type=bool)
lamp -
When non-zero, lamp object data will be duplicated with the
objects.
(type=bool)
material -
When non-zero, materials used by the object or its object data
will be duplicated with the objects.
(type=bool)
texture -
When non-zero, texture data used by the object's materials
will be duplicated with the objects.
(type=bool)
ipo -
When non-zero, Ipo data linked to the object will be
duplicated with the objects.
Example:
The example below creates duplicates the active object 10
times and moves each object 1.0 on the X axis:
import Blender
scn = Scene.GetCurrent()
activeObject = scn.getActiveObject()
# Unselect all
for ob in Blender.Object.GetSelected():
ob.sel = 0
activeObject.sel = 1
for x in xrange(10):
Blender.Object.Duplicate() # Duplicate linked
activeObject = scn.getActiveObject()
activeObject.LocX += 1
Blender.Redraw()
(type=bool)
|