From Wang Rui, "I've fixed the bug of writing/reading scenes including the ImageSequence serializer. Current trunk version will fail when handing image sequences because it forces to set className to "osg::Image" in InputStream.cpp. I have to read a value saved in file instead so I must add a hardhanded version checking for backward compatibility.

Now we can work with ImageSequence objects, in both osgt and osgb files."
This commit is contained in:
Robert Osfield
2013-01-28 14:56:52 +00:00
parent 45585b78fb
commit 84c857d24d
2 changed files with 13 additions and 16 deletions

View File

@@ -306,14 +306,14 @@ void OutputStream::writeImage( const osg::Image* img )
{
if ( !img ) return;
// std::string name = img->libraryName();
// name += std::string("::") + img->className();
std::string name = img->libraryName();
name += std::string("::") + img->className();
bool newID = false;
unsigned int id = findOrCreateObjectID( img, newID );
// *this << name << BEGIN_BRACKET << std::endl; // Write object name
*this << PROPERTY("UniqueID") << id << std::endl; // Write image ID
*this << PROPERTY("ClassName") << name << std::endl; // Write object name
*this << PROPERTY("UniqueID") << id << std::endl; // Write image ID
if ( getException() ) return;
if (newID)