mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-15 18:14:08 +00:00
Users can now toggle hiding of null / empty properties in case they are powerusers
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user