Hi Andrew -- The definition of a NodeKit, as I understand it, is "new Nodes, Drawables, StateAttributes, or other OSG-derived classes, plus support for the .osg file format".
So, all of the NodeKits that ship with OSG (osgText, osgSim, osgParticle, etc., all have corresponding plugins (osgdb_osgText, osgdb_osgSim, etc), whose sole functionality is to provide support for .osg I/O. You'll need to create your own plugin, using one of those as a model, to support .osg I/O for your custom Nodes. As far as I know, there's no way to simply have base class info written in its place; maybe Robert knows otherwise. Along the same line, what I'd like to see at some point in the future would be an equivalent extension mechanism for .ive. Right now, the only solution is to "own your own .ive plugin". More generally, it'd be nice to have an extension mechanism available to all OSG plugins, not just .osg/.ive, that would allow an application to do its own I/O as necessary. For example, in my current project, I need to be able to write physics info to .dae files. Such physics-related application code doesn't belong in OSG and therefore doesn't belong in the OSG DAE plugin, yet there's no way for an app to hook into the OSG DAE plugin so that the app can write this info. Robert -- any thoughts on a design that might allow this? Andrew -- Sorry, I got a little off track there. The point is, .osg has a way for you too hook in: You write your own plugin to support .osg I/O for your custom Nodes. Other plugins don't have such application hooks. Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com +1 303 859 9466 > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Somerville, Andrew > Sent: Friday, May 23, 2008 2:02 PM > To: openscenegraph-users > Subject: [osg-users] osgDB::writeNodeFile with derived node types > > > Recently I have been trying to write some scenes to file to > analyze them and coming upon some trouble. When I call > writeNodeFile it seems to ignore certain children. I was > confused for a while until I realized that it was ignoring > any node that was custom derived type. > > I chased down the code from the osg filetype plugin into the > Registry::writeObject call which seems to do what looks like > some reflection stuff to decide what to write, but I am not > familiar with osg's reflection system. So Im guessing the > problem has something to do with reflection. > > Is this expected behavior? I would expect it to just use > osg::Group's writer code for example if I had derived from osg::Group. > > Can anyone enlighten me? > > > Andy > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-opensce negraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

