From 77e2cf05542fdafed43932481ef203cb55ad46fc Mon Sep 17 00:00:00 2001 From: Kushagra Kumar Date: Sun, 25 Oct 2026 18:44:35 +0530 Subject: [PATCH] fix(engine): expose transparent param in comp.saveFrameAs schema and test execute_checked --- crates/engine/src/commands/comp_more.rs | 2 +- crates/engine/src/tests_frame_export.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/commands/comp_more.rs b/crates/engine/src/commands/comp_more.rs index 96aa29a9a..b47d0ebf8 100644 --- a/crates/engine/src/commands/comp_more.rs +++ b/crates/engine/src/commands/comp_more.rs @@ -235,7 +235,7 @@ pub fn specs() -> Vec { "File...", ["Composition", "Save Frame As"], Some("Cmd+Alt+S"), - "{path (.png; with queue: an output path or template), time?, scale?, queue?: bool (add a Render Queue item from the Frame Default templates instead of writing now)}", + "{path (.png; with queue: an output path or template), time?, scale?, queue?: bool (add a Render Queue item from the Frame Default templates instead of writing now), transparent?: bool (default true)}", has_comp, save_frame ), diff --git a/crates/engine/src/tests_frame_export.rs b/crates/engine/src/tests_frame_export.rs index d56c941ae..a11f7c64c 100644 --- a/crates/engine/src/tests_frame_export.rs +++ b/crates/engine/src/tests_frame_export.rs @@ -184,7 +184,7 @@ fn save_frame_as_png_preserves_alpha_channel() { assert_eq!(empty_px[3], 0, "outside solid region must have alpha 0: {empty_px:?}"); let flat_path = dir.join("flat.png").to_string_lossy().to_string(); - s.execute("comp.saveFrameAs", json!({"path": flat_path, "transparent": false})).unwrap(); + s.execute_checked("comp.saveFrameAs", json!({"path": flat_path, "transparent": false})).unwrap(); let flat_img = image::load_from_memory(&std::fs::read(&flat_path).unwrap()).unwrap().to_rgba8(); let flat_empty_px = flat_img.get_pixel(24, 24); assert_eq!(flat_empty_px[3], 255, "transparent: false must composite over background: {flat_empty_px:?}");