Interpret Footage: apply the Loop (times) value sent as a float (#909)

This commit is contained in:
MarekSpodBiedry
2026-10-11 23:38:07 +02:00
parent 67434e9038
commit 189dec0644
2 changed files with 15 additions and 1 deletions
+2 -1
View File
@@ -620,7 +620,8 @@ impl Interpretation {
),
};
it.invert_alpha = super::b_p(p, "invertAlpha");
it.loops = p.get("loop").and_then(Value::as_u64).map(|v| v.clamp(1, 9999) as u32);
// The Interpret Footage form sends numbers as floats (3.0), which `as_u64` rejects.
it.loops = f_p(p, "loop").filter(|x| x.is_finite()).map(|v| v.round().clamp(1.0, 9999.0) as u32);
it.par = f_p(p, "pixelAspect").filter(|x| *x > 0.0);
it.fields = match str_p(p, "fields") {
Some(f) => Some(effectcraft_project::FieldOrder::parse(f).ok_or_else(|| bad(cmd, "fields: off|upper|lower"))?),