Command · Apply Animation Preset
graphic.applyPreset
Animates a layer with editable keyframes: fade, slide, scalePop, bounce (the transform), typewriter and wordByWord (a text-range animator: characters or words appear in turn), wipe (a mask).
- v1
- Capability EditSequence
- Tool
graphic_applyPreset
Request
{
"command": "graphic.applyPreset",
"params": {
"clip": 42,
"duration": "00:00:01:00",
"layer": 2,
"preset": "typewriter"
}
}Parameters
clipinteger | object (1..)Required- The graphic clip. A clip id, or {"track", "time"} for the clip there.
direction`left` | `right` | `up` | `down`- Slide and wipe: where from (in), to (out) or along (loop). Default left.
distancenumber (0.0..1000000.0)- Slide and bounce: how far, pixels (default a quarter of the canvas).
durationinteger | string- How long it takes (one cycle of a loop). Default half a second. Timecode in the sequence's rate ("00:01:02:03") or ticks.
easing`linear` | `easeIn` | `easeOut` | `easeInOut` | `overshoot`- Default easeOut.
layerinteger (1..)Required- The layer. A layer id.
overshootnumber (0.0..100.0)- Scale pop, bounce and overshoot easing: how far past, % (default 10).
phase`in` | `out` | `loop`- In (default), out or loop.
preset`fade` | `slide` | `scalePop` | `typewriter` | `wordByWord` | `wipe` | `bounce`Required- The preset.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
Discussion
Animates a layer with editable keyframes: fade, slide, scalePop, bounce (the transform), typewriter and wordByWord (a text-range animator: characters or words appear in turn), wipe (a mask). "in" animates the graphic's start, "out" its end, "loop" repeats over the whole clip. Keys inside the preset's time replace the ones there; others stay.
Run it with wabcut-cli cmd <project> --json, from an MCP client as graphic_applyPreset, or from an extension. See Edit commands for requests, references and results.
See also
graphic.*
- graphic.add
New Graphic. Adds a motion graphic as a clip on a video track (overwriting what is there): "graphic" is the graphic's JSON (docs/graphics.md: name, width/height of its design canvas - default the sequence's frame - layers of text, shapes, images and groups, responsive time).
- graphic.addLayer
Add Graphic Layer. Adds a layer (JSON, docs/graphics.md) to a graphic clip: on top of "parent" (a group layer; default the top level), or at "index" (0 = bottom).
- graphic.get
Graphic. A graphic clip's graphic as JSON (docs/graphics.md), with its layers listed flat (bottom to top, groups before their children) and, for a template instance, its template and field values.
- graphic.removeLayer
Delete Graphic Layer. Removes a layer from a graphic clip (a group with its children); pins to it and template fields bound to it go too.
- graphic.resolve
Graphic Draw List. The draw list of a graphic clip at a timeline time (default its start): every visible layer bottom to top with its transform to canvas pixels [a, b, c, d, e, f], opacity, blend mode, shadow, masks, and its path and paints, text runs (and per-character animator values) or image - with the brand kit applied.
- graphic.update
Edit Graphic. Changes a graphic clip's graphic with a JSON merge patch (RFC 7386) over its JSON (graphic.get): objects merge, null resets a key to its default, arrays ("layers") are replaced whole.
- graphic.updateLayer
Edit Graphic Layer. Changes a layer of a graphic clip with a JSON merge patch (RFC 7386) over the layer's JSON: {"text": {"runs": [{"text": "New"}]}} replaces the runs, {"transform": {"x": 200}} moves it, a curve ({"keys": [{"t": ticks, "v": value}, ...]} or just the array of keys) animates it.