You can now select stuff like doors / windows instead of having to select the opening element itself when adding voids, with some assumptions. See #1426.

This commit is contained in:
Dion Moult
2021-04-11 21:15:39 +10:00
parent a70fb41652
commit 4202c08487
2 changed files with 6 additions and 2 deletions
@@ -84,9 +84,11 @@ class PieAddOpening(bpy.types.Operator):
for obj in context.selected_objects:
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
opening_name = obj.name
elif len(obj.children) == 1 and not obj.children[0].BIMObjectProperties.ifc_definition_id:
opening_name = obj.children[0].name
else:
obj_name = obj.name
bpy.ops.bim.add_opening(obj=obj_name, opening=opening_name)
opj_name = obj.name
bpy.ops.bim.add_opening(obj=opj_name, opening=opening_name)
return {"FINISHED"}
@@ -27,6 +27,8 @@ class BIM_PT_voids(Panel):
for obj in context.selected_objects:
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
op.opening = obj.name
elif len(obj.children) == 1 and not obj.children[0].BIMObjectProperties.ifc_definition_id:
op.opening = obj.children[0].name
else:
op.obj = obj.name