[osg-users] Serialization always says: Unsupported associated class osg::Object

47 views
Skip to first unread message

John Pasnom

unread,
Mar 3, 2015, 7:40:10 AM3/3/15
to osg-...@lists.openscenegraph.org
Hi,

using OSG 3.0.1 I've implemented a custom class deriving from osg::Object that should support serialization:

The register object wrapper looks like this:


Code:
REGISTER_OBJECT_WRAPPER( MyLights,
new dx::MyLights,
dx::MyLights,
"osg::Object dx::MyLights" )
{
ADD_USER_SERIALIZER( VisionLight );
}




While the serialization to osgt works perfectly I still get msgs during serialization:


> OutputStream::writeObject(): Unsupported associated class osg::Object
> InputStream::readObject(): Unsupported associated class osg::Object


Why is that happening? I know this occurs because my inheritance says "osg::Object dx::MyLights" but I've searched through the osg source for classes deriving from osg::Object and they all do the same inheritance, first osg::Object then their own one

Example:


Code:
REGISTER_OBJECT_WRAPPER( AutoTransform,
new osg::AutoTransform,
osg::AutoTransform,
"osg::Object osg::Node osg::Group osg::Transform osg::AutoTransform" )



How can I properly solve this? Leaving osg::Object simply out? Or do all those classes generate serialization messages?

Thanks

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





_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Robert Osfield

unread,
Mar 3, 2015, 7:54:01 AM3/3/15
to OpenSceneGraph Users
Hi John,

In principle the code snippets you have provided look OK.

Like in my previous email, it could well be a bug that has long been fixed - OSG-3.0.1 was released along time ago.  Without specific code to test against there isn't any way to know the answer.

Robert.

Reply all
Reply to author
Forward
0 new messages