Gryphon_de Posted December 1, 2011 Share Posted December 1, 2011 Hello! I need to load node, add its child to editor and delete parent and other childs. I'm using code like this: Node firstChild; Node node = engine.world.loadNode( "some.node" ); if( node.getNumChilds() > 0 ) { firstChild = node_clone( node.getChild( 0 ) ); node_delete( node_append( node ) ); // firstChild == NULL now! } else { firstChild = node; } engine.editor.addNode( firstChild ); What do I do wrong? Thanks! Link to comment
Gryphon_de Posted December 1, 2011 Author Share Posted December 1, 2011 Solution: firstChild.setParent( NULL ); Link to comment
Recommended Posts