From 9fd14225eb2e7a94d1cfdacec1aacb90693475a3 Mon Sep 17 00:00:00 2001 From: Madhav Agarwal Date: Thu, 22 Oct 2026 19:28:31 +0530 Subject: [PATCH] engine: treat null sequence options as unspecified in Replace Footage --- crates/engine/src/cmd/file_more.rs | 2 +- crates/engine/src/tests/sequence.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/engine/src/cmd/file_more.rs b/crates/engine/src/cmd/file_more.rs index f03096657..11b79ff9d 100644 --- a/crates/engine/src/cmd/file_more.rs +++ b/crates/engine/src/cmd/file_more.rs @@ -885,7 +885,7 @@ fn replace_footage(s: &mut Session, p: &Value) -> Result { _ => (false, false, false), }; let mut opts = SequenceOptions::from_params(p); - if p.get("sequence").is_none() && p.get("alphabetical").is_none() { + if b_p(p, "sequence").is_none() && b_p(p, "alphabetical").is_none() { (opts.sequence, opts.folders, opts.alphabetical) = previous; } let src = crate::sequence::source_of(s.services.as_ref(), &path, opts); diff --git a/crates/engine/src/tests/sequence.rs b/crates/engine/src/tests/sequence.rs index d99a600d3..91bf0a399 100644 --- a/crates/engine/src/tests/sequence.rs +++ b/crates/engine/src/tests/sequence.rs @@ -190,6 +190,10 @@ fn replace_footage_keeps_a_still_a_still() { s.execute("file.replaceFootage", json!({"path": at(&dir, "shot_0004.png")})).unwrap(); let (name, f) = footage(&s, &item); assert_eq!((name.as_str(), f.kind), ("shot_0004.png", FootageKind::Still)); + // JSON null is unspecified, not "on": the still stays a still. + s.execute("file.replaceFootage", json!({"path": at(&dir, "shot_0004.png"), "sequence": null})).unwrap(); + let (name, f) = footage(&s, &item); + assert_eq!((name.as_str(), f.kind), ("shot_0004.png", FootageKind::Still)); // Asking for the run still brings it. s.execute("file.replaceFootage", json!({"path": at(&dir, "shot_0004.png"), "sequence": true})).unwrap(); let (name, f) = footage(&s, &item);