Command · Add Template
template.instantiate
Adds a graphic made from a template (template.list) as a clip, with field values (by field id: text a string, colour "#RRGGBB" or [r, g, b, a] 0..1 or {"brand": name}, font a family or {"family", "style", "weight"}, image a media id or name, duration a time, checkbox true/false).
- v1
- Capability EditSequence
- Tool
template_instantiate
Request
{
"command": "template.instantiate",
"params": {
"at": "00:00:12:00",
"template": "lower-third",
"track": "V2",
"values": {
"name": "Somchai Jaidee"
}
}
}Parameters
atinteger | stringRequired- Where it starts. Timecode in the sequence's rate ("00:01:02:03") or ticks.
durationinteger | string- How long it lasts. Timecode in the sequence's rate ("00:01:02:03") or ticks.
library`project` | `user` | `builtin`- Only this library.
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.
templatestringRequired- The template's id.
trackstring | integer (1..)- A video track. Default: the first targeted unlocked video track. "V1" (bottom video track), "A2", ... or a track id.
valuesobject- Field values by field id.
Discussion
Adds a graphic made from a template (template.list) as a clip, with field values (by field id: text a string, colour "#RRGGBB" or [r, g, b, a] 0..1 or {"brand": name}, font a family or {"family", "style", "weight"}, image a media id or name, duration a time, checkbox true/false). Its length: a "clip" duration field, else "duration", else the template's. The project's library is searched first, then the user's, then the built-ins (template.list).
Run it with wabcut-cli cmd <project> --json, from an MCP client as template_instantiate, or from an extension. See Edit commands for requests, references and results.
See also
template.*
- template.list
Templates. The graphic templates of the project's library, the user's and the built-in ones that ship with Wabcut (C.16: gaming lower thirds, banners, callouts, stingers, end cards...): id, name, version, default length, canvas, and the fields (id, label, kind, default value) template.instantiate and template.setField take.
- template.resolve
Template Draw List. The draw list of a template at a design time, without adding it to a timeline: what template browsers draw for thumbnails and hover previews (C.16).
- template.save
Save as Template. Saves a graphic clip's graphic as a template with editable fields (Premiere's Motion Graphics Templates): into the project's library (default), or the user's template library folder ("library": "user"; the host's, not a path).
- template.setField
Edit Template Fields. Sets field values of a template instance clip (template.list shows the fields): "field" and "value", or several at once in "values" - one undo step.