#1743: validate background and bridged exports in their owning session

This commit is contained in:
Kristian Myram
2026-10-30 09:41:38 +01:00
parent a0ad0d5bbd
commit 41148e9b72
15 changed files with 249 additions and 49 deletions
+1 -4
View File
@@ -726,12 +726,9 @@ fn run(cmd: &str, args: &Args, json_out: bool) -> Result<(), Failure> {
}
}
let out = args.opt("--out").unwrap_or("frame.png").to_string();
// Never over footage, a proxy or the project file (checked before rendering).
b.check_output(&out)?;
let t0 = std::time::Instant::now();
let f = b.render_with(comp.as_ref(), time, max_side, args.flag("--transparent"))?;
let f = b.render_to_file(comp.as_ref(), time, max_side, args.flag("--transparent"), &out)?;
let ms = t0.elapsed().as_secs_f64() * 1000.0;
std::fs::write(&out, &f.png).map_err(|e| format!("cannot write {out}: {e}"))?;
let info = json!({"path": out, "comp": f.comp, "time": f.time, "width": f.width, "height": f.height, "ms": (ms * 10.0).round() / 10.0});
if json_out {
emit(&info, true);