Motion kit command

layer.applyTextPreset

Apply Text Animation Preset

Applies a built-in text animation to a text `layer`: `preset` typewriter, fadeUpCharacters, bounceInWords, trackingIn, scramble, blurIn, jitter or dropInLines, keyed from the current time; or a promo preset from `start` (comp s, default the current time) with timing in frames: blurSlide (per word rise + blur + fade, `variant: subtitle`), letterpress (per character scale + blur), leadWordZoom (first word zoomed and centred, then settles into the line), typewriterFast (0.7 frames per character with a cursor), digitRoll (odometer digits: strip and window layers parented to the text) or countUp (`from`/`to`/`duration`, expo-out, thousands separators). `frames`, `stagger`, `ease`, `by`, `dy`, `blur`, `scale` override the tuned defaults; CJK text goes per character. One undo step; the answer has the animators or layers made and `end`. Fails on non-text layers.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
yes
Acts on
layer (one id), which a run step’s on fills

Parameters

Parameters of layer.applyTextPreset
NameTypeRequiredDescription
blurnumbernopixels; CSS blur radius
by"words" | "characters" | "lines"no
cursorstringno
cyclesintegernoextra full turns of a digit roll
decimalsintegerno
durationnumbernoseconds
dynumbernopixels
easestring | number[]noa curve name (snappy, out, smooth, swift, settle, pop, reseat, fly, linear) or [x1, y1, x2, y2]
framesnumbernoframes per word, character or digit; typewriterFast: per character
fromnumberno
holdnumbernoframes the lead word holds
layerinteger | stringnoa text layer; default the first selected layer
motionBlurbooleannofast presets turn on layer motion blur, shutter 180, 10 samples; default true
preset"typewriter" | "fadeUpCharacters" | "bounceInWords" | "trackingIn" | "scramble" | "blurIn" | "jitter" | "dropInLines" | "blurSlide" | "letterpress" | "leadWordZoom" | "typewriterFast" | "digitRoll" | "countUp"no
pushnumbernofraction the lead word grows over its hold
scalenumbernostart scale, 1 = 100%
separatorstringno
staggernumbernoframes between units
startnumbernoseconds; comp time; default the current time
tonumberno
variant"default" | "subtitle"no

Call through motion_run

text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "layer.applyTextPreset" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: blur, by, cursor, cycles, decimals, duration, dy, ease, frames, from, hold, layer, motionBlur, preset, push, scale, separator, stagger, start, to, variant. motion_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": {
    "blur": {
      "description": "pixels; CSS blur radius",
      "type": "number"
    },
    "by": {
      "enum": [
        "words",
        "characters",
        "lines"
      ],
      "type": "string"
    },
    "cursor": {
      "type": "string"
    },
    "cycles": {
      "description": "extra full turns of a digit roll",
      "type": "integer"
    },
    "decimals": {
      "type": "integer"
    },
    "duration": {
      "description": "seconds",
      "type": "number"
    },
    "dy": {
      "description": "pixels",
      "type": "number"
    },
    "ease": {
      "description": "a curve name (snappy, out, smooth, swift, settle, pop, reseat, fly, linear) or [x1, y1, x2, y2]",
      "oneOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "frames": {
      "description": "frames per word, character or digit; typewriterFast: per character",
      "type": "number"
    },
    "from": {
      "type": "number"
    },
    "hold": {
      "description": "frames the lead word holds",
      "type": "number"
    },
    "layer": {
      "description": "a text layer; default the first selected layer",
      "oneOf": [
        {
          "description": "layer id or 1-based index",
          "type": "integer"
        },
        {
          "description": "layer name or #n",
          "type": "string"
        }
      ],
      "x-khp-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "motionBlur": {
      "description": "fast presets turn on layer motion blur, shutter 180, 10 samples; default true",
      "type": "boolean"
    },
    "preset": {
      "enum": [
        "typewriter",
        "fadeUpCharacters",
        "bounceInWords",
        "trackingIn",
        "scramble",
        "blurIn",
        "jitter",
        "dropInLines",
        "blurSlide",
        "letterpress",
        "leadWordZoom",
        "typewriterFast",
        "digitRoll",
        "countUp"
      ],
      "type": "string"
    },
    "push": {
      "description": "fraction the lead word grows over its hold",
      "type": "number"
    },
    "scale": {
      "description": "start scale, 1 = 100%",
      "type": "number"
    },
    "separator": {
      "type": "string"
    },
    "stagger": {
      "description": "frames between units",
      "type": "number"
    },
    "start": {
      "description": "seconds; comp time; default the current time",
      "type": "number"
    },
    "to": {
      "type": "number"
    },
    "variant": {
      "enum": [
        "default",
        "subtitle"
      ],
      "type": "string"
    }
  },
  "type": "object"
}

Generated from the command list of @kition/[email protected] and the kit itself (motion_commands through @kition/[email protected], built from KitionAI/kition-motion@4719aa7). As data: commands.jsonl.