engine: treat null sequence options as unspecified in Replace Footage

This commit is contained in:
Madhav Agarwal
2026-10-29 10:20:20 +05:30
parent a29eda3844
commit 9fd14225eb
2 changed files with 5 additions and 1 deletions
+1 -1
View File
@@ -885,7 +885,7 @@ fn replace_footage(s: &mut Session, p: &Value) -> Result<Value> {
_ => (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);
+4
View File
@@ -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);