Draft: clone IfcType and Subvolume properties

Fixes #11186.
This commit is contained in:
Roy-043
2023-10-31 12:02:28 +01:00
committed by Yorik van Havre
parent 951059d192
commit e4d6c328fc

View File

@@ -88,16 +88,13 @@ def make_clone(obj, delta=None, forcedraft=False):
base = utils.get_clone_base(obj[0])
cl.Label = prefix + base.Label
cl.CloneOf = base
if hasattr(cl,"Material") and hasattr(obj[0],"Material"):
cl.Material = obj[0].Material
if utils.get_type(obj[0]) != "BuildingPart":
cl.Placement = obj[0].Placement
try:
cl.Role = base.Role
cl.Description = base.Description
cl.Tag = base.Tag
except Exception:
pass
for prop in ("Description", "IfcType", "Material", "Subvolume", "Tag"):
try:
setattr(cl, prop, getattr(base, prop))
except Exception:
pass
if App.GuiUp:
gui_utils.format_object(cl, base)
# Workaround to trigger update of DiffuseColor: