diff --git a/crates/engine/src/settings/prefs/sections.rs b/crates/engine/src/settings/prefs/sections.rs index ee86ce4c4..ca0e72bef 100644 --- a/crates/engine/src/settings/prefs/sections.rs +++ b/crates/engine/src/settings/prefs/sections.rs @@ -93,8 +93,11 @@ page!(Previews { /// Largest downsampling while playing back: `1/2`, `1/4`, `1/8`. adaptive_resolution_limit: String = "1/8".into(), /// A preview at Resolution Auto that renders slower than real time steps down a resolution - /// (½, then ¼, no further than the Adaptive Resolution Limit) for the rest of that play. - adaptive_playback: bool = true, + /// (½, then ¼, no further than the Adaptive Resolution Limit) for the rest of that play. Off + /// by default: it never steps back up during a play, so a looping preview kept playing at ¼ + /// after its first loop, where without it the first loop caches Full and the next ones play + /// in real time at Full, as in After Effects. + adaptive_playback: bool = false, show_internal_wireframes: bool = false, cache_frames_when_idle: bool = true, fast_previews: bool = false, diff --git a/crates/ui-egui/tests/it/ui_preview_align.rs b/crates/ui-egui/tests/it/ui_preview_align.rs index 6b5525e09..9d3119b21 100644 --- a/crates/ui-egui/tests/it/ui_preview_align.rs +++ b/crates/ui-egui/tests/it/ui_preview_align.rs @@ -322,7 +322,7 @@ fn cache_frames_when_idle_survives_an_inverted_work_area() { /// Settings ▸ Previews ▸ Lower Resolution When Playback Can't Keep Up: a preview at Auto that /// stalls for two seconds steps down to half its scale, two more to a quarter; an explicit Resolution and -/// the pref turned off keep the scale, and stopping goes back to the viewer's. +/// the pref turned off (its default) keep the scale, and stopping goes back to the viewer's. #[test] fn playback_that_cannot_keep_up_steps_down_a_resolution() { let stall = |h: &mut Harness<'_, EffectcraftApp>, secs: f64| { @@ -338,6 +338,8 @@ fn playback_that_cannot_keep_up_steps_down_a_resolution() { assert!(h.state().playback.playing); }; let mut h = harness(); + assert!(!h.state().session.prefs.previews.adaptive_playback, "off by default"); + h.state_mut().session.prefs.previews.adaptive_playback = true; // No room in the RAM preview: frames never stay cached and every pass stalls, as with a comp // too heavy to render in real time. h.state().frames.set_budget(0); diff --git a/docs/preferences.md b/docs/preferences.md index cad74aec2..07df169aa 100644 --- a/docs/preferences.md +++ b/docs/preferences.md @@ -53,7 +53,9 @@ Commands (CLI, MCP, control channel): - `composition.showRenderingProgress`: Show Rendering Progress in Info Panel and Flowchart - `previews.adaptiveResolutionLimit`: Adaptive Resolution Limit (the lowest resolution Fast Previews ▸ Adaptive Resolution drops to while you drag, and the lowest a playing preview steps down to) -- `previews.adaptivePlayback`: Lower Resolution When Playback Can't Keep Up. On by default. A +- `previews.adaptivePlayback`: Lower Resolution When Playback Can't Keep Up. Off by default (without it a first play renders + at the viewer's resolution at the rate frames arrive, and a looping preview plays its later loops + from the cache in real time, as in After Effects; with it the play stays lowered). A preview at Resolution Auto that plays under 80 % of its frame rate (frames render slower than that, so it plays them at the rate they arrive rather than freezing between them) steps down a resolution (half the scale after two seconds, a quarter two seconds later if still slow,