Command · Edit Template Fields
template.setField
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.
- v1
- Capability EditSequence
- Tool
template_setField
Request
{
"command": "template.setField",
"params": {
"clip": 42,
"field": "name",
"value": "Malee"
}
}Parameters
clipinteger | object (1..)Required- The graphic clip. A clip id, or {"track", "time"} for the clip there.
fieldstring- A field id.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
value- The field's value (as template.instantiate takes it).
valuesobject- Field values by field id.
Discussion
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. A "clip" duration field trims the clip's end.
Run it with wabcut-cli cmd <project> --json, from an MCP client as template_setField, 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.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).