Motion kit command
layer.addItem
Add Footage to Comp
Places a project item (`item` id or name: footage, comp or solid) in the active comp as a new layer: starting at `time` (seconds), at stack `index` (1-based, default above the selected layer), at `position` [x, y]; `duration` for stills.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
comp | integer | string | no | read by the command beside its listed parameters |
duration | number | no | s, for a still |
index | integer | no | a position counted from 0 (the first is 0); 1-based stack position; default above the selected layer |
item | integer | no | id|name |
position | number | no | [x, y] comp px; default the centre |
time | number | no | s, the In point |
Call through motion_run
text
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "layer.addItem" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: comp, duration, index, item, position, time. 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": {
"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"
]
},
"duration": {
"description": "s, for a still",
"type": "number"
},
"index": {
"description": "a position counted from 0 (the first is 0); 1-based stack position; default above the selected layer",
"type": "integer"
},
"item": {
"description": "id|name",
"type": "integer",
"x-khp-name": "name",
"x-khp-types": [
"Item"
]
},
"position": {
"description": "[x, y] comp px; default the centre",
"type": "number"
},
"time": {
"description": "s, the In point",
"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.