diff --git a/src/osgPlugins/obj/OBJWriterNodeVisitor.h b/src/osgPlugins/obj/OBJWriterNodeVisitor.h index 9cf246596..be4c8cabd 100644 --- a/src/osgPlugins/obj/OBJWriterNodeVisitor.h +++ b/src/osgPlugins/obj/OBJWriterNodeVisitor.h @@ -69,6 +69,7 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor { virtual void apply(osg::Group &node) { + pushStateSet(node.getStateSet()); _nameStack.push_back( node.getName().empty() ? node.className() : node.getName() ); _fout << std::endl; @@ -77,6 +78,7 @@ class OBJWriterNodeVisitor: public osg::NodeVisitor { traverse( node ); _nameStack.pop_back(); + popStateSet(node.getStateSet()); } void traverse (osg::Node &node)