From 490da997922ee827e96fb4b0ea27360f7641f645 Mon Sep 17 00:00:00 2001 From: Gorgious56 Date: Fri, 28 Oct 2022 16:32:17 +0200 Subject: [PATCH] Pset primary measure type should now display a tooltip on hover Awaiting for ifc measure descriptions to be added to the docs --- src/blenderbim/blenderbim/bim/module/pset/data.py | 3 ++- src/blenderbim/blenderbim/bim/module/pset_template/data.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/pset/data.py b/src/blenderbim/blenderbim/bim/module/pset/data.py index 78e6350e7a..73b470c46b 100644 --- a/src/blenderbim/blenderbim/bim/module/pset/data.py +++ b/src/blenderbim/blenderbim/bim/module/pset/data.py @@ -19,6 +19,7 @@ import bpy import ifcopenshell import blenderbim.tool as tool +from blenderbim.bim.prop import get_ifc_entity_description # TODO: Should this cache belong here? Dunno. Maybe. @@ -173,4 +174,4 @@ class AddEditCustomPropertiesData: @classmethod def primary_measure_type(cls): schema = tool.Ifc.schema() - return [(t, t, "") for t in sorted([d.name() for d in schema.declarations() if hasattr(d, "declared_type")])] + return [(t, t, get_ifc_entity_description(t)) for t in sorted([d.name() for d in schema.declarations() if hasattr(d, "declared_type")])] diff --git a/src/blenderbim/blenderbim/bim/module/pset_template/data.py b/src/blenderbim/blenderbim/bim/module/pset_template/data.py index 70cdf93dee..2b3697d375 100644 --- a/src/blenderbim/blenderbim/bim/module/pset_template/data.py +++ b/src/blenderbim/blenderbim/bim/module/pset_template/data.py @@ -21,6 +21,7 @@ import bpy import ifcopenshell import blenderbim.tool as tool from blenderbim.bim.ifc import IfcStore +from blenderbim.bim.prop import get_ifc_entity_description def refresh(): @@ -43,7 +44,7 @@ class PsetTemplatesData: @classmethod def primary_measure_type(cls): schema = tool.Ifc.schema() - return [(t, t, "") for t in sorted([d.name() for d in schema.declarations() if hasattr(d, "declared_type")])] + return [(t, t, get_ifc_entity_description(t)) for t in sorted([d.name() for d in schema.declarations() if hasattr(d, "declared_type")])] @classmethod def pset_template_files(cls):