Fix #2356. Handle cases where the annotation types get changed to an incompatible object type.

This commit is contained in:
Dion Moult
2023-01-29 20:10:09 +11:00
parent c0c6c23fca
commit 686f4a023d
@@ -175,7 +175,7 @@ class Annotator:
if object_type != "ANGLE":
for obj in collection.objects:
element = tool.Ifc.get_entity(obj)
if element and element.ObjectType == object_type:
if element and element.ObjectType == object_type and obj.type == object_type.upper():
return obj
if data_type == "mesh":
data = bpy.data.meshes.new(object_type)