mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Fix #3393. Bug where duplicating a typed text didn't also copy its literal.
This commit is contained in:
@@ -111,8 +111,12 @@ class Root(blenderbim.core.tool.Root):
|
|||||||
if obj.data and obj.data.BIMMeshProperties.ifc_definition_id:
|
if obj.data and obj.data.BIMMeshProperties.ifc_definition_id:
|
||||||
return tool.Ifc.get().by_id(obj.data.BIMMeshProperties.ifc_definition_id)
|
return tool.Ifc.get().by_id(obj.data.BIMMeshProperties.ifc_definition_id)
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not obj.data and getattr(element, "ObjectType", None) == "TEXT":
|
if element.is_a("IfcTypeProduct"):
|
||||||
return element.Representation.Representations[0]
|
if element.RepresentationMaps:
|
||||||
|
return element.RepresentationMaps[0].MappedRepresentation
|
||||||
|
elif element.is_a("IfcProduct"):
|
||||||
|
if element.Representation:
|
||||||
|
return element.Representation.Representations[0]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_representation_context(cls, representation):
|
def get_representation_context(cls, representation):
|
||||||
|
|||||||
Reference in New Issue
Block a user