mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 22:33:33 +00:00
incorporate @brunoperdigao's suggestion https://github.com/IfcOpenShell/IfcOpenShell/pull/4552#discussion_r1571519262
This commit is contained in:
@@ -195,9 +195,9 @@ class BIM_OT_select_parts(bpy.types.Operator):
|
|||||||
for obj in context.selected_objects:
|
for obj in context.selected_objects:
|
||||||
parts = ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj))
|
parts = ifcopenshell.util.element.get_parts(tool.Ifc.get_entity(obj))
|
||||||
if parts:
|
if parts:
|
||||||
p_objs = set(tool.Ifc.get_object(part) for part in parts)
|
parts_objs = set(tool.Ifc.get_object(part) for part in parts)
|
||||||
selectable_p_objs = set(context.selectable_objects).intersection(p_objs)
|
selectable_parts_objs = set(context.selectable_objects).intersection(parts_objs)
|
||||||
for selectable_part_obj in selectable_p_objs:
|
for selectable_part_obj in selectable_parts_objs:
|
||||||
selectable_part_obj.select_set(True)
|
selectable_part_obj.select_set(True)
|
||||||
else:
|
else:
|
||||||
obj.select_set(False)
|
obj.select_set(False)
|
||||||
|
|||||||
Reference in New Issue
Block a user