Click or drag to resize
DigitalRuneBlendGroupSynchronizeDurations Method
Synchronizes the durations of the animations in the blend group.

Namespace: DigitalRune.Animation
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public void SynchronizeDurations()
Exceptions
ExceptionCondition
InvalidAnimationException The sum of the blend weights in the blend group is 0.
Remarks

Many animations that need to be blended have different durations. For example, a "Walk" animation has a different duration than a "Run" animation. In order to blend the matching frames the durations of the animations in the blend group need to be synchronized. Synchronization of durations is typically required for cyclic animations that should be mixed.

The method SynchronizeDurations needs to be called once after all animations have been added to the blend group to synchronize them. (It does not need be called again if blend weights are changed or when animations are added or removed. However, if the duration of one animation is changed manually - for example, by appending key frames to a key frame animation - then SynchronizeDurations needs to be called a second time to update the blend group.)

If the durations are synchronized the total animation duration of the blend group is the weighted average of all animations. If the durations are not synchronized then the total durations is determined by the longest animation in the blend group.

See Also