[osg-users] Node::Description into a generalized property mechanism?
Paul Martz
pmartz at skew-matrix.com
Mon Nov 30 09:02:21 PST 2009
Chris 'Xenon' Hanson wrote:
> Mattias Helsing wrote:
>> Hi Chris,
>> Is there a reason to why you don't use setUserData(osg::Referenced*) ?
>> If you provide the proper read/write routines for your osg::Referenced
>> derived class it would also persist across .osg file writes/reads.
>
> Because there's only one UserData, and in my library code that I might share with
> others, I try to avoid taking exclusive use of some asset that others might be used in
> their application code.
>
I find UserData rather limited for this reason as well.
I support a system like this, but am reluctant to take the time to code
a change to core OSG if it is likely to be rejected.
For the records, I suggested a similar map idea back in about 2004
shortly after I started using OSG. At the time, I was told just use
UserData and set up some kind of composite system to store multiple
data. Unfortunately, that doesn't work with other OSG code that is not
under my control.
I'd be glad to implement something like this in osgWorks.googlecode.com,
but it would have to ride on UserData rather than be a part of core OSG,
which would put it in conflict with any other code that already uses
UserData, thereby rendering it pretty much useless.
-Paul
More information about the osg-users
mailing list