Time: in Frames style a typed number is a frame count (#610 follow-up)
parse_timecode reads bare digits as timecode pairs, so 00100 went to frame 30 (1 s) instead of frame 100. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QiAJeFttZp83Fh7YuzAR5f
This commit is contained in:
@@ -43,12 +43,17 @@ pub fn parse_display_time(s: &Session, comp: &Comp, text: &str, current: i64) ->
|
||||
let relative = text.trim().starts_with('+') || text.trim().starts_with('-');
|
||||
if relative {
|
||||
Ok(parsed)
|
||||
} else if st.time_display == TimeDisplayStyle::Frames
|
||||
&& let Ok(frame) = text.trim().parse::<i64>()
|
||||
{
|
||||
// Displayed digits are a plain frame count (00100 is frame 100, not 1 s) plus
|
||||
// Start Numbering Frames At.
|
||||
Ok(frame.saturating_sub(st.frame_start))
|
||||
} else if st.time_display == TimeDisplayStyle::Frames {
|
||||
// Displayed digits are composition frame plus Start Numbering Frames At.
|
||||
Ok(parsed - st.frame_start)
|
||||
Ok(parsed.saturating_sub(st.frame_start))
|
||||
} else {
|
||||
// Displayed timecode includes the composition Start Timecode offset.
|
||||
Ok(parsed - fr.frame_at(comp.display_start))
|
||||
Ok(parsed.saturating_sub(fr.frame_at(comp.display_start)))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user