From 5a8f557e7f0b0943c8c0b5c152ee69c40aee4fdd Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Fri, 28 Nov 2025 10:41:34 -0600 Subject: [PATCH] Fix #7398: move purge funtions with other purge functions --- src/bonsai/bonsai/bim/module/debug/ui.py | 17 ----------------- src/bonsai/bonsai/bim/module/project/ui.py | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/debug/ui.py b/src/bonsai/bonsai/bim/module/debug/ui.py index 76c2ac79f7..58af7b9f72 100644 --- a/src/bonsai/bonsai/bim/module/debug/ui.py +++ b/src/bonsai/bonsai/bim/module/debug/ui.py @@ -109,23 +109,6 @@ class BIM_PT_debug(Panel): row.prop(props, "display_type", text="") row.operator("bim.override_display_type").display = props.display_type - layout.operator("bim.purge_unused_representations") - - row = layout.row(align=True) - row.prop(props, "ifc_class_purge", text="") - row.operator("bim.purge_unused_elements_by_class", text="Purge Orphaned", icon="TRASH") - row.operator("bim.print_unused_elements_stats", text="", icon="INFO") - - if context.active_object and (data := context.active_object.data): - mprops = tool.Geometry.get_mesh_props(data) - row = layout.row() - row.operator("bim.get_representation_ifc_parameters") - for index, ifc_parameter in enumerate(mprops.ifc_parameters): - row = layout.row(align=True) - row.prop(ifc_parameter, "name", text="") - row.prop(ifc_parameter, "value", text="") - row.operator("bim.update_parametric_representation", icon="FILE_REFRESH", text="").index = index - layout.label(text="Inspector:") row = layout.row(align=True) diff --git a/src/bonsai/bonsai/bim/module/project/ui.py b/src/bonsai/bonsai/bim/module/project/ui.py index 03b4222008..505816b49b 100644 --- a/src/bonsai/bonsai/bim/module/project/ui.py +++ b/src/bonsai/bonsai/bim/module/project/ui.py @@ -635,6 +635,7 @@ class BIM_PT_purge(Panel): bl_parent_id = "BIM_PT_tab_quality_control" def draw(self, context): + props = tool.Debug.get_debug_props() layout = self.layout layout.operator("bim.purge_unused_objects", text="Purge Unused Profiles").object_type = "PROFILE" layout.operator("bim.purge_unused_objects", text="Purge Unused Types").object_type = "TYPE" @@ -655,3 +656,23 @@ class BIM_PT_purge(Panel): row.operator("bim.purge_unused_objects", text="Purge Unused").object_type = object_type merge_op = row.operator("bim.merge_identical_objects", text="Merge Identical") merge_op.object_type = object_type + + layout.operator("bim.purge_unused_representations") + + row = layout.row(align=True) + row.prop(props, "ifc_class_purge", text="") + row.operator("bim.purge_unused_elements_by_class", text="Purge Orphaned", icon="TRASH") + row.operator("bim.print_unused_elements_stats", text="", icon="INFO") + + if context.active_object and (data := context.active_object.data): + mprops = tool.Geometry.get_mesh_props(data) + row = layout.row() + row.operator("bim.get_representation_ifc_parameters") + for index, ifc_parameter in enumerate(mprops.ifc_parameters): + row = layout.row(align=True) + row.prop(ifc_parameter, "name", text="") + row.prop(ifc_parameter, "value", text="") + row.operator("bim.update_parametric_representation", icon="FILE_REFRESH", text="").index = index + + +