mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +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:
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user