Motion kit command
script.run
Run Script
run JavaScript (the scripting object model: `app.project`, comps, layers, properties…) and report `{ok, result, output, error}`; script errors are reported in `error` (with line and column), not as a command failure.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
code | string | no | JavaScript: app, app.project, CompItem, Layer, Property… as in the usual scripting object model |
console | boolean | no | Script Console context |
name | string | no |
Call through motion_run
text
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "script.run" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: code, console, name. 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": {
"code": {
"description": "JavaScript: app, app.project, CompItem, Layer, Property… as in the usual scripting object model",
"type": "string"
},
"console": {
"description": "Script Console context",
"type": "boolean"
},
"name": {
"type": "string"
}
},
"returns": "{ok, result, output, error: {message, line, column} | null}",
"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.