THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/03/2003 at 01:42, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 7.3
Platform: Windows ; Mac ;
Language(s) : C.O.F.F.E.E ;
---------
Hi,
When I try to copy an object using GetClone() function, my C4D, gave Illegal Performance and shuts down the application. Where am I doing wrong?
var CurrentDoc = GetActiveDocument();
var objFile = GeGetRootFilename();
objFile->RemoveLast();
objFile->AddLast("diamond.c4d");
var doc = LoadDocument(objFile);
var DiamondDoc = GetActiveDocument();
var Obj=DiamondDoc->GetFirstObject();
if (Obj)
{
var Obj1 = Obj->GetClone(0);
CurrentDoc->InsertObject(Obj1,NULL,NULL);
DiamondDoc->Remove();
DiamondDoc=NULL;
}
GeEventAdd(DOCUMENT_CHANGED);