From a0684bd0580c570b2009b54502222b997ccce26f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 18 May 2016 18:30:51 +0100 Subject: [PATCH] Changed osg::NodeVisitor::traverse(node) to traverse(node) to take advantage of the local travese() implementation pushing/popping any StateSet that is on the node. --- src/osgPlugins/obj/OBJWriterNodeVisitor.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/obj/OBJWriterNodeVisitor.h b/src/osgPlugins/obj/OBJWriterNodeVisitor.h index eb62b078f..9cf246596 100644 --- a/src/osgPlugins/obj/OBJWriterNodeVisitor.h +++ b/src/osgPlugins/obj/OBJWriterNodeVisitor.h @@ -70,10 +70,12 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor { virtual void apply(osg::Group &node) { _nameStack.push_back( node.getName().empty() ? node.className() : node.getName() ); + _fout << std::endl; _fout << "g " << getUniqueName() << std::endl; - osg::NodeVisitor::traverse( node ); + traverse( node ); + _nameStack.pop_back(); }