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) collection.objects.link(obj)
return obj return obj
if object_type != "ANGLE": # TODO: remove as outdated?
for obj in collection.objects: # Is reusing the same objects preventing the creation of new annotations.
element = tool.Ifc.get_entity(obj) # if object_type != "ANGLE":
if ( # for obj in collection.objects:
element # element = tool.Ifc.get_entity(obj)
and ifcopenshell.util.element.get_predefined_type(element) == object_type # if (
and obj.type == data_type.upper() # element
): # and ifcopenshell.util.element.get_predefined_type(element) == object_type
return obj # and obj.type == data_type.upper()
# ):
# return obj
if data_type == "mesh": if data_type == "mesh":
data = bpy.data.meshes.new(object_type) data = bpy.data.meshes.new(object_type)
+1
View File
@@ -417,6 +417,7 @@ def add_annotation(
drawing_tool.show_decorations() drawing_tool.show_decorations()
obj = drawing_tool.create_annotation_object(drawing, object_type) obj = drawing_tool.create_annotation_object(drawing, object_type)
element = ifc.get_entity(obj) element = ifc.get_entity(obj)
# TODO: element is never None?
if not element: if not element:
relating_type_rep = drawing_tool.get_annotation_representation(relating_type) if relating_type else None relating_type_rep = drawing_tool.get_annotation_representation(relating_type) if relating_type else None
element = drawing_tool.run_root_assign_class( element = drawing_tool.run_root_assign_class(