mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
bulk assignment of objects to an aggregate.
This commit is contained in:
@@ -43,13 +43,17 @@ class BIM_OT_assign_object(bpy.types.Operator, Operator):
|
|||||||
related_object: bpy.props.IntProperty()
|
related_object: bpy.props.IntProperty()
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
core.assign_object(
|
for obj in bpy.context.selected_objects:
|
||||||
tool.Ifc,
|
element = tool.Ifc.get_entity(obj)
|
||||||
tool.Aggregate,
|
if not element:
|
||||||
tool.Collector,
|
continue
|
||||||
relating_obj=tool.Ifc.get_object(tool.Ifc.get().by_id(self.relating_object)),
|
core.assign_object(
|
||||||
related_obj=tool.Ifc.get_object(tool.Ifc.get().by_id(self.related_object)),
|
tool.Ifc,
|
||||||
)
|
tool.Aggregate,
|
||||||
|
tool.Collector,
|
||||||
|
relating_obj=tool.Ifc.get_object(tool.Ifc.get().by_id(self.relating_object)),
|
||||||
|
related_obj=obj,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class BIM_OT_unassign_object(bpy.types.Operator, Operator):
|
class BIM_OT_unassign_object(bpy.types.Operator, Operator):
|
||||||
|
|||||||
Reference in New Issue
Block a user