Hi Martin, To check to see if the callback is being loaded do a:
osgconv myfile.osg testfile.osg And then have a look in the testfile.osg to see if the callback appears, if it doesn't then it looks like it hasn't been loaded correctly, or perhaps just not saved correctly. If it doesn't load then perhaps the file is an older format that no longer has quite the same syntax. Robert. 2009/10/16 Martin Großer <grosser.mar...@gmx.de>: > Hi, > > I have a osg-file with "UpdateCallbacks": > ------------------------------------------------------------ > [...] > MatrixTransform { > DataVariance DYNAMIC > name "Kugel01" > nodeMask 0xff > cullingActive TRUE > UpdateCallbacks { > AnimationPathCallback { > DataVariance DYNAMIC > [...] > > I load the file with the line: osg::ref_ptr< ::osg::Node > fileScene = > osgDB::readNodeFile(path); > > I see the scene, but the fileScene has no UpdateCallback. What is my > mistake? Anybody an idea? When I load the viel with the "osg/bin/osgviewer" > then it works fine? > > I have write a NodeVisitor to check the UpdateCallback: > --------------------------------------------------------------------------------- > > class FindUpdateCallback : public osg::NodeVisitor > { > > public: > > > FindUpdateCallback():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) > { > } > > virtual void apply(osg::Node& node) > { > ::osg::ref_ptr< ::osg::NodeCallback> ucb = > node.getUpdateCallback(); > if(ucb.valid()) std::cout << "YES" << std::endl; > else std::cout << "NO" << std::endl; > traverse(node); > } > > virtual void apply(osg::MatrixTransform& node) > { > apply((osg::Node&)node); > } > > virtual void apply(osg::Group& node) > { > apply((osg::Node&)node); > } > > virtual void apply(osg::Geode& node) > { > apply((osg::Node&)node); > } > }; > > It prints always "NO". > > Cheers, > > Martin > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org