Unhide objects when showing container visibility

When mode is SHOW or ISOLATE, also unhide individual
objects (hide_viewport and hide_set) within each
container, not just the collection-level visibility.

Generated with the assistance of an AI coding tool.
This commit is contained in:
Ryan Schultz
2026-03-20 19:38:57 -05:00
parent 15228ac8b5
commit e3d5e1d1fe
@@ -533,6 +533,11 @@ class SetContainerVisibility(bpy.types.Operator):
if obj := tool.Ifc.get_object(container):
if collection := tool.Blender.get_object_bim_props(obj).collection:
collection.hide_viewport = should_hide
if not should_hide:
for element in tool.Spatial.get_decomposed_elements(container, is_recursive=False):
if element_obj := tool.Ifc.get_object(element):
element_obj.hide_viewport = False
element_obj.hide_set(False)
if self.should_include_children:
queue.extend(ifcopenshell.util.element.get_parts(container))
return {"FINISHED"}