Hi Peter, Yes, there is a schema mechanism in the osg plugin which could record a serializer name list (a schema) at the beginning of every .osgb file and the reader will automatically check and read the schema to decide each serializer order and existence.
For your situation, the best way I think is to generate a schema file first using the option: writeNodeFile(*node, "file.osgb", new osgDB::Options("SchemaFile=old_version_format.txt")); This could be done only once when you save a .osgb file. Note that the schema file should be created with the old version of plugin. And then you may read all old .osgb files with the new version of plugin, using the same option: readNodeFile("file.osgb", new osgDB::Options("SchemaFile=old_version_format.txt")); And the schema will be used to load old version files correctly. Wang Rui 2012/8/20 Peter Bako <osgfo...@tevs.eu> > Hello guys, > > I am using OSG serialization on my custom classes derived from > osg::MatrixTransform and osg::Geometry. > I already use this serialization for some time, so I have many .osgb files > exported on my disk, but now, I want to add some new properties to my Class > and serialize them (new ADD_BOOL_SERIALIZER). The problem is, that I cannot > load the old .osgb files anymore. It works only on .osgt files. > Is there any way, how to extend my serialization, while the old files will > be still loadable? > > Thank you! > > Cheers, > Peter > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=49338#49338 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org