#3231: evaluate prop.get and expression errors with the footage source

prop.get and Session::expression_errors (Reveal Expression Errors, the
viewer's error banner) built their expression context without the
footage source, so an expression that reads footage pixels
(sampleImage) gave a different value or a spurious error there while
it worked in the render and in expr.errors (#1000).

expr_tools::eval_ctx builds the render's context (expression host and
footage source) for a comp at a time; expr.errors, prop.get,
Session::expression_errors and the script value query all use it.

Fixes #3231
This commit is contained in:
vangel76 committed 2026-11-07 15:42:40 +01:00
1 parent bb2d2005ce
commit fc9eca99a0
5 files changed
+71 -11

No files matched your search

+1 -4
View File
@@ -519,12 +519,9 @@ fn value(s: &Session, a: &J) -> R {
let v = if pre || !p.has_expression() {
p.value_at(l.layer_time(t))
} else {
let mut ctx = EvalCtx::new(&s.project, cid, c, t);
ctx.expr = s.expr.as_deref();
// Sample expressions (`sampleImage`) read footage through the session's source; without
// it footage layers sample as transparent (#1000).
ctx.footage = Some(s.footage.as_ref());
ctx.value(l, p)
effectcraft_engine::commands::expr_tools::eval_ctx(s, cid, c, t).value(l, p)
};
Ok(js_value(c, &v))
}