Changed the error reporting so that it directs it all via osg::notify, and

only uses the INFO level for reporting that the file to load is not
recognised.  Also add check for LWO2 loading so that it returns FILE_NOT_HANDLED
message correctly.
This commit is contained in:
Robert Osfield
2002-08-04 20:51:03 +00:00
parent cab49a9307
commit 93403a54db
4 changed files with 14 additions and 13 deletions

View File

@@ -70,11 +70,11 @@ osgDB::RegisterReaderWriterProxy<ReaderWriterLWO> g_lwoReaderWriterProxy;
osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO2(const std::string& fileName, const osgDB::ReaderWriter::Options*)
{
std::auto_ptr<Lwo2> lwo2(new Lwo2());
lwo2->ReadFile(fileName);
osg::ref_ptr<Group> group = new osg::Group();
if (lwo2->GenerateGroup(*group)) return group.take();
if (lwo2->ReadFile(fileName))
{
osg::ref_ptr<Group> group = new osg::Group();
if (lwo2->GenerateGroup(*group)) return group.take();
}
return ReadResult::FILE_NOT_HANDLED;
}
@@ -110,7 +110,7 @@ struct GeometryCollection
// read file and convert to OSG.
osgDB::ReaderWriter::ReadResult ReaderWriterLWO::readNode_LWO1(const std::string& fileName, const osgDB::ReaderWriter::Options*)
{
lwObject* lw = lw_object_read(fileName.c_str());
lwObject* lw = lw_object_read(fileName.c_str(),osg::notify(osg::INFO));
if (!lw)
return ReadResult::FILE_NOT_HANDLED;