#757: Transitions animation presets in Effects & Presets
Problem: EffectCraft shipped only 8 original text-animator presets against After Effects' 621; there was no Transitions category (ranked gap #7). Fix: an original preset library, crates/engine/presets/transitions.json (23 presets on our own Transition effects and layer opacity: fades, directional and diagonal wipes, clock and fan reveals, blinds and slats, pixel/mosaic dissolves, card flips, CC grid, radial scale, line sweep and jaws wipes; In and Out). New commands anim.applyBuiltinPreset (adds the effects with values and keyframes from the current time, one undo step, reports any path that doesn't fit) and anim.builtinPresets. Effects & Presets lists them under * Animation Presets > Transitions; double-click applies. Sidecar and ATTRIBUTION.md entry; gaps/effects-parity updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a7d3e7699
commit
81bec748ec
@@ -362,3 +362,31 @@ fn essential_graphics_scale_keeps_constrain_proportions() {
|
||||
let unlinked = scale(&h);
|
||||
assert!(unlinked[0] > linked[0] && unlinked[1] == linked[1], "unlinked, X moves alone: {unlinked:?}");
|
||||
}
|
||||
|
||||
/// #757: Effects & Presets lists the built-in Transitions presets under * Animation Presets;
|
||||
/// double-clicking one applies it to the selected layer (effect plus keyframes).
|
||||
#[test]
|
||||
fn transition_presets_apply_from_effects_and_presets() {
|
||||
let mut h = harness();
|
||||
let layer = h.state().session.active_comp().unwrap().layers[0].id.0;
|
||||
h.state_mut().session.execute("layer.select", json!({"layers": [layer]})).unwrap();
|
||||
open(&mut h, "effectsPresets");
|
||||
h.state_mut().ui.effects_search = "clock reveal".into();
|
||||
h.run_steps(3);
|
||||
assert!(h.state().auto.find("effects.category.presets/Transitions").is_some(), "the Transitions folder is listed");
|
||||
let e = h.state().auto.find("effects.preset.builtin.clockReveal").expect("Clock Reveal is listed").clone();
|
||||
let p: Pos2 = pos2(e.rect[0] + e.rect[2] / 2.0, e.rect[1] + e.rect[3] / 2.0);
|
||||
h.input_mut().events.push(Event::PointerMoved(p));
|
||||
h.step();
|
||||
// Both clicks in one frame: the harness' frame time is longer than a double-click's.
|
||||
for _ in 0..2 {
|
||||
for pressed in [true, false] {
|
||||
h.input_mut().events.push(Event::PointerButton { pos: p, button: egui::PointerButton::Primary, pressed, modifiers: Default::default() });
|
||||
}
|
||||
}
|
||||
h.run_steps(3);
|
||||
let comp = h.state().session.active_comp().unwrap();
|
||||
let fx = comp.layers[0].effects().unwrap().groups().next().expect("an effect was added").clone();
|
||||
assert_eq!(fx.name, "Radial Wipe");
|
||||
assert_eq!(fx.prop("completion").unwrap().keys.len(), 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user