mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 10:06:47 +00:00
Be able to close openings no matter what is selected.
This commit is contained in:
@@ -881,8 +881,9 @@ class EditOpenings(Operator, tool.Ifc.Operator):
|
||||
def _execute(self, context):
|
||||
props = bpy.context.scene.BIMModelProperties
|
||||
building_objs = set()
|
||||
current_openings = bpy.data.collections.get("IfcOpeningElement").objects
|
||||
|
||||
for obj in context.selected_objects:
|
||||
for obj in current_openings:
|
||||
element = tool.Ifc.get_entity(obj)
|
||||
if not element:
|
||||
continue
|
||||
|
||||
@@ -1258,12 +1258,14 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
|
||||
bpy.ops.bim.enable_editing_extrusion_axis()
|
||||
|
||||
def hotkey_A_O(self):
|
||||
if not bpy.context.selected_objects:
|
||||
return
|
||||
if AuthoringData.data["has_visible_openings"]:
|
||||
if (
|
||||
AuthoringData.data["has_visible_openings"]
|
||||
or not bpy.context.selected_objects
|
||||
or AuthoringData.data["active_class"] == "IfcOpeningElement"
|
||||
):
|
||||
bpy.ops.bim.edit_openings()
|
||||
else:
|
||||
bpy.ops.bim.show_openings()
|
||||
bpy.ops.bim.show_openings()
|
||||
|
||||
|
||||
custom_icon_previews = None
|
||||
|
||||
Reference in New Issue
Block a user