#1951. Fix bug where opening standard cases couldn't be added as voids.

This commit is contained in:
Dion Moult
2022-03-27 18:21:22 +11:00
parent 28336140ca
commit 5797937825
@@ -49,7 +49,11 @@ class BIM_PT_voids(Panel):
if len(context.selected_objects) == 2:
op = row.operator("bim.add_opening", icon="ADD", text="Add Opening")
for obj in context.selected_objects:
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
if (
"IfcOpeningElement" in obj.name
or "IfcOpeningStandardCase" 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