M5.1: AE timecode/ruler display parity
- Current time shown as AE does: 0:00:02:15 (hours unpadded; time::format_timecode_ae), frame count zero-padded to 5 digits (00075 (29.97 fps)). - Time ruler labels in seconds:frames (00:15f, 01:00f) with frame-based adaptive spacing. - time.set snaps seconds to the nearest frame (2.5 s at 29.97 -> frame 75). - Mode / Track Matte columns hidden until Toggle Switches/Modes (F4), as in AE's default. - Timeline outline pane sized to its columns and clipped so Parent & Link never draws over the time graph in narrow timelines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
951ed1fa3d
commit
1cba07bdfe
@@ -298,7 +298,7 @@ impl Session {
|
||||
if let Some(c) = self.state.active_comp {
|
||||
let comp = self.project.comp(c);
|
||||
let t = match comp {
|
||||
Some(comp) => comp.frame_rate.snap(t.clamp(Tick::ZERO, comp.duration - comp.frame_duration())),
|
||||
Some(comp) => comp.frame_rate.snap_nearest(t.clamp(Tick::ZERO, comp.duration - comp.frame_duration())),
|
||||
None => t,
|
||||
};
|
||||
self.state.times.insert(c, t);
|
||||
|
||||
@@ -240,6 +240,17 @@ fn time_reverse_keyframes() {
|
||||
undo_redo_roundtrip(&mut s, after, |s| assert_eq!(prop(s, l, "transform/opacity").keys[0].value, KV::Scalar(0.0)));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn time_set_snaps_to_the_nearest_frame_and_ae_timecode() {
|
||||
let mut s = Session::default();
|
||||
s.execute("comp.new", json!({"name": "T", "width": 100, "height": 100, "frameRate": 29.97, "duration": 10})).unwrap();
|
||||
let r = s.execute("time.set", json!({"time": 2.5})).unwrap();
|
||||
assert_eq!(r["frame"], 75);
|
||||
let fr = s.active_comp().unwrap().frame_rate;
|
||||
assert_eq!(effectcraft_time::format_timecode_ae(75, fr, false), "0:00:02:15");
|
||||
assert_eq!(effectcraft_time::format_timecode_ae(75, fr, true), "0;00;02;15");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn separate_dimensions_split_and_rejoin() {
|
||||
let (mut s, l) = setup();
|
||||
|
||||
Reference in New Issue
Block a user