Hi Martin, The DatabasePager doesn't black list file load failures as networking/file issues can be resolved during the lifetime of an application so the functionality you are seeing is the intended behaviour and not a bug.
There are times when black listing is appropriate, but it's not something that one can make a decision upon directly at the DatabasePager level, instead it's something that will have to be customizable by user applications so a callback to handle the black listing would probably be the best way to do it. Robert. On 13 April 2012 07:16, Martin Scheffler <[email protected]> wrote: > Hi, > > when I create a proxy node with a non-existent file then the database pager > seems to keep trying to load that proxy node! > > [code} > #include <osgViewer/Viewer> > #include <osgDB/Registry> > #include <iostream> > #include <osg/ProxyNode> > > class MyReadFileCallback : public osgDB::Registry::ReadFileCallback > { > public: > virtual osgDB::ReaderWriter::ReadResult readNode(const std::string& > fileName, const osgDB::ReaderWriter::Options* options) > { > std::cout<<"readNode " << fileName <<std::endl; > return > osgDB::Registry::instance()->readNodeImplementation(fileName,options); > } > }; > > int main(int argc, char ** argv) > { > osgDB::Registry::instance()->setReadFileCallback(new MyReadFileCallback()); > > osg::ProxyNode* proxynode = new osg::ProxyNode(); > proxynode->setFileName(0, "NOTFOUND.ive"); > > osg::ArgumentParser arguments(&argc,argv); > osgViewer::Viewer viewer(arguments); > viewer.setSceneData(proxynode); > return viewer.run(); > } > > [/code] > > This example code keeps printing "readNode NOTFOUND.ive" every frame. > > I am attaching a modification to DatabasePager.cpp that fixes the problem for > me, but I am not involved enough in the code to say if this does not break > anything else. Could you take a look at this? > > > Thank you! > > Cheers, > Martin[/code] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=47041#47041 > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
