I ran across this script on another forum and would like to implement it. However, I'm running into a major bottle neck (performance-wise) when it gets to linking the new objects back to the scene because in my actual implementation I'm attempting to generate about 1000 cubes.
From my understanding, it sounds as though there is a way to duplicate the object, but keep the duplicate as a part of the original object as is done in Edit Mode when using Shift+D.
import bpy from mathutils import Vector ob = bpy.context.object obs =  sce = bpy.context.scene for i in range(-48, 48, 3): for j in range(-48, 48, 3): copy = ob.copy() copy.location += Vector((i, j, 0)) copy.data = copy.data.copy() obs.append(copy) for ob in obs: sce.objects.link(ob) sce.update()
How would I go about implementing a similar script but instead of creating separate copies of the object just add them to the existing object eliminating the need for the loop that links objects back to the scene?