I have two large objects on my scene.
CAM = a large cone with four sides, more like a camera, made out of scaling a generic cone
Target = a large rectangular object, made out of scaling a simple 4 sided cube
I am trying to make 5 copies of them. I am running the following scripts -
import bpy
getting the objects
context = bpy.context
scene = context.scene
tar = bpy.data.objects['Target']
cam =bpy.data.objects['CAM']
for i in range(5):
# copying the Target object
copied_object = bpy.data.objects.new(str("Target"+str(i)), tar.data)
bpy.data.collections["Collection"].objects.link(copied_object)
# copying the CAM object
copied_object2 = bpy.data.objects.new(str("CAM"+str(i)), cam.data)
bpy.data.collections["Collection"].objects.link(copied_object2)
I am expecting to get 5 copies of the Target and 5 copies of the CAM. However, I ended up getting 5 basic cubes and 5 basic cones (4 sides). It's giving me copies of the most basic object I created to recreate "Target" and "CAM". Why I am not getting the exact copies of the current objects?