Fix split clip losing keyframe interpolation on right half#123
Open
PriyeshPandey2000 wants to merge 1 commit into
Open
Fix split clip losing keyframe interpolation on right half#123PriyeshPandey2000 wants to merge 1 commit into
PriyeshPandey2000 wants to merge 1 commit into
Conversation
When splitting a clip between two keyframes, the boundary keyframe inserted at offset 0 of the right half always defaulted to .smooth interpolation. A .hold segment incorrectly animates on the right half; a .linear segment incorrectly eases instead of continuing linearly. Fix inherits interpolationOut from the preceding keyframe.
5e0c95c to
da5007d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When splitting a clip between two keyframes,
splitKeyframeTrackinserts a boundary keyframe at offset 0 of the right half. That keyframe defaulted to.smoothinterpolation regardless of the preceding segment. A.holdsegment incorrectly animates on the right half; a.linearsegment incorrectly eases instead of continuing linearly. Fix looks up the preceding keyframe'sinterpolationOutand passes it to the inserted boundary keyframe.Note
Low Risk
Small, localized change to split keyframe logic with new unit tests; no auth, persistence, or API surface changes.
Overview
Fixes incorrect animation on the right half of a split when the cut falls between keyframes.
splitKeyframeTrackstill inserts a boundary keyframe at frame 0 on the right track, but that keyframe now uses theinterpolationOutof the last keyframe before the split (falling back to.smooth) instead of always defaulting to smooth easing.That keeps hold segments flat until the next keyframe and linear ramps continuing at a constant rate after the cut. Regression tests cover opacity (hold) and rotation (linear) via
splitClip+sample(at:).Reviewed by Cursor Bugbot for commit da5007d. Bugbot is set up for automated code reviews on this repo. Configure here.