HI Suvajit, The debig message is telling you that it's just reusing the osgViewer::Scene object, not that it's not re-assigning the scene data itself. The Scene object is a background class used to manage multiple views sharing the same Scene.
As for the no visual changes, well are you calling frame afterwards? You won't see any changes unless you re-render the scene. Robert. On Wed, Apr 28, 2010 at 8:24 AM, Suvajit Sengupta <[email protected]> wrote: > Hi, > > I have attached a GUIEventHandler to osg::Viewer to refresh the model if the > content in the file has changed. > Like whenever refresh action is called I do the following: > > osg::ref_ptr<osg::Group> root = osgDB::readNodeFile("path_to_shp_file"); > viewer->setSceneData(root.get()); > > I have to reread the source file as the content in it has changed. > > But while setting the scenedata OSG states: > View::setSceneData() Reusing exisitng scene01EF1108 > > and hence no visual changes due to change in scenegraph is not perceived. > > It is obvious that I cannot refresh a viewer scene data just by overwriting > it as the reference to existing root still exists. What is the smart way of > doing this like as in updating view when model changes in MVC ? > > ... > > Thank you! > > Cheers, > Suvajit > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=27344#27344 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

