From Bradley Anderegg, "The first change just exposes the archive extension list so that
external applications can determine if an archive extension is valid. The second change is a bug fix in Registry::read(const ReadFunctor&) where if you pass in valid options they get wiped out after the archive is loaded but before being passed along to the plugin."
This commit is contained in:
@@ -1036,7 +1036,12 @@ ReaderWriter::ReadResult Registry::read(const ReadFunctor& readFunctor)
|
||||
|
||||
osgDB::Archive* archive = result.getArchive();
|
||||
|
||||
osg::ref_ptr<Options> options = new Options;
|
||||
//if valid options were passed through the read functor clone them
|
||||
//otherwise make new options
|
||||
osg::ref_ptr<osgDB::ReaderWriter::Options> options = readFunctor._options ?
|
||||
readFunctor._options->cloneOptions() :
|
||||
new osgDB::ReaderWriter::Options;
|
||||
|
||||
options->setDatabasePath(archiveName);
|
||||
|
||||
return archive->readObject(fileName,options.get());
|
||||
|
||||
Reference in New Issue
Block a user