Interpret Footage: looped footage lasts its loops on new and re-timed layers (fixes #1045)

This commit is contained in:
Marco Arnulfo
2026-10-12 17:13:33 +02:00
parent e2f314f753
commit a50e49df73
4 changed files with 26 additions and 5 deletions
+6 -1
View File
@@ -1158,6 +1158,11 @@ impl Footage {
self.linear_light && !self.preserve_rgb
}
/// How long the footage plays: its duration times Interpret Footage ▸ Loop.
pub fn looped_duration(&self) -> Tick {
Tick(self.duration.0.saturating_mul(self.loop_count.max(1) as i64))
}
/// Source time as the footage's timecode: its frame `frame` from Start Timecode
/// (`0:00:41:20`), as the Footage panel shows it.
pub fn timecode(&self, frame: i64) -> String {
@@ -1281,7 +1286,7 @@ impl Item {
pub fn duration(&self) -> Option<Tick> {
match &self.kind {
ItemKind::Comp(c) => Some(c.duration),
ItemKind::Footage(f) if f.kind != FootageKind::Still => Some(f.duration),
ItemKind::Footage(f) if f.kind != FootageKind::Still => Some(f.looped_duration()),
_ => None,
}
}