From Cedric Pinson, this commit contains the following change:
* Change ref_ptr to observer_ptr to avoid cross reference and leak in Skinning * Set invalidate to true to re run the check visitor in Skeleton * Shallow copy Sampler in channel copy constructor * Add accessor in VertexInfluence * Remove dead code in Timeline.cpp * Dont force linking in Bone::UpdateBone, the decision is done by the user or the manager * Add offset in timeline stats to display each manager on the screen * Add a flag in animation manager base to enable or not automatic link when modifying the manager
This commit is contained in:
@@ -77,10 +77,13 @@ namespace osgAnimation
|
||||
Channel* clone() const { return new TemplateChannel<SamplerType>(*this); }
|
||||
|
||||
TemplateChannel (const TemplateChannel& channel) :
|
||||
Channel(channel),
|
||||
_target(new TargetType(*channel.getTargetTyped())),
|
||||
_sampler(channel._sampler.get())
|
||||
Channel(channel)
|
||||
{
|
||||
if (channel.getTargetTyped())
|
||||
_target = new TargetType(*channel.getTargetTyped());
|
||||
|
||||
if (channel.getSamplerTyped())
|
||||
_sampler = new SamplerType(*channel.getSamplerTyped());
|
||||
}
|
||||
|
||||
TemplateChannel (SamplerType* s = 0,TargetType* target = 0)
|
||||
@@ -102,7 +105,7 @@ namespace osgAnimation
|
||||
// create a key from current target value
|
||||
typename KeyframeContainerType::KeyType key(0, _target->getValue());
|
||||
// recreate the keyframe container
|
||||
_sampler = 0;
|
||||
getOrCreateSampler()->setKeyframeContainer(0);
|
||||
getOrCreateSampler()->getOrCreateKeyframeContainer();
|
||||
// add the key
|
||||
_sampler->getKeyframeContainerTyped()->push_back(key);
|
||||
|
||||
Reference in New Issue
Block a user