From f327a999d0c8ea1a82cf78608cd10d72fa814ba5 Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Thu, 12 Mar 2026 14:00:08 -0500 Subject: [PATCH] Closes #7780 - Add ALT+Click unhide to select_ifc_class Clear hide_viewport and hide_set on matched objects when the operator is invoked with Alt held, so hidden objects of the target IFC class are revealed and selected. Generated with the assistance of an AI coding tool. --- src/bonsai/bonsai/bim/module/search/operator.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/module/search/operator.py b/src/bonsai/bonsai/bim/module/search/operator.py index d5a6b9b1e6..b7dd669157 100644 --- a/src/bonsai/bonsai/bim/module/search/operator.py +++ b/src/bonsai/bonsai/bim/module/search/operator.py @@ -1264,15 +1264,17 @@ class SelectGlobalId(Operator): class SelectIfcClass(Operator): - """Click to select all objects that match with the given IFC class\nSHIFT + Click to also match Predefined Type""" + """Click to select all objects that match with the given IFC class\nSHIFT + Click to also match Predefined Type\nALT + Click to also unhide hidden objects (viewport and local hide)""" bl_idname = "bim.select_ifc_class" bl_label = "Select IFC Class" bl_options = {"REGISTER", "UNDO"} should_filter_predefined_type: BoolProperty(default=False) + should_unhide: BoolProperty(default=False) def invoke(self, context, event): self.should_filter_predefined_type = event.shift + self.should_unhide = event.alt return self.execute(context) def execute(self, context): @@ -1292,6 +1294,9 @@ class SelectIfcClass(Operator): ): continue if obj := tool.Ifc.get_object(element): + if self.should_unhide: + obj.hide_viewport = False + obj.hide_set(False) tool.Blender.select_object(obj) # copy selection query to clipboard