From 2ff4aba6cc633789db27df1229216d11346e356c Mon Sep 17 00:00:00 2001 From: Gorgious Date: Thu, 24 Aug 2023 20:42:42 +0200 Subject: [PATCH] Fix #3636 : Check if representation class exists before testing if it's a circle extrusion representation --- src/blenderbim/blenderbim/bim/module/geometry/operator.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/bim/module/geometry/operator.py b/src/blenderbim/blenderbim/bim/module/geometry/operator.py index c7955a0d08..b50a82a4fd 100644 --- a/src/blenderbim/blenderbim/bim/module/geometry/operator.py +++ b/src/blenderbim/blenderbim/bim/module/geometry/operator.py @@ -1370,9 +1370,10 @@ class OverrideModeSetEdit(bpy.types.Operator): continue is_profile = True + representation_class = tool.Geometry.get_ifc_representation_class(element, representation) if usage_type == "PROFILE": operator = lambda: bpy.ops.bim.hotkey(hotkey="A_E") - elif "IfcCircleProfileDef" in tool.Geometry.get_ifc_representation_class(element, representation): + elif representation_class and "IfcCircleProfileDef" in representation_class: self.report({"INFO"}, "Can't edit Circle Profile Extrusion") obj.select_set(False) continue