Shortcuts: scroll the Timeline, Parent column

timeline.scrollToTime (D) centres the current time in the time graph,
timeline.scrollToLayer (X) puts the topmost selected layer at the top;
both are done when the Timeline is next drawn. timeline.parentColumn
(Shift+F4) shows or hides the Parent column.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
pravdomil
2026-10-12 21:04:50 +02:00
co-authored by Claude Opus 5.5
parent bf53ae6094
commit f7b366197d
3 changed files with 76 additions and 0 deletions
+13
View File
@@ -317,6 +317,15 @@ impl TimelineState {
}
}
/// Where a Timeline shortcut scrolls to.
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum ScrollTo {
/// D: the current time, centred in the time graph.
Time,
/// X: the topmost selected layer, at the top of the layers.
Layer,
}
#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TimelineState {
/// Visible span start (seconds) and pixels per second; None = fit comp.
@@ -385,6 +394,9 @@ pub struct TimelineState {
/// The name column shows Source Name instead of Layer Name (click its header).
#[serde(default)]
pub source_name: bool,
/// A scroll asked for by a shortcut (D, X), done when the Timeline is next drawn.
#[serde(skip)]
pub scroll_to: Option<ScrollTo>,
}
pub fn default_tl_columns() -> BTreeSet<String> {
@@ -426,6 +438,7 @@ impl Default for TimelineState {
unlinked: BTreeSet::new(),
columns: default_tl_columns(),
source_name: false,
scroll_to: None,
}
}
}