mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-10 20:41:25 +00:00
Scripting: After Effects match names for 14 effects and Casts Shadows (#3122)
* #3113: use After Effects' effect match names in scripting Checked every row of crates/script/src/matchnames.rs against After Effects 26.2 (app.effects, canAddProperty and the layer property trees). Fourteen effect names were wrong: twelve did not exist (Pixel Motion Blur is ADBE OFMotionBlur, Shadow/Highlight is ADBE ShadowHighlight, Ellipse is ADBE ELLIPSE, ...), and Noise and Photo Filter pointed at After Effects' hidden obsolete versions (now ADBE Noise2 and ADBE PhotoFilterPS). A light's Casts Shadows is ADBE Casts Shadows. The old names stay accepted for lookup (addProperty, property(), and parameters such as "ADBE Noise-0001"), so existing scripts keep working; .matchName emits only the After Effects name. A names-only fixture of After Effects' first-party match names backs the new test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Scripting: match names that changed only in case still find effects and parameters property("ADBE Ellipse") and "ADBE Grow Bounds-0001" found nothing after the names became ADBE ELLIPSE / ADBE GROW BOUNDS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9408d70da0
commit
fee50dbfd1
4 files changed
+490
-17
No files matched your search
@@ -139,6 +139,42 @@ fn fill_parameters_use_documented_match_names() {
|
||||
assert_eq!(o.result, json!("Color|All Masks|ADBE Fill-0007"));
|
||||
}
|
||||
|
||||
/// #3113: effects carry After Effects' match names (`ADBE Noise2`, `ADBE OFMotionBlur`); the
|
||||
/// names earlier versions emitted still add and find the effect and its parameters.
|
||||
#[test]
|
||||
fn effects_use_after_effects_match_names_and_accept_legacy_ones() {
|
||||
let mut s = session();
|
||||
let o = ok(
|
||||
&mut s,
|
||||
r#"var c = app.project.items.addComp("N", 100, 100, 1, 1, 12); var l = c.layers.addSolid([1,1,1], "S", 100, 100, 1);
|
||||
var fx = l.property("ADBE Effect Parade");
|
||||
var a = fx.addProperty("ADBE Noise2"), b = fx.addProperty("ADBE Noise"), m = fx.addProperty("ADBE OFMotionBlur");
|
||||
var p = fx.addProperty("ADBE Pixel Motion Blur");
|
||||
[a.matchName, b.matchName, m.matchName, p.matchName, a.property("ADBE Noise2-0001").name,
|
||||
fx.property("ADBE Noise").matchName, a.property("ADBE Noise-0001").name, fx.numProperties]"#,
|
||||
);
|
||||
assert_eq!(
|
||||
o.result,
|
||||
json!(["ADBE Noise2", "ADBE Noise2", "ADBE OFMotionBlur", "ADBE OFMotionBlur", "Amount of Noise", "ADBE Noise2", "Amount of Noise", 4])
|
||||
);
|
||||
}
|
||||
|
||||
/// #3113: names that changed only in case (`ADBE Ellipse` → `ADBE ELLIPSE`, `ADBE Grow Bounds` →
|
||||
/// `ADBE GROW BOUNDS`) still find the effect and its parameters.
|
||||
#[test]
|
||||
fn match_names_that_changed_case_still_find_effects_and_parameters() {
|
||||
let mut s = session();
|
||||
let o = ok(
|
||||
&mut s,
|
||||
r#"var c = app.project.items.addComp("E", 100, 100, 1, 1, 12); var l = c.layers.addSolid([1,1,1], "S", 100, 100, 1);
|
||||
var fx = l.property("ADBE Effect Parade");
|
||||
var e = fx.addProperty("ADBE Ellipse"), g = fx.addProperty("ADBE Grow Bounds");
|
||||
[e.matchName, fx.property("ADBE Ellipse").matchName, e.property("ADBE Ellipse-0001").matchName,
|
||||
g.matchName, fx.property("ADBE Grow Bounds").matchName, g.property("ADBE Grow Bounds-0001").matchName]"#,
|
||||
);
|
||||
assert_eq!(o.result, json!(["ADBE ELLIPSE", "ADBE ELLIPSE", "ADBE ELLIPSE-0001", "ADBE GROW BOUNDS", "ADBE GROW BOUNDS", "ADBE GROW BOUNDS-0001"]));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn stroke_parameters_use_after_effects_match_names() {
|
||||
// #1405: `ADBE Stroke-0002` is Stroke's Color in After Effects, not All Masks.
|
||||
|
||||
Reference in new issue
Block a user