Film kit command

graphics.newText

Text

Adds a text layer with `text`, `size` px, font and `position` (point text) or `box` [w,h] (paragraph text) to graphic `clip`, or a new graphic clip `seconds` long at the playhead (`newClip`). Answers the clip and layer.

Kit
Film 0.1.0 (.kfilm)
Changes the document
yes
Acts on
clip (one id), which a run step’s on fills

Parameters

Parameters of graphics.newText
NameTypeRequiredDescription
boxnumber[]noparagraph text wrapped in a box this size
clipintegerno
fontstringno
fontStylestringno
frameintegerno
newClipbooleanno
positionnumber[]nopoint text: its alignment point on the first baseline; with `box`: the box's top-left corner
secondsnumberno
sizenumbernopixels
textstringno
timeintegernoticks (254016000000 per second)
timecodestringno
trackintegernoa position counted from 0 (the first is 0)
verticalbooleanno

Call through film_run

text
film_run {
  "path": "<file>.kfilm",
  "steps": [{ "command": "graphics.newText" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: box, clip, font, fontStyle, frame, newClip, position, seconds, size, text, time, timecode, track, vertical. film_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "box": {
      "description": "paragraph text wrapped in a box this size",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "clip": {
      "type": "integer",
      "x-khp-types": [
        "Clip"
      ]
    },
    "font": {
      "type": "string"
    },
    "fontStyle": {
      "type": "string"
    },
    "frame": {
      "type": "integer"
    },
    "newClip": {
      "type": "boolean"
    },
    "position": {
      "description": "point text: its alignment point on the first baseline; with `box`: the box's top-left corner",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "seconds": {
      "default": 5,
      "type": "number"
    },
    "size": {
      "default": 100,
      "description": "pixels",
      "type": "number"
    },
    "text": {
      "default": "New Text",
      "type": "string"
    },
    "time": {
      "description": "ticks (254016000000 per second)",
      "type": "integer"
    },
    "timecode": {
      "type": "string"
    },
    "track": {
      "description": "a position counted from 0 (the first is 0)",
      "type": "integer"
    },
    "vertical": {
      "default": false,
      "type": "boolean"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (film_commands through @kition/[email protected], built from KitionAI/kition-film@375db59). As data: commands.jsonl.