M13.15: qa essential graphics template via CLI script

Fill's ADBE Fill-0002 is Color (documented numbering); essential.* controls by name with
a listing error; an explicit comp param satisfies a command's active-comp enablement.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-03 12:30:11 -04:00
co-authored by Claude Opus 5.5
parent fecf054e5f
commit 77ab92fb7d
5 changed files with 167 additions and 9 deletions
+17 -1
View File
@@ -366,6 +366,18 @@ pub fn shape_kind(name: &str) -> Option<&'static str> {
})
}
/// Effects whose documented parameter match names are not numbered in display order:
/// (effect id, param match id, number). Fill lists All Masks second but it is `-0007`.
const PARAM_NUMBERS: &[(&str, &str, usize)] = &[
("ec.generate.fill", "fillMask", 1),
("ec.generate.fill", "color", 2),
("ec.generate.fill", "horizontalFeather", 3),
("ec.generate.fill", "verticalFeather", 4),
("ec.generate.fill", "opacity", 5),
("ec.generate.fill", "invert", 6),
("ec.generate.fill", "allMasks", 7),
];
/// Match name of the node at the end of `chain` (layer root's children → … → node). `effect`
/// params are numbered `<effect match name>-0001…` in parameter order, like After Effects.
pub fn node(chain: &[&Node]) -> String {
@@ -388,7 +400,11 @@ pub fn node(chain: &[&Node]) -> String {
let fx = parent.and_then(Node::as_group);
match fx {
Some(g) => {
let i = g.children.iter().position(|c| c.uid() == last.uid()).unwrap_or(0) + 1;
let i = PARAM_NUMBERS
.iter()
.find(|(fx, p, _)| *fx == g.match_id && *p == id)
.map(|(_, _, n)| *n)
.unwrap_or_else(|| g.children.iter().position(|c| c.uid() == last.uid()).unwrap_or(0) + 1);
format!("{}-{i:04}", effect(&g.match_id))
}
None => own(),
+13
View File
@@ -86,6 +86,19 @@ fn builds_a_comp_end_to_end() {
assert!(s.project.items.is_empty());
}
#[test]
fn fill_parameters_use_documented_match_names() {
// M13.15: `ADBE Fill-0002` is Fill's Color (All Masks is -0007), not the second row.
let mut s = session();
let o = ok(
&mut s,
r#"var c = app.project.items.addComp("F", 100, 100, 1, 1, 12); var l = c.layers.addSolid([1,1,1], "S", 100, 100, 1);
var fx = l.property("ADBE Effect Parade").addProperty("ADBE Fill");
[fx.property("ADBE Fill-0002").name, fx.property("ADBE Fill-0007").name, fx.property(2).matchName].join("|")"#,
);
assert_eq!(o.result, json!("Color|All Masks|ADBE Fill-0007"));
}
#[test]
fn undo_steps_without_a_group() {
let mut s = session();