diff --git a/src/ifcblenderexport/blenderbim/bim/module/pset/ui.py b/src/ifcblenderexport/blenderbim/bim/module/pset/ui.py index 9095ac17b3..63096d4f1a 100644 --- a/src/ifcblenderexport/blenderbim/bim/module/pset/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/module/pset/ui.py @@ -39,7 +39,9 @@ def draw_psetqto_ui(context, pset_id, pset, props, layout, obj_type): else: has_props_displayed = False for prop in pset["Properties"]: - if prop["value"] is None or prop["value"] == "": + if context.preferences.addons["blenderbim"].preferences.should_hide_empty_props and ( + prop["value"] is None or prop["value"] == "" + ): continue has_props_displayed = True row = box.row(align=True) @@ -177,7 +179,7 @@ class BIM_PT_material_psets(Panel): if not props.ifc_definition_id: return False if IfcStore.get_file().schema == "IFC2X3": - return False # We don't support material psets in IFC2X3 because they suck + return False # We don't support material psets in IFC2X3 because they suck if props.ifc_definition_id not in Data.products: Data.load(props.ifc_definition_id) if not Data.products[props.ifc_definition_id]: diff --git a/src/ifcblenderexport/blenderbim/bim/ui.py b/src/ifcblenderexport/blenderbim/bim/ui.py index 0ce6f6ccfc..d5f0563aa6 100644 --- a/src/ifcblenderexport/blenderbim/bim/ui.py +++ b/src/ifcblenderexport/blenderbim/bim/ui.py @@ -2,7 +2,7 @@ import os import bpy from . import ifc from bpy.types import Panel -from bpy.props import StringProperty +from bpy.props import StringProperty, BoolProperty class BIM_PT_drawings(Panel): @@ -292,6 +292,7 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences): ) svg_command: StringProperty(name="SVG Command", description="E.g. [['firefox-bin', path]]") pdf_command: StringProperty(name="PDF Command", description="E.g. [['firefox-bin', path]]") + should_hide_empty_props: BoolProperty(name="Should Hide Empty Properties", default=True) def draw(self, context): layout = self.layout @@ -309,6 +310,8 @@ class BIM_ADDON_preferences(bpy.types.AddonPreferences): row.prop(self, "svg_command") row = layout.row() row.prop(self, "pdf_command") + row = layout.row() + row.prop(self, "should_hide_empty_props") class BIM_PT_annotation_utilities(Panel):