Motion kit command

layer.handheld

Handheld

Adds a slow handheld float (two sines per axis) to a layer's or camera's position and rotation between `start` and `end`, `amount` px, easing in and out over `ramp` seconds and exactly zero inside every `holds` range; written as an expression on top of the existing keys or expression. One undo step.

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.handheld
NameTypeRequiredDescription
amountnumbernopixels; default 6
camerainteger | string | booleannoa camera layer, or true for the comp's top camera
compinteger | stringno
endnumbernoseconds; default the comp's end
holdsnumber[][]no[[from, to]] comp seconds where the float is exactly zero
layerinteger | stringnothe layer (or camera layer) that floats
qualitystringnoread by the command beside its listed parameters
rampnumbernoseconds; ease in and out of the float and of each hold, default 0.4
rotationnumbernodegrees; default 0.4
seedintegernodefault 1
startnumbernoseconds; comp time, default 0

Call through motion_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: amount, camera, comp, end, holds, layer, quality, ramp, rotation, seed, start. 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": {
    "amount": {
      "description": "pixels; default 6",
      "type": "number"
    },
    "camera": {
      "description": "a camera layer, or true for the comp's top camera",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        },
        {
          "type": "boolean"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "comp": {
      "oneOf": [
        {
          "description": "item id",
          "type": "integer"
        },
        {
          "description": "comp name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "end": {
      "description": "seconds; default the comp's end",
      "type": "number"
    },
    "holds": {
      "description": "[[from, to]] comp seconds where the float is exactly zero",
      "items": {
        "items": {
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "layer": {
      "description": "the layer (or camera layer) that floats",
      "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"
      ]
    },
    "quality": {
      "description": "read by the command beside its listed parameters",
      "type": "string"
    },
    "ramp": {
      "description": "seconds; ease in and out of the float and of each hold, default 0.4",
      "type": "number"
    },
    "rotation": {
      "description": "degrees; default 0.4",
      "type": "number"
    },
    "seed": {
      "description": "default 1",
      "type": "integer"
    },
    "start": {
      "description": "seconds; comp time, default 0",
      "type": "number"
    }
  },
  "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.