small tweak to 3ff31b577c and cd013079f4 - duplicate material and duplicate style have '_copy' suffix.

This commit is contained in:
Ryan Schultz
2024-04-24 21:48:26 -05:00
parent c0b4e099af
commit 4711672170
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ class Material(blenderbim.core.tool.Material):
@classmethod
def duplicate_material(cls, material: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
return ifcopenshell.util.element.copy_deep(tool.Ifc.get(), material)
new_material = ifcopenshell.util.element.copy_deep(tool.Ifc.get(), material)
new_material.Name = material.Name + "_copy"
return new_material
@classmethod
def enable_editing_materials(cls):
+3 -1
View File
@@ -62,7 +62,9 @@ class Style(blenderbim.core.tool.Style):
@classmethod
def duplicate_style(cls, style: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
return ifcopenshell.util.element.copy_deep(tool.Ifc.get(), style)
new_style = ifcopenshell.util.element.copy_deep(tool.Ifc.get(), style)
new_style.Name = style.Name + "_copy"
return new_style
@classmethod
def enable_editing(cls, obj):