Added command line option for writing out the scene graph to file.
This commit is contained in:
parent
b40acacf53
commit
9bde24d3d2
@ -698,9 +698,12 @@ int main(int argc, char** argv)
|
||||
viewer.setSceneData(group);
|
||||
}
|
||||
|
||||
#if 0
|
||||
osgDB::writeNodeFile(*viewer.getSceneData(),"text.osg");
|
||||
#endif
|
||||
std::string filename;
|
||||
if (arguments.read("-o",filename))
|
||||
{
|
||||
osgDB::writeNodeFile(*viewer.getSceneData(),filename);
|
||||
return 0;
|
||||
}
|
||||
|
||||
viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) );
|
||||
viewer.addEventHandler(new osgViewer::StatsHandler());
|
||||
@ -716,5 +719,7 @@ int main(int argc, char** argv)
|
||||
(*itr)->cancel();
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user