Hi Sebastian, As a general note, like I'm not the original author of this code so I have to work out the intent from just looking at the code.
On 18 February 2016 at 10:20, Sebastian Messerschmidt < [email protected]> wrote: > The problem with the original implementation is that it will not export > materials which are not directly plugged into the Geode's stateset. The > pushed state is exclusively used for materials and textures. > Thus I expected this the correct way to tackle it. As for the custom > apply(osg::Group&): I believe this stems from the fact that OBJ allows > named "groups". > So maybe I simply don't used the correct way to make groups export their > properties. > > Any suggestion how to tackle this problem differently? Currently exporting > scenes with materials bound to Group-derived nodes export with out > materials/textures etc. > The only thing that catches my eye is the fact, that instead of calling > node.traverse() the apply(Group) calls the > explicitosg::NodeVisitor::traverse( node ).. > > I don't know why line 76 which is : osg::NodeVisitor::traverse( node ); Isn't simply: traverse( node ); As from my reading of the code it would do exactly what you are after. I'm not familiar with the wider code to know what the consequences would be but outwardly this seems to be like a sensible thing to do, but given it takes extra work to add the explicit osg::NodeVisitor:: it would seem like it was a conscious decision by the author. No clue as to whey though.... > > P.S. virtual void apply(osg::Geode &node); doesn't seem to have any > implementation, any ideas? > It's in the OBJWriteNodeVisitor.cpp ;-)
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
