Discussion:
[osg-users] osgSim::MultiSwitch Serialization
David Stephan
2018-07-25 19:55:18 UTC
Permalink
osgSim::MultiSwitch and flt files support named switches, but the names aren't saved. It seems like an easy fix, though I'm not sure how to mess with the serializer in a backwards compatible way.

relevant files:
src/osgSim/MultiSwitch.cpp
src/osgWrappers/serializers/osgSim/MultiSwitch.cpp

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74385#74385
Robert Osfield
2018-07-26 13:33:46 UTC
Permalink
HI David,

I'm don't have time to look at the code right now so will just provide
some general hints. The serailizers have SO version built into them
so you can add or remove components of the serializer based on the SO
version of the OSG. There are number of places in the OSG serailizers
that you can look at for inspiration, for instance
src/osgWrappers/serializers/Node.cpp has:

ADD_USER_SERIALIZER( Descriptions ); // _descriptions, deprecated
{
UPDATE_TO_VERSION_SCOPED( 77 )
REMOVE_SERIALIZER( Descriptions );
}

Have a search through the serializers to see the
UPDATE_TO_VERSION_SCOPED used in various ways.

Robert.
Post by David Stephan
osgSim::MultiSwitch and flt files support named switches, but the names aren't saved. It seems like an easy fix, though I'm not sure how to mess with the serializer in a backwards compatible way.
src/osgSim/MultiSwitch.cpp
src/osgWrappers/serializers/osgSim/MultiSwitch.cpp
------------------
http://forum.openscenegraph.org/viewtopic.php?p=74385#74385
_______________________________________________
osg-users mailing list
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
David Stephan
2018-07-29 21:17:40 UTC
Permalink
Attached is a little test.

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=74419#74419

Loading...