THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/02/2008 at 02:43, xxxxxxxx wrote:
I don't know maybe something wrong with your tree.op/leaf.op pointers? I tried a simple example with a cube and a sphere inserted under a null and this works fine.
> \> BaseObject \*AtomObject::GetVirtualObjects(PluginObject \*op, HierarchyHelp \*hh) \> { \> // group all further objects with this null object \> BaseObject \*main=NULL, \*cube=NULL, \*sphere=NULL; \> \> main = BaseObject::Alloc(Onull); \> if(!main) goto Error; \> \> cube = BaseObject::Alloc(Ocube); \> if(!cube) goto Error; \> \> sphere = BaseObject::Alloc(Osphere); \> if(!sphere) goto Error; \> \> cube->SetPos(Vector(150,0,0)); \> cube->InsertUnderLast(main); \> \> sphere->SetPos(Vector(-150,0,0)); \> sphere->InsertUnderLast(main); \> \> return main; \> \> Error: \> blDelete(main); \> blDelete(cube); \> blDelete(sphere); \> return NULL; \> } \>
cheers,
Matthias