Added support for ReadResult and WriteResult to the osgDB::ReaderWriter
to allo plugins to pass back more information about the success or failure of a file load. All plugins have been updated to the new convention.
This commit is contained in:
@@ -14,19 +14,23 @@
|
||||
|
||||
using namespace flt;
|
||||
|
||||
osg::Object* ReaderWriterFLT::readObject(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterFLT::readObject(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
FltFile read;
|
||||
|
||||
return read.readObject(fileName);
|
||||
osg::Object* obj=read.readObject(fileName);
|
||||
if (obj) return obj;
|
||||
else return ReadResult::FILE_NOT_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
osg::Node* ReaderWriterFLT::readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
osgDB::ReaderWriter::ReadResult ReaderWriterFLT::readNode(const std::string& fileName, const osgDB::ReaderWriter::Options*)
|
||||
{
|
||||
FltFile read;
|
||||
|
||||
return read.readNode(fileName);
|
||||
osg::Node* obj=read.readNode(fileName);
|
||||
if (obj) return obj;
|
||||
else return ReadResult::FILE_NOT_HANDLED;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user