mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-15 06:42:31 +00:00
#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:
1 parent
bb2d2005ce
commit
fc9eca99a0
5 files changed
+71
-11
No files matched your search
@@ -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))
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user