<div dir="ltr">On 23 November 2015 at 11:38, Tony Vasile <span dir="ltr"><<a href="mailto:minghia@gmail.com" target="_blank">minghia@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Robert,<br>
Unless I am going blind I couldn't see an explicit apply for osg::Object in either GetValueVisitor or SetValueVisitor, hence the question.</blockquote><div><br></div><div>This is different question to saving data, the serialization support uses completely different mechanism.<br></div><div><br></div><div>Have a look at include/osg/ValueObject for the get/set methods for the ValueObject/GetValueVisitor/SetValueVisitor.<br><br></div><div>Or... just use the template methods in osg::Object i.e.<br><br></div><div> // set value<br></div><div> int count;<br></div><div> object->setUserValue("count", count);<br></div><div><br></div><div> // get value<br></div><div> object->getUserValue("count", count);<br></div><div><br></div><div>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:<br><br></div><div> unsigned int value;<br></div><div> object->getUserValue("count", value);<br><br></div><div>Will return false for the above setting using an int.<br><br></div><div>Robert.<br></div><div> </div></div></div></div>