Hi Cristina,

To save a custom node you'll need to implement serializers for it
otherwise the .osg plugin won't know how to write it out.  In
svn/trunk we have a new serialization scheme that supports writing to
ascii, xml and binary formats but it requires a different set of API
for doing the serialization of the older .osg ascii format.  The new
scheme is typically more straight forward to implement than the old
DotOsgWrapper code so is likely to be be easier to learn and implement
so I'd recommend looking into this.

In the OSG snv/trunk version you can find the wrappers in
src/osgWrappers/serializers for the new serializers, and
src/osgWrappers/deprecated_dotosg/ for the old style .osg ascii
wrappers.  Subdirectories of these contain all the wrapper code so
pick a simple OSG class and then have a look at how the wrappers are
implemented for guidance on how you might do it yourself.  Wang Rui
also post a wiki page on the new wrappers.

    
http://www.openscenegraph.org/projects/osg/wiki/Support/KnowledgeBase/SerializationSupport

If you don't want to implement serializers for your class then you
could just get the .osg plugin to treat your Node as another just
don't modify the className() as this is used as they key for finding
which wrapper to use.

Robert.

On Thu, Mar 25, 2010 at 7:38 PM, Cristina Paponi
<[email protected]> wrote:
> Hi,
>
> I override the PositionAttitudeTransform node, but when I try to save the 
> scene graph, my overriden node and everything below it, is not saved to the 
> osg file.
> What do I have to do to be able to save the whole scene graph?
> The node class name is "MyNode" and libraryName is "osg".
>
> Thank you!
>
> Cheers,
> Cristina
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=26149#26149
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to