From 5530560fb8b646560b057706343b3af0e79de899 Mon Sep 17 00:00:00 2001 From: Kristian Myram Date: Tue, 13 Oct 2026 01:53:35 +0200 Subject: [PATCH] #1063: find a light's Casts Shadows option by its After Effects name A script asks a light's options for "ADBE Casts Shadows", which returned null. The light's option is named "Casts Shadows" here, so the lookup never matched. The name is now an alias for the castsShadows property, and a regression test checks the lookup returns the property. Co-Authored-By: Claude Haiku 5.5 --- crates/script/src/model.rs | 2 ++ crates/script/src/tests.rs | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/crates/script/src/model.rs b/crates/script/src/model.rs index 4445fbbf..3c44e164 100644 --- a/crates/script/src/model.rs +++ b/crates/script/src/model.rs @@ -393,6 +393,8 @@ fn alias(k: &str) -> Option<&'static str> { "content" | "contents" => "contents", "maskshape" | "maskpath" => "path", "maskfeather" => "feather", + // A light's options name it "ADBE Casts Shadows" in After Effects (#1063). + "adbecastsshadows" => "castsShadows", "maskopacity" => "opacity", "maskexpansion" | "maskoffset" => "expansion", "sourcetext" => "sourceText", diff --git a/crates/script/src/tests.rs b/crates/script/src/tests.rs index 303bd820..594b9304 100644 --- a/crates/script/src/tests.rs +++ b/crates/script/src/tests.rs @@ -1010,3 +1010,19 @@ fn scripted_text_range_selector_resolves_and_is_the_only_selector() { ); assert_eq!(o.result, json!([1, "ADBE Text Selector", 50, 100, "ADBE Text Percent Offset"])); } + +/// #1063: a script asks a light's options for After Effects' "ADBE Casts Shadows". +#[test] +fn light_options_accept_the_after_effects_casts_shadows_name() { + let mut s = session(); + let o = ok( + &mut s, + r#" + var comp = app.project.items.addComp("Repro", 1920, 1080, 1, 10, 25); + var light = comp.layers.addLight("Key", [100, 100]); + var c = light.property("ADBE Light Options Group").property("ADBE Casts Shadows"); + c == null ? "null" : c.name + "#, + ); + assert_ne!(o.result, json!("null"), "{:?}", o.result); +}