i want to Copy all info of one Object to other Object.Use source.CopyTo(aim), But object aim is dead after CopyTo().
My purpose is to copy all the information of an object except the basic information to another object, so after CopyTo(), I want to use the backup information to restore the basic information of aim, but the object is dead and an exception will be thrown
this is code:
from c4d import gui
source,aim = doc.GetActiveObjects(2)
#backup basic properties
info_list = 
description = aim.GetDescription(c4d.DESCFLAGS_DESC_NONE)
did_list = [c4d.DescID(c4d.DescLevel(110050, 1, 110050)),
c4d.DescID(c4d.DescLevel(1041666, 1, 110050))]
for bc, paramid, groupid in description:
if groupid in did_list:
#restore basic properties
for info in info_list:
aim[info] = info
# Execute main()
Thanks for any help!
This is a python bug; it works as expected when using c++. Try to use the following flag c4d.COPYFLAGS_PRIVATE_IDENTMARKER for now to fix the issue. I will open a bug report and we will try to fix the issue as soon as possible.
@manuel Thanks for your help!