[osg-users] Bug in 3.4.0 when exporting .osgx file?
Werner Modenbach
Werner.Modenbach at texion.eu
Tue Mar 21 06:15:28 PDT 2017
Hi Robert,
I think I catched another problem in version 3.4.0.
I try exporting my scene as .osgx file.
But except the xml header nothing is written.
I debuged it and found the following sequence of calls:
osg::ref_ptr<osgDB::ReaderWriter>rw=osgDB::Registry::instance()->getReaderWriterForExtension(
osgDB::getLowerCaseFileExtension(_filename.toStdString()));
if(!rw.valid())
returnfalse;
osgDB::ReaderWriter::WriteResultresult=rw->writeNode(_node,_filename.toStdString());
-> ReaderWriterOSG2::writeNode(...)
result=writeNode(node,fout,local_opt.get());
-> ReaderWriterOSG2::writeNode(...) os.writeObject(&node);CATCH_EXCEPTION(os);
->OutputStream::writeObject(...)
if(newID)
{
writeObjectFields(obj);
}
->OutputStream::writeObjectFields(...)
ObjectWrapper*wrapper=Registry::instance()->getObjectWrapperManager()->findWrapper(name);
if(!wrapper)
{
OSG_WARN<<"OutputStream::writeObject():Unsupportedwrapperclass"
<<name<<std::endl;
return;
}
->OutputStream::writeObjectFields(...)
ObjectWrapper*wrapper=Registry::instance()->getObjectWrapperManager()->findWrapper(name);
if(!wrapper)
{
OSG_WARN<<"OutputStream::writeObject():Unsupportedwrapperclass"
<<name<<std::endl;
return;
}
->ObjectWrapperManager::findWrapper(...)
pluginLib=osgDB::Registry::instance()->createLibraryNameForExtension(libName);
if(osgDB::Registry::instance()->loadLibrary(pluginLib)==osgDB::Registry::LOADED)
returnfindWrapper(name);
}
returnNULL;
The loadLibrary(...) method returns "PREVIOUSLY_LOADED" and so NULL is returned and nothing gets written.
I think that should be different. Am I right?
- Werner -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20170321/03f32cf6/attachment-0001.htm>
More information about the osg-users
mailing list