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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user