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