From e695bdbd0d411f84b6bd6c406beb91326dffa004 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Mon, 17 Jul 2023 15:47:10 +1000 Subject: [PATCH] Fix #3449. Fix bug where you couldn't edit the relating type of an annotation. --- src/blenderbim/blenderbim/bim/module/spatial/ui.py | 2 +- src/blenderbim/blenderbim/bim/module/type/data.py | 2 ++ src/blenderbim/blenderbim/bim/module/type/ui.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/spatial/ui.py b/src/blenderbim/blenderbim/bim/module/spatial/ui.py index d40297e1a5..ec66b77248 100644 --- a/src/blenderbim/blenderbim/bim/module/spatial/ui.py +++ b/src/blenderbim/blenderbim/bim/module/spatial/ui.py @@ -72,7 +72,7 @@ class BIM_PT_spatial(Panel): if SpatialData.data["is_directly_contained"]: row.operator("bim.remove_container", icon="X", text="") else: - row.label(text="This object is not spatially contained") + row.label(text="No Spatial Container") row.operator("bim.enable_editing_container", icon="GREASEPENCIL", text="") for reference in SpatialData.data["references"]: row = self.layout.row() diff --git a/src/blenderbim/blenderbim/bim/module/type/data.py b/src/blenderbim/blenderbim/bim/module/type/data.py index 1d23c3363f..27a9ef5c13 100644 --- a/src/blenderbim/blenderbim/bim/module/type/data.py +++ b/src/blenderbim/blenderbim/bim/module/type/data.py @@ -56,6 +56,8 @@ class TypeData: return [] version = tool.Ifc.get_schema() types = ifcopenshell.util.type.get_applicable_types(element.is_a(), schema=version) + if element.is_a("IfcAnnotation"): + types.append("IfcTypeProduct") results.extend((t, t, get_entity_doc(version, t).get("description", "")) for t in types) return results diff --git a/src/blenderbim/blenderbim/bim/module/type/ui.py b/src/blenderbim/blenderbim/bim/module/type/ui.py index 88d2c99caa..ad3fdd92ce 100644 --- a/src/blenderbim/blenderbim/bim/module/type/ui.py +++ b/src/blenderbim/blenderbim/bim/module/type/ui.py @@ -92,7 +92,7 @@ class BIM_PT_type(Panel): row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="") row.operator("bim.unassign_type", icon="X", text="") else: - row.label(text="This object has no type") + row.label(text="No Relating Type") row.operator("bim.enable_editing_type", icon="GREASEPENCIL", text="")