caceb94db8
Bug description: Let's say we have class A namespace Bug { class A : public osg::Object { public: //... typedef std::vector<osg::ref_ptr<A> > AList; protected: AList _alist; //... } } REGISTER_OBJECT_WRAPPER( A, new Bug::A, Bug::A, "osg::Object Bug::A" ) { ADD_LIST_SERIALIZER(A,Bug::A::AList); } Bug: We create say 3 instances of class A: A1,A2,A3 and then we add A2 and A3 and A1 as child instances of A1 so we get next structure: A1 |- A2,A3,A1 we call osgDB::writeObjectFile(A1,"/data/a.osgt") -> saved correctly( third element in list is saved as unique id that references parentClass now we call A1 = osgDB::readObjectFile("/data/a.osgt"); Everything is deserialized correctely except last element in list which should be same instance as parent A1. The attached code resolves this issue by passing UniqueID in readObjectFields method and saving object in _identifierMap as soon as we have valid object instance so we can make reference to parent object from any child instance. " |
||
---|---|---|
.. | ||
OpenThreads | ||
osg | ||
osgAnimation | ||
osgDB | ||
osgFX | ||
osgGA | ||
osgManipulator | ||
osgParticle | ||
osgPresentation | ||
osgQt | ||
osgShadow | ||
osgSim | ||
osgTerrain | ||
osgText | ||
osgUtil | ||
osgViewer | ||
osgVolume | ||
osgWidget |