From f1a4ed702bc8bdf92f00200615099a15949c2cab Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 13 Dec 2023 14:29:10 +0500 Subject: [PATCH] Hide IfcStyledItem from bim.print_unused_elements_stats as IfcStyledItem can be not referred by any other element and it doesn't mean it's not used in the project --- src/blenderbim/blenderbim/bim/module/debug/operator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/debug/operator.py b/src/blenderbim/blenderbim/bim/module/debug/operator.py index 131d35f940..c023de495c 100644 --- a/src/blenderbim/blenderbim/bim/module/debug/operator.py +++ b/src/blenderbim/blenderbim/bim/module/debug/operator.py @@ -475,7 +475,7 @@ class OverrideDisplayType(bpy.types.Operator): class PrintUnusedElementStats(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.print_unused_elements_stats" - bl_label = "Purge Unused Elements Stats" + bl_label = "Print Unused Elements Stats" bl_options = {"REGISTER", "UNDO"} bl_description = ( "Print all unused elements in current IFC project in system console, not limited to the selected class" @@ -484,6 +484,7 @@ class PrintUnusedElementStats(bpy.types.Operator, tool.Ifc.Operator): ignore_contexts: bpy.props.BoolProperty(name="Ignore Contexts", default=True) ignore_relationships: bpy.props.BoolProperty(name="Ignore Relationships", default=True) ignore_types: bpy.props.BoolProperty(name="Ignore Types", default=True) + ignore_styled_items: bpy.props.BoolProperty(name="Ignoer Styled Items", default=True) def _execute(self, context): props = context.scene.BIMDebugProperties @@ -495,6 +496,8 @@ class PrintUnusedElementStats(bpy.types.Operator, tool.Ifc.Operator): ignore_classes += ["IfcRelationship"] if self.ignore_types: ignore_classes += ["IfcTypeProduct"] + if self.ignore_styled_items: + ignore_classes += ["IfcStyledItem"] unused_elements = tool.Debug.print_unused_elements_stats(props.ifc_class_purge, ignore_classes) self.report({"INFO"}, f"{unused_elements} unused elements found, check the system console for the details.") @@ -504,7 +507,7 @@ class PurgeUnusedElementsByClass(bpy.types.Operator, tool.Ifc.Operator): bl_idname = "bim.purge_unused_elements_by_class" bl_label = "Purge Unused Elements By Class" bl_description = ( - "Will find all elements of class that have no inverse refernces and will remove them, use very carefully." + "Will find all elements of class that have no inverse refernces and will remove them, use very carefully" ) bl_options = {"REGISTER", "UNDO"}