From 759749eb0c982d87d9b789985abd277b2d3c15a7 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 27 Sep 2010 09:58:07 +0000 Subject: [PATCH] Changed the reading of animation paths so that it's always done without using the osgDB object cache. This fixes a bug of reusing the animination path in an P3D file. --- src/osgPresentation/SlideShowConstructor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/osgPresentation/SlideShowConstructor.cpp b/src/osgPresentation/SlideShowConstructor.cpp index 71a1601d8..a70e530ed 100644 --- a/src/osgPresentation/SlideShowConstructor.cpp +++ b/src/osgPresentation/SlideShowConstructor.cpp @@ -1840,7 +1840,11 @@ osg::AnimationPathCallback* SlideShowConstructor::getAnimationPathCallback(const { if (!positionData.path.empty()) { - osg::ref_ptr object = osgDB::readObjectFile(positionData.path, _options.get()); + // need to create an Options object with cache off to prevent sharing of animation paths + osg::ref_ptr options = _options.valid() ? _options->cloneOptions() : new osgDB::Options; + options->setObjectCacheHint(osgDB::Options::CACHE_NONE); + + osg::ref_ptr object = osgDB::readObjectFile(positionData.path, options.get()); osg::AnimationPath* animation = dynamic_cast(object.get()); if (animation) {