From 249a60c328bc575453c055cc02ebd4c7c212c3a2 Mon Sep 17 00:00:00 2001 From: Wei Lisi Date: Tue, 26 Mar 2019 22:37:50 +0800 Subject: [PATCH] clean up --- src/osgPlugins/fbx/WriterNodeVisitor.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/osgPlugins/fbx/WriterNodeVisitor.cpp b/src/osgPlugins/fbx/WriterNodeVisitor.cpp index 4844e8a78..7ace61a9f 100644 --- a/src/osgPlugins/fbx/WriterNodeVisitor.cpp +++ b/src/osgPlugins/fbx/WriterNodeVisitor.cpp @@ -648,15 +648,7 @@ void WriterNodeVisitor::createListTriangle(const osg::Geometry* geo, void WriterNodeVisitor::apply(osg::Geometry& geometry) { - // here we simply create a single fbx node to assign it the mesh // retrieved from the geometry. - - // create fbx node to contain the single geometry - //FbxNode* parent = _curFbxNode; - //FbxNode* nodeFBX = FbxNode::Create(_pSdkManager, geometry.getName().empty() ? "Geometry" : geometry.getName().c_str()); - //_curFbxNode->AddChild(nodeFBX); - //_curFbxNode = nodeFBX; - _geometryList.push_back(&geometry); pushStateSet(geometry.getStateSet()); @@ -668,8 +660,6 @@ void WriterNodeVisitor::apply(osg::Geometry& geometry) if (getNodePath().size() == 1) buildFaces(geometry.getName(), _geometryList, _listTriangles, _texcoords); - // return to parent fbx node - //_curFbxNode = parent; } void WriterNodeVisitor::apply(osg::Group& node) @@ -691,10 +681,9 @@ void WriterNodeVisitor::apply(osg::Group& node) } else { + //ignore the root node to maintain same hierarchy _firstNodeProcessed = true; - traverse(node); - - + traverse(node); } }