THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/06/2009 at 14:39, xxxxxxxx wrote:
User Information:
Cinema 4D Version: r11
Platform: Windows ;
Language(s) : C++ ;
---------
Hi there,
i am trying to walk thru a document and remove all nullobjects. of course my approach crashes because of the usage of child after deleting it. but i dont know how to delete the object. after child=child->GetNext() it isnt referring the nullobject anymore:
> <code>
>
>> `
\> void StepThru(BaseDocument* doc, BaseObject *child)
\> {
\> while (child)
\> {
\> if (child->GetType()==Onull)
\> {
\> blDelete(child);
\> }
\> StepThru(doc,child->GetDown());
\> child = child->GetNext();
\> }
\> }
\>
`
>
> </code>
any hints? thanks in advance.
cheers,
Ello
Another question is, how can i put all objects of a document in an AtomArray? There i could use FilterObjects, right?