From bf6c3e40d364142d6002cf3872a7b8a73df1ff14 Mon Sep 17 00:00:00 2001 From: Gorgious Date: Thu, 19 Aug 2021 21:06:45 +0200 Subject: [PATCH] Fix console error due to accessing empty dynamic enum --- src/blenderbim/blenderbim/bim/module/type/ui.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/type/ui.py b/src/blenderbim/blenderbim/bim/module/type/ui.py index 533f3e61ee..48637ddd6e 100644 --- a/src/blenderbim/blenderbim/bim/module/type/ui.py +++ b/src/blenderbim/blenderbim/bim/module/type/ui.py @@ -17,6 +17,7 @@ # You should have received a copy of the GNU General Public License # along with BlenderBIM Add-on. If not, see . +import blenderbim.bim.module.type.prop as type_prop from bpy.types import Panel from blenderbim.bim.ifc import IfcStore from ifcopenshell.api.type.data import Data @@ -67,7 +68,7 @@ class BIM_PT_type(Panel): row = self.layout.row(align=True) row.prop(props, "relating_type_class", text="") - if props.relating_type: + if type_prop.getRelatingTypes(None, context): row.prop(props, "relating_type", text="") row.operator("bim.assign_type", icon="CHECKMARK", text="") else: