Motion kit command
layer.precompose
Pre-compose
Moves `layers` (default selected) into a new composition `name` and replaces them with one layer of it (`mode: move`), or keeps a single layer's attributes outside (`mode: leave`); `adjustDuration` fits it to the layers, `open` opens it.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
- Acts on
layers(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
adjustDuration | boolean | no | |
layers | (integer | string)[] | no | |
mode | "move" | "leave" | no | |
name | string | no | |
open | boolean | no |
Call through motion_run
text
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "layer.precompose" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: adjustDuration, layers, mode, name, open. 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": {
"adjustDuration": {
"type": "boolean"
},
"layers": {
"items": {
"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"
}
]
},
"type": "array",
"x-khp-index": "#",
"x-khp-index-numbers": true,
"x-khp-name": "name",
"x-khp-types": [
"Layer"
]
},
"mode": {
"enum": [
"move",
"leave"
],
"type": "string"
},
"name": {
"type": "string"
},
"open": {
"type": "boolean"
}
},
"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.