mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
Fix bug where you couldn't duplicate text annotations.
This commit is contained in:
@@ -32,9 +32,10 @@ def copy_class(ifc, collector, geometry, root, obj=None):
|
||||
root.copy_representation(element, new)
|
||||
new_representation = root.get_element_representation(new, root.get_representation_context(representation))
|
||||
data = geometry.duplicate_object_data(obj)
|
||||
geometry.change_object_data(obj, data, is_global=True)
|
||||
geometry.rename_object(data, geometry.get_representation_name(new_representation))
|
||||
geometry.link(new_representation, data)
|
||||
if data:
|
||||
geometry.change_object_data(obj, data, is_global=True)
|
||||
geometry.rename_object(data, geometry.get_representation_name(new_representation))
|
||||
geometry.link(new_representation, data)
|
||||
root.assign_body_styles(new, obj)
|
||||
collector.assign(obj)
|
||||
if root.is_opening_element(new):
|
||||
|
||||
@@ -72,7 +72,8 @@ class Geometry(blenderbim.core.tool.Geometry):
|
||||
|
||||
@classmethod
|
||||
def duplicate_object_data(cls, obj):
|
||||
return obj.data.copy()
|
||||
if obj.data:
|
||||
return obj.data.copy()
|
||||
|
||||
@classmethod
|
||||
def get_cartesian_point_coordinate_offset(cls, obj):
|
||||
|
||||
Reference in New Issue
Block a user