mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:02:29 +00:00
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:
@@ -84,9 +84,11 @@ class PieAddOpening(bpy.types.Operator):
|
|||||||
for obj in context.selected_objects:
|
for obj in context.selected_objects:
|
||||||
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
|
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
|
||||||
opening_name = obj.name
|
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:
|
else:
|
||||||
obj_name = obj.name
|
opj_name = obj.name
|
||||||
bpy.ops.bim.add_opening(obj=obj_name, opening=opening_name)
|
bpy.ops.bim.add_opening(obj=opj_name, opening=opening_name)
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ class BIM_PT_voids(Panel):
|
|||||||
for obj in context.selected_objects:
|
for obj in context.selected_objects:
|
||||||
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
|
if "IfcOpeningElement" in obj.name or not obj.BIMObjectProperties.ifc_definition_id:
|
||||||
op.opening = obj.name
|
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:
|
else:
|
||||||
op.obj = obj.name
|
op.obj = obj.name
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user