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.
This commit is contained in:
Ryan Schultz
2026-03-12 14:00:08 -05:00
parent c026dd3b6e
commit f327a999d0
@@ -1264,15 +1264,17 @@ class SelectGlobalId(Operator):
class SelectIfcClass(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_idname = "bim.select_ifc_class"
bl_label = "Select IFC Class" bl_label = "Select IFC Class"
bl_options = {"REGISTER", "UNDO"} bl_options = {"REGISTER", "UNDO"}
should_filter_predefined_type: BoolProperty(default=False) should_filter_predefined_type: BoolProperty(default=False)
should_unhide: BoolProperty(default=False)
def invoke(self, context, event): def invoke(self, context, event):
self.should_filter_predefined_type = event.shift self.should_filter_predefined_type = event.shift
self.should_unhide = event.alt
return self.execute(context) return self.execute(context)
def execute(self, context): def execute(self, context):
@@ -1292,6 +1294,9 @@ class SelectIfcClass(Operator):
): ):
continue continue
if obj := tool.Ifc.get_object(element): if obj := tool.Ifc.get_object(element):
if self.should_unhide:
obj.hide_viewport = False
obj.hide_set(False)
tool.Blender.select_object(obj) tool.Blender.select_object(obj)
# copy selection query to clipboard # copy selection query to clipboard