Fix #3636 : Check if representation class exists before testing if it's a circle extrusion representation

This commit is contained in:
Gorgious
2023-08-24 20:42:42 +02:00
parent a29ae07b72
commit 2ff4aba6cc
@@ -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