Comment out outdated code #6200

This commit is contained in:
Andrej730
2025-02-24 16:44:54 +05:00
parent 57d6e9b544
commit e06684e274
2 changed files with 12 additions and 9 deletions
@@ -150,15 +150,17 @@ class Annotator:
collection.objects.link(obj)
return obj
if object_type != "ANGLE":
for obj in collection.objects:
element = tool.Ifc.get_entity(obj)
if (
element
and ifcopenshell.util.element.get_predefined_type(element) == object_type
and obj.type == data_type.upper()
):
return obj
# TODO: remove as outdated?
# Is reusing the same objects preventing the creation of new annotations.
# if object_type != "ANGLE":
# for obj in collection.objects:
# element = tool.Ifc.get_entity(obj)
# if (
# element
# and ifcopenshell.util.element.get_predefined_type(element) == object_type
# and obj.type == data_type.upper()
# ):
# return obj
if data_type == "mesh":
data = bpy.data.meshes.new(object_type)
+1
View File
@@ -417,6 +417,7 @@ def add_annotation(
drawing_tool.show_decorations()
obj = drawing_tool.create_annotation_object(drawing, object_type)
element = ifc.get_entity(obj)
# TODO: element is never None?
if not element:
relating_type_rep = drawing_tool.get_annotation_representation(relating_type) if relating_type else None
element = drawing_tool.run_root_assign_class(