mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-24 05:17:58 +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):
|
def _execute(self, context):
|
||||||
props = bpy.context.scene.BIMModelProperties
|
props = bpy.context.scene.BIMModelProperties
|
||||||
building_objs = set()
|
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)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element:
|
if not element:
|
||||||
continue
|
continue
|
||||||
|
|||||||
@@ -1258,12 +1258,14 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
bpy.ops.bim.enable_editing_extrusion_axis()
|
bpy.ops.bim.enable_editing_extrusion_axis()
|
||||||
|
|
||||||
def hotkey_A_O(self):
|
def hotkey_A_O(self):
|
||||||
if not bpy.context.selected_objects:
|
if (
|
||||||
return
|
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()
|
bpy.ops.bim.edit_openings()
|
||||||
else:
|
else:
|
||||||
bpy.ops.bim.show_openings()
|
bpy.ops.bim.show_openings()
|
||||||
|
|
||||||
|
|
||||||
custom_icon_previews = None
|
custom_icon_previews = None
|
||||||
|
|||||||
Reference in New Issue
Block a user