def execute(self, context):
if context.mode == "OBJECT":
o = context.active_object
props = archipack_reference_point.datablock(o)
if props is None:
return {'CANCELLED'}
bpy.ops.object.select_all(action="DESELECT")
bpy.ops.archipack.reference_point(location_3d=props.location_3d)
for child in o.children:
child.select = True
bpy.ops.archipack.parent_to_reference()
context.scene.objects.unlink(o)
return {'FINISHED'}
else:
self.report({'WARNING'}, "Archipack: Option only valid in Object mode")
return {'CANCELLED'}
评论列表
文章目录