THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/06/2009 at 12:53, xxxxxxxx wrote:
Cinema 4D Version: r11
Platform: Windows ;
Language(s) : C++ ;
i have managed to create an AtomArray which holds all objects in the scene, now i want filter away the the lights out, create a new Document and copy the Objects from the list to that new doc.
\> BaseDocument *doc3 = BaseDocument::Alloc();
\> if (!doc3) goto Ende;
\> BaseObject *newParent = BaseObject::Alloc(Onull);
\> for(int i=0;i<sceneObjects->GetCount();i++)
anyway, the line in the loop where i try to insert the objects simply switches cinema away, not even a crash message appears
what am i doing wrong there? i guess something very basic?
On 12/06/2009 at 13:16, xxxxxxxx wrote:
ok, i managed it to work , at least somehow:
but now if the base document looks for example like this:
the target looks like this:
something still wents wrong and now i really dont have a clue what it is??
anyone has a hint?
and to make it more strange the light objects are still there. seems the Filter doesnt work...
edit: i guess its better to filter manually by using GetType(), but why are those duplications happening? ok, i think because the parent gets copied with the childs?? gonna test