mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 00:55:43 +00:00
Automation: confined footage passes on the files it reads
Part of #3184: ConfinedFootage forwards FootageSource::recording to the source it wraps, so renders of an automation session list their files instead of coming back incomplete. The read tests also render through the viewer's CancellableFootage wrapper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
91443ef25e
commit
2de2406bcc
2 files changed
+14
-2
No files matched your search
@@ -401,6 +401,11 @@ impl FootageSource for ConfinedFootage {
|
||||
fn called_off(&self) -> bool {
|
||||
self.inner.called_off()
|
||||
}
|
||||
/// The files read inside the roots, as the inner source notes them (footage outside reads
|
||||
/// nothing).
|
||||
fn recording(&self, reads: &effectcraft_engine::render::reads::ReadLog, f: &mut dyn FnMut()) {
|
||||
self.inner.recording(reads, f)
|
||||
}
|
||||
}
|
||||
|
||||
/// The session's file reads, only inside the read roots: what a project or an imported file
|
||||
|
||||
@@ -112,9 +112,16 @@ fn a_sequence_frame_reports_only_its_own_file() {
|
||||
assert_stamps_match_disk(&files);
|
||||
assert_eq!(crate::opens_under(&dir) - opened, 1, "one file opened: the frame's");
|
||||
assert_eq!(crate::opens_under(&unused_dir), 0, "the unused sequence was not looked at");
|
||||
// Another frame reads its own file.
|
||||
let (_, files) = render(&p, &pool, &cache, cid, 4);
|
||||
// Another frame reads its own file, also through the viewer's wrapper of the pool.
|
||||
let viewer = effectcraft_render::CancellableFootage { inner: &pool, cancel: Default::default() };
|
||||
let log = ReadLog::new();
|
||||
let mut r = Renderer::new(&p, &viewer, RenderOpts::default());
|
||||
r.cache = Some(&cache);
|
||||
r.reads = Some(&log);
|
||||
r.comp_frame(cid, RATE.tick_of(4));
|
||||
let files = log.into_files();
|
||||
assert_eq!(paths(&files), [frame_4]);
|
||||
assert!(files.is_complete());
|
||||
let _ = std::fs::remove_dir_all(&dir);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user