From Cedric Pinson, Fix createKeyframeContainerFromTargetValue to recreate its sampler from scratch to not change keyframe container of another sampler

This commit is contained in:
Cedric Pinson
2009-09-09 18:13:24 +00:00
parent 1e768c0631
commit 2b3d76aade

View File

@@ -102,7 +102,7 @@ namespace osgAnimation
// create a key from current target value
typename KeyframeContainerType::KeyType key(0, _target->getValue());
// recreate the keyframe container
getOrCreateSampler()->setKeyframeContainer(0);
_sampler = 0;
getOrCreateSampler()->getOrCreateKeyframeContainer();
// add the key
_sampler->getKeyframeContainerTyped()->push_back(key);