Merge main into M13.15

# Conflicts:
#	crates/engine/src/commands/essential.rs
This commit is contained in:
Brandon Thomas
2026-10-03 13:00:33 -04:00
59 changed files with 4881 additions and 359 deletions
+25
View File
@@ -459,3 +459,28 @@ fn layer_switches_timing_and_comp_settings() {
let o = ok(&mut s, "var n = app.project.numItems; app.project.item(1).remove(); n - app.project.numItems");
assert_eq!(o.result, json!(1));
}
#[test]
fn motion_graphics_template_hooks_add_mirrors_and_controllers() {
let mut s = session();
let o = ok(
&mut s,
r#"
var comp = app.project.items.addComp("Card", 64, 64, 1, 2, 30);
var bg = comp.layers.addSolid([1, 1, 1], "BG", 64, 64, 1);
var op = bg.transform.opacity;
var r = [op.canAddToMotionGraphicsTemplate(comp), op.addToMotionGraphicsTemplateAs(comp, "Fade")];
// Again: a mirror of the same property (a controller of its own).
r.push(op.addToMotionGraphicsTemplate(comp));
r.push(comp.motionGraphicsTemplateControllerCount);
r.push(comp.getMotionGraphicsTemplateControllerName(1), comp.getMotionGraphicsTemplateControllerName(2));
comp.setMotionGraphicsControllerName(2, "Fade Again");
r.push(comp.getMotionGraphicsTemplateControllerName(2));
r
"#,
);
assert_eq!(o.result, json!([true, true, true, 2, "Fade", "Fade", "Fade Again"]));
let (_, c) = comp_named(&s, "Card");
let eg = c.essential.as_ref().unwrap();
assert!(matches!(eg.controls[1].kind, effectcraft_engine::project::essential::EgKind::Mirror { of } if of == eg.controls[0].id));
}