Command · New Graphic
graphic.add
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).
- v1
- Capability EditSequence
- Tool
graphic_add
Request
{
"command": "graphic.add",
"params": {
"at": "00:00:05:00",
"graphic": {
"layers": [
{
"id": 1,
"kind": "text",
"text": {
"runs": [
{
"size": 64,
"text": "Somchai"
}
]
},
"transform": {
"x": 160,
"y": 880
}
}
]
},
"name": "Lower third",
"track": "V2"
}
}Parameters
atinteger | stringRequired- Where the graphic starts. Timecode in the sequence's rate ("00:01:02:03") or ticks.
durationinteger | string- How long it lasts. Default 5 seconds. Timecode in the sequence's rate ("00:01:02:03") or ticks.
graphicobject- The graphic (docs/graphics.md). Default: an empty one.
namestring- The graphic's name (also the clip's).
placement`targeted` | `freeTrackAtOrAbove` | `newTrack`- "targeted": on "track" (or the targeted video track), overwriting what is there; the default when "track" is given. "freeTrackAtOrAbove": the first unlocked video track from "track" (or the targeted one) upwards with nothing in the graphic's time range, a new top track when none is free; the default without "track", so nothing under the playhead is overwritten. "newTrack": a new video track on top.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
trackstring | integer (1..)- A video track. Default: the first targeted unlocked video track. "V1" (bottom video track), "A2", ... or a track id.
Discussion
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). Layer ids 0 get fresh ones. Add layers later with graphic.addLayer, animate them with graphic.applyPreset or keyframes in the layer JSON. createdIds: the clip, and the canvas media item when the project had none of this size.
Run it with wabcut-cli cmd <project> --json, from an MCP client as graphic_add, or from an extension. See Edit commands for requests, references and results.
See also
graphic.*
- 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.applyPreset
Apply Animation Preset. 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).
- 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.