Robert Osfield wrote:
Hi Paul,
Thanks for the report. I can reproduce it at my end, but as yet don't
know what it might be. I will investigate on Monday.
Thanks for looking into this. I was curious, so I thought I'd dig a
little on a Saturday night over a beer.
It appears to be a problem in src/osgPlugins/osg/ReaderWriterOSG2.cpp.
The prepareReading method checks for the wrong extension but fails to
immediately return once that has been identified as the case...
Options* prepareReading( ReadResult& result, std::string& fileName,
const Options* options ) const
{
std::string ext = osgDB::getLowerCaseFileExtension( fileName );
if ( !acceptsExtension(ext) ) result =
ReadResult::FILE_NOT_HANDLED; // Should return here?
fileName = osgDB::findDataFile( fileName, options );
if ( fileName.empty() ) result = ReadResult::FILE_NOT_FOUND;
// Should return here too, right?
osg::ref_ptr<Options> local_opt = options ?
static_cast<Options*>(options->clone(osg::CopyOp::SHALLOW_COPY)) : new
Options;
local_opt->getDatabasePathList().push_front(osgDB::getFilePath(fileName));
if ( ext=="osgt" ) local_opt->setOptionString(
local_opt->getOptionString() + " Ascii" );
etc
But I haven't dug deep enough to explain why the issue goes away when
you swap the order of the two command line arguments. Perhaps due to the
chain of responsibility pattern.
-Paul
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org