Motion kit command

light.spotlight

Spotlight

Darkens the comp (or `layers` and what is under them) except a soft hole that follows `target`: a black solid at `dim` (0.92) opacity whose Circle effects cut a core hole (softness 22 px) and a 15% spill (60 px); the radius goes from 400 to 300 px over `frames` (24) from `start` and then breathes +6% (`pulse`, `period`). One undo step; answers the new layer.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
yes
Acts on
layers (a list of ids), which a run step’s on fills

Parameters

Parameters of light.spotlight
NameTypeRequiredDescription
colorstringnoa colour such as #rrggbb
compinteger | stringno
dimnumberno0..1 darkness outside the light, default 0.92
easestring | number[]noa curve name (snappy, out, smooth, swift, settle, pop, reseat, fly, linear) or [x1, y1, x2, y2]
framesnumbernoframes from the first radius to the second, default 24
layers(integer | string)[]nolayer ids, names or #n
namestringno
periodnumbernoseconds; breath length, default 2
pulsenumbernofraction the light breathes once settled, default 0.06
radiusnumber | number[]nopx: a number, or [from, to]
softnessnumbernopixels; edge blur sigma, default 22
spillnumberno0..1 light that leaks past the edge, default 0.15
spillSoftnessnumbernopixels; default 60
startnumbernoseconds; comp time; default the current time
targetinteger | stringnothe layer the light follows

Call through motion_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: color, comp, dim, ease, frames, layers, name, period, pulse, radius, softness, spill, spillSoftness, start, target. 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": {
    "color": {
      "description": "a colour such as #rrggbb",
      "type": "string"
    },
    "comp": {
      "oneOf": [
        {
          "description": "item id",
          "type": "integer"
        },
        {
          "description": "comp name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "dim": {
      "description": "0..1 darkness outside the light, default 0.92",
      "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 from the first radius to the second, default 24",
      "type": "number"
    },
    "layers": {
      "description": "layer ids, names or #n",
      "items": {
        "oneOf": [
          {
            "type": "integer"
          },
          {
            "type": "string"
          }
        ]
      },
      "type": "array",
      "x-khp-index": "#",
      "x-khp-index-numbers": true,
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "name": {
      "type": "string"
    },
    "period": {
      "description": "seconds; breath length, default 2",
      "type": "number"
    },
    "pulse": {
      "description": "fraction the light breathes once settled, default 0.06",
      "type": "number"
    },
    "radius": {
      "description": "px: a number, or [from, to]",
      "oneOf": [
        {
          "type": "number"
        },
        {
          "items": {
            "type": "number"
          },
          "type": "array"
        }
      ]
    },
    "softness": {
      "description": "pixels; edge blur sigma, default 22",
      "type": "number"
    },
    "spill": {
      "description": "0..1 light that leaks past the edge, default 0.15",
      "type": "number"
    },
    "spillSoftness": {
      "description": "pixels; default 60",
      "type": "number"
    },
    "start": {
      "description": "seconds; comp time; default the current time",
      "type": "number"
    },
    "target": {
      "description": "the layer the light follows",
      "oneOf": [
        {
          "description": "layer id or 1-based index",
          "type": "integer"
        },
        {
          "description": "layer name or #n",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    }
  },
  "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.