Motion kit command

playback.settings.set

Change Preview Settings

Changes the Preview panel settings of a shortcut (`shortcut`, or `current`): range, frame rate, resolution, loop, whether video, audio and overlays play, pre- and post-roll, frames skipped; `reset: true` restores the defaults.

Kit
Motion 0.1.0 (.kmotion)
Changes the document
no

Parameters

Parameters of playback.settings.set
NameTypeRequiredDescription
cacheBeforePlaybackbooleanno
compinteger | stringnoread by the command beside its listed parameters
currentstringnoshortcut shown in the panel
customResolutionintegerno
frameRateanynofps|"auto"
fullScreenbooleanno
includeAudiobooleanno
includeLayerControlsbooleanno
includeOverlaysbooleanno
includeVideobooleanno
layerinteger | stringnoread by the command beside its listed parameters
loopbooleanno
moveTimeToPreviewTimebooleanno
playCachedFramesbooleanno
playFrom"rangeStart" | "currentTime"no
postRollnumbernoseconds
preRollnumbernoseconds
range"workArea" | "workAreaExtended" | "entireDuration" | "aroundCurrentTime"no
resetbooleanno
resolution"auto" | "full" | "half" | "third" | "quarter" | "custom"no
shortcutstringno
skipintegernoframes skipped between previewed frames, 0 to 99
trackerinteger | stringnoread by the command beside its listed parameters
valuesobjectno

Call through motion_run

text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "playback.settings.set" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: cacheBeforePlayback, comp, current, customResolution, frameRate, fullScreen, includeAudio, includeLayerControls, includeOverlays, includeVideo, layer, loop, moveTimeToPreviewTime, playCachedFrames, playFrom, postRoll, preRoll, range, reset, resolution, shortcut, skip, tracker, values. motion_run answers the step’s result in completed[i].result.

Result

Result of playback.settings.set
NameTypeRequiredDescription
cacheBeforePlaybackbooleanno
currentstringno
customResolutionintegerno
frameRateanyno
fullScreenbooleanno
includeAudiobooleanno
includeLayerControlsbooleanno
includeOverlaysbooleanno
includeVideobooleanno
loopbooleanno
moveTimeToPreviewTimebooleanno
planobjectno
playCachedFramesbooleanno
playFromstringno
postRollnumberno
preRollnumberno
rangestringno
resolutionstringno
shortcutstringno
skipintegerno
Result JSON Schema
json
{
  "additionalProperties": true,
  "properties": {
    "cacheBeforePlayback": {
      "type": "boolean"
    },
    "current": {
      "type": "string"
    },
    "customResolution": {
      "type": "integer"
    },
    "frameRate": {},
    "fullScreen": {
      "type": "boolean"
    },
    "includeAudio": {
      "type": "boolean"
    },
    "includeLayerControls": {
      "type": "boolean"
    },
    "includeOverlays": {
      "type": "boolean"
    },
    "includeVideo": {
      "type": "boolean"
    },
    "loop": {
      "type": "boolean"
    },
    "moveTimeToPreviewTime": {
      "type": "boolean"
    },
    "plan": {
      "additionalProperties": true,
      "properties": {
        "end": {
          "type": "integer"
        },
        "first": {
          "type": "integer"
        },
        "fps": {
          "type": "number"
        },
        "start": {
          "type": "integer"
        },
        "step": {
          "type": "integer"
        }
      },
      "type": "object"
    },
    "playCachedFrames": {
      "type": "boolean"
    },
    "playFrom": {
      "type": "string"
    },
    "postRoll": {
      "type": "number"
    },
    "preRoll": {
      "type": "number"
    },
    "range": {
      "type": "string"
    },
    "resolution": {
      "type": "string"
    },
    "shortcut": {
      "type": "string"
    },
    "skip": {
      "type": "integer"
    }
  },
  "type": "object"
}

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "cacheBeforePlayback": {
      "type": "boolean"
    },
    "comp": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "comp's item id as motion_inspect lists it",
          "type": "integer"
        },
        {
          "description": "the item id as receipts print it (\"1\"), or the comp's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "current": {
      "description": "shortcut shown in the panel",
      "type": "string"
    },
    "customResolution": {
      "type": "integer"
    },
    "frameRate": {
      "description": "fps|\"auto\""
    },
    "fullScreen": {
      "type": "boolean"
    },
    "includeAudio": {
      "type": "boolean"
    },
    "includeLayerControls": {
      "type": "boolean"
    },
    "includeOverlays": {
      "type": "boolean"
    },
    "includeVideo": {
      "type": "boolean"
    },
    "layer": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "layer id as motion_inspect lists it (when no layer has that id, its 1-based stack position)",
          "type": "integer"
        },
        {
          "description": "layer id as receipts print it (\"51\"), a layer name, or #n for the n-th from the top",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Layer"
      ]
    },
    "loop": {
      "type": "boolean"
    },
    "moveTimeToPreviewTime": {
      "type": "boolean"
    },
    "playCachedFrames": {
      "type": "boolean"
    },
    "playFrom": {
      "enum": [
        "rangeStart",
        "currentTime"
      ],
      "type": "string"
    },
    "postRoll": {
      "description": "seconds",
      "type": "number"
    },
    "preRoll": {
      "description": "seconds",
      "type": "number"
    },
    "range": {
      "enum": [
        "workArea",
        "workAreaExtended",
        "entireDuration",
        "aroundCurrentTime"
      ],
      "type": "string"
    },
    "reset": {
      "type": "boolean"
    },
    "resolution": {
      "enum": [
        "auto",
        "full",
        "half",
        "third",
        "quarter",
        "custom"
      ],
      "type": "string"
    },
    "shortcut": {
      "type": "string"
    },
    "skip": {
      "description": "frames skipped between previewed frames, 0 to 99",
      "type": "integer"
    },
    "tracker": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "string"
        }
      ]
    },
    "values": {
      "additionalProperties": true,
      "type": "object"
    }
  },
  "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.