On 19/12/2017 at 06:00, xxxxxxxx wrote:
In my CSTO function I use a new document to copy my object to.
However, when I do so, the materials used are not copied to the new document and thus the result of the CSTO has no material information, displaying a question mark.
What can i do in order not to loose the material information.
newDoc = c4d.documents.BaseDocument()
newDoc.InsertObject(obj)
objList = c4d.utils.SendModelingCommand(
command = c4d.MCOMMAND_CURRENTSTATETOOBJECT,
list = [obj],
mode = c4d.MODELINGCOMMANDMODE_ALL,
doc = newDoc,
flags = c4d.MDATA_CURRENTSTATETOOBJECT_INHERITANCE)
if objList == False:
print "error CSTONewDoc."
obj.Remove()