Merge pull request #1162 from nanox333/fix/1063-light-casts-shadows

# Conflicts:
#	crates/script/src/tests.rs
This commit is contained in:
Brandon Thomas 2026-10-13 04:28:33 -04:00
commit 66be8857b5
2 changed files with 18 additions and 0 deletions

View File

@ -394,6 +394,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",

View File

@ -1104,3 +1104,19 @@ fn source_point_conversions_follow_the_layer_transform() {
assert!(near(&v[0], 350.0) && near(&v[1], 275.0), "{v}");
assert!(near(&v[2], 100.0) && near(&v[3], 50.0), "{v}");
}
/// #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);
}