Fix bug where you couldn't duplicate text annotations.

This commit is contained in:
Dion Moult
2023-02-12 15:02:41 +11:00
parent 82b201a14e
commit a9a4c6049f
2 changed files with 6 additions and 4 deletions
+1
View File
@@ -32,6 +32,7 @@ def copy_class(ifc, collector, geometry, root, obj=None):
root.copy_representation(element, new) root.copy_representation(element, new)
new_representation = root.get_element_representation(new, root.get_representation_context(representation)) new_representation = root.get_element_representation(new, root.get_representation_context(representation))
data = geometry.duplicate_object_data(obj) data = geometry.duplicate_object_data(obj)
if data:
geometry.change_object_data(obj, data, is_global=True) geometry.change_object_data(obj, data, is_global=True)
geometry.rename_object(data, geometry.get_representation_name(new_representation)) geometry.rename_object(data, geometry.get_representation_name(new_representation))
geometry.link(new_representation, data) geometry.link(new_representation, data)
@@ -72,6 +72,7 @@ class Geometry(blenderbim.core.tool.Geometry):
@classmethod @classmethod
def duplicate_object_data(cls, obj): def duplicate_object_data(cls, obj):
if obj.data:
return obj.data.copy() return obj.data.copy()
@classmethod @classmethod