Command · Save as Template
template.save
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).
- v1
- Capability EditProject
- Tool
template_save
Request
{
"command": "template.save",
"params": {
"clip": 42,
"fields": [
{
"id": "name",
"kind": "text",
"label": "Name",
"layer": 2,
"property": "text"
},
{
"id": "boxColor",
"kind": "color",
"label": "Box",
"layer": 1,
"property": "fill"
}
],
"id": "lower-third",
"name": "Lower third"
}
}Parameters
clipinteger | object (1..)Required- The graphic clip. A clip id, or {"track", "time"} for the clip there.
descriptionstring- A description.
durationinteger | string- Default clip length (default: the responsive duration, else 5 s). Timecode in the sequence's rate ("00:01:02:03") or ticks.
fieldsobject[]- The editable fields; their defaults are what the graphic shows now.
fields[].idstringRequired- Stable key: [A-Za-z][A-Za-z0-9_.-]*.
fields[].kind`text` | `color` | `font` | `image` | `duration` | `checkbox`Required- What it edits.
fields[].labelstring- What the Essential Graphics panel shows.
fields[].layerinteger (0..4294967295)- The layer it edits (not for a "clip" duration).
fields[].propertystringRequired- text: "text"; color: "fill", "stroke", "background" or "shadow"; font: "font"; image: "media"; duration: "out" (the layer's out point) or "clip" (the clip's length); checkbox: "visible".
idstringRequired- The template's id: [A-Za-z0-9][A-Za-z0-9_.-]*, at most 128 bytes.
library`project` | `user`- Where it goes. Default "project".
namestringRequired- Its name.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
Discussion
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). Saving under an id in use replaces that template and raises its version.
Run it with wabcut-cli cmd <project> --json, from an MCP client as template_save, or from an extension. See Edit commands for requests, references and results.
See also
template.*
- template.instantiate
Add Template. 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).
- 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.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.