mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-19 08:53:09 +01:00
Fixes #3601. ### What A layer parameter left at None (a Layer Control, or an effect's layer parameter) now stands for the layer it sits on, as in After Effects (values observed in AE 26.3 are in #3601). Before, its value was `null`. The property was still truthy, so a rig's `L ? L.sourceRectAtTime(t) : 0` went down the wrong branch and stopped with "not a callable function". The change is one line in `Prop.__wrap` (`crates/expr/src/prelude.js`). ### Tested - **`an_empty_layer_control_stands_for_its_own_layer`** in `crates/expr/src/tests.rs`: truthiness, `name`, `index`, the `L ? L.transform.position[0] : -1` pattern, and `sourceRectAtTime`. It fails without the change. - **Suites:** `cargo test -p effectcraft-expr` (167 passed) and `cargo test -p effectcraft-script` pass. clippy and fmt are clean. - **Not covered here:** calling the empty parameter like a layer (`L("ADBE Transform Group")`). That depends on #3554, and works with both applied.