Skip to content

Commit

Permalink
small tweak to 3ff31b5 and cd01307 - duplicate material and duplicate…
Browse files Browse the repository at this point in the history
… style have '_copy' suffix.
  • Loading branch information
theoryshaw committed Apr 25, 2024
1 parent c0b4e09 commit 4711672
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/blenderbim/blenderbim/tool/material.py
Expand Up @@ -40,7 +40,9 @@ def disable_editing_materials(cls):

@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):
Expand Down
4 changes: 3 additions & 1 deletion src/blenderbim/blenderbim/tool/style.py
Expand Up @@ -62,7 +62,9 @@ def disable_editing_styles(cls):

@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):
Expand Down

0 comments on commit 4711672

Please sign in to comment.