On 02/10/2014 at 17:57, xxxxxxxx wrote:
Yeah. It's a confusing name to use.
I would personally call it the "source doc" instead of "temp doc".
I've never needed to do a distinct copy like that. Because I always use a traditional temp doc and then delete it right away. Which breaks any connections between them.
But I do know that of you want to copy a rigged character. You have to use AliasTrans to get another copy of it.
PolygonObject *obj = (PolygonObject* ) doc->GetActiveObject(); if(!(obj && (obj->GetType() == Opolygon))) return FALSE; AutoAlloc<AliasTrans> aliastrans; if(!aliastrans || !aliastrans->Init(doc)) return FALSE; C4DAtom *copy = obj->GetClone(COPYFLAGS_0, aliastrans); if(!copy) return FALSE; aliastrans->Translate(TRUE); BaseObject *cloneObj = (BaseObject* )copy; doc->InsertObject(cloneObj, NULL, NULL);
I don't know if that will work for you or not.
I don't know that much about how and when to use AliasTrans. It might only be for keeping any linkfield data in tact. And not have anything to do with creating a new distinct copy of the object