mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 10:11:46 +00:00
small tweak to 3ff31b577c and cd013079f4 - duplicate material and duplicate style have '_copy' suffix.
This commit is contained in:
@@ -40,7 +40,9 @@ class Material(blenderbim.core.tool.Material):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def duplicate_material(cls, material: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
|
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
|
@classmethod
|
||||||
def enable_editing_materials(cls):
|
def enable_editing_materials(cls):
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ class Style(blenderbim.core.tool.Style):
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def duplicate_style(cls, style: ifcopenshell.entity_instance) -> ifcopenshell.entity_instance:
|
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
|
@classmethod
|
||||||
def enable_editing(cls, obj):
|
def enable_editing(cls, obj):
|
||||||
|
|||||||
Reference in New Issue
Block a user