Repository navigation
Inherit preceding keyframe interpolation when adding a keyframe - #3438
Silvertree2010 wants to merge 1 commit into
Conversation
Found while testing crates/project/src/keyframe.rs:238 (Param::add_keyframe / set_at_force) Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Insertion behavior and regression test crates/project/src/keyframe.rs |
set_at_force copies the preceding keyframe’s interpolation when one exists. A regression test checks that inserting at tick 50 in a Hold segment keeps the value at tick 75 at 0.0. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix
Suggested reviewers: echelon
Merge Risk: 
Minimal · up to 558fd
-
The intended Hold interpolation behavior is covered, with no established merge-blocking issue.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title states the main change: when a keyframe is added, it inherits the interpolation of the preceding keyframe. The raw summary confirms that set_at_force now copies the preceding keyframe's interpolation, and the PR objectives describe the same fix for inserting inside a Hold segment. The title is specific and concise, and it does not use vague terms.
-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 1 files.
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
Found while testing
crates/project/src/keyframe.rs:238 (Param::add_keyframe / set_at_force)(no existing issue): Adding a keyframe inside a Hold segment turns the rest of the segment into a linear ramp.Cause
Param::set_at_forcealways created new keyframes withInterpolation::Linear. Adding a keyframe inside a Hold segment therefore turned the part after the new keyframe into a linear ramp, which changed the curve.Fix
When
set_at_forceinserts a keyframe after an existing one, it now copies that preceding keyframe's interpolation, asset_atalready does. This coversadd_keyframeandput_keyframe. A regression test is included.Verified
keyframe::tests::add_keyframe_inside_hold_keeps_curve: fails onmainwithout the fix and passes with it (cargo test -p filmcraft-project add_keyframe_inside_hold_keeps_curve).cargo xtask cipasses excepthevc_probe::register_answers_the_hevc_probe_in_the_background,menus::tests::hovering_another_title_switches_the_open_menu, which also fail onmainwithout this change.Not changed
A keyframe inserted before the first keyframe still uses the default Linear interpolation.
set_atis unchanged.🤖 Generated with AI by ApolloOffice, see the Co-Authored-By trailers for the models
Summary by CodeRabbit