def execute(self, context):
x = 0
y = 0
obj = bpy.context.active_object
if obj:
for v in range(0, self.county):
if self.trisq:
if operator.mod(v, 2) == 0:
x = 0
else:
x = self.radius
else:
x = 0
for u in range(0, self.countx):
if not (u == 0 and v == 0):
bpy.ops.object.duplicate(linked=self.linkedcopy)
obj = bpy.context.active_object
obj.location = (x, y, 0)
x += 2 * self.radius
if self.trisq:
y += 2 * self.radius * math.sqrt(0.75)
else:
y += 2 * self.radius
return {'FINISHED'}
评论列表
文章目录