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.
This commit is contained in:
@@ -1840,7 +1840,11 @@ osg::AnimationPathCallback* SlideShowConstructor::getAnimationPathCallback(const
|
||||
{
|
||||
if (!positionData.path.empty())
|
||||
{
|
||||
osg::ref_ptr<osg::Object> 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<osgDB::Options> options = _options.valid() ? _options->cloneOptions() : new osgDB::Options;
|
||||
options->setObjectCacheHint(osgDB::Options::CACHE_NONE);
|
||||
|
||||
osg::ref_ptr<osg::Object> object = osgDB::readObjectFile(positionData.path, options.get());
|
||||
osg::AnimationPath* animation = dynamic_cast<osg::AnimationPath*>(object.get());
|
||||
if (animation)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user