Dupes - ZackWilde27/Z3dPy GitHub Wiki

Dupes are duplicates of a Thing, it has a unique position and rotation, but for everything else it will borrow from the original.

The structure of a Dupe is the same as a Thing, so Thing functions should be used for accessing variables

Using the internal list


# AddThing(thing, *iLayer)
z3dpy.AddThing(myThing)

# AddDupe(thing, vPos, vRot, *iLayer)
z3dpy.AddDupe(myThing, [1.0, 2.0, 3.0], [4.0, 5.0, 6.0])

# Raster() will automatically draw dupes
for tri in z3dpy.Raster():

iLayer must be the same as the original thing. I used default in both cases

Using your own list:

myList = [myChar, thatTree]


# Dupe(iIndex, vPos, vRot)
# iIndex is the index of the original in your list, so it's a dupe of thatTree
myDupe = z3dpy.Dupe(1, [1.0, 2.0, 3.0], [4.0, 5.0, 6.0])

# Add the dupe to your list
myList.append(myDupe)

for tri in z3dpy.RasterThings(myList):