Skip to main content

prune_constant_tracks

Function prune_constant_tracks 

Source
pub fn prune_constant_tracks(
    skeleton: &Skeleton,
    clip: &mut Clip,
    protected_bones: &[BoneId],
) -> PruneConstantTracksOutcome
Expand description

Remove constant multi-key tracks only when doing so preserves every local TRS and model-space position/rotation on the original clip’s default sample grid.

This is deliberately more conservative than the constant-track check: an all-zero translation track, for example, only disappears if the rest pose and any other channel reproduce it. Candidate classification shares that check’s interpolation-aware tolerances; accepted removals are then validated cumulatively against the untouched original. Invalid hand-built inputs are retained instead of panicking. The final edit is atomic.