On 23 November 2015 at 11:38, Tony Vasile <[email protected]> wrote:
> Hi Robert,
> Unless I am going blind I couldn't see an explicit apply for
> osg::Object in either GetValueVisitor or SetValueVisitor, hence the
> question.
This is different question to saving data, the serialization support uses
completely different mechanism.
Have a look at include/osg/ValueObject for the get/set methods for the
ValueObject/GetValueVisitor/SetValueVisitor.
Or... just use the template methods in osg::Object i.e.
// set value
int count;
object->setUserValue("count", count);
// get value
object->getUserValue("count", count);
The later returns true of the object has a "count" value object of the same
type as the parameter passed in. You need to take care here as:
unsigned int value;
object->getUserValue("count", value);
Will return false for the above setting using an int.
Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org