Film kit command
graphics.newRectangle
Rectangle
Adds a rectangle shape layer `size` [w,h] (default 400×200) at `position` to graphic `clip`, or a new graphic clip at the playhead.
- Kit
- Film 0.1.0 (.kfilm)
- Changes the document
- yes
- Acts on
clip(one id), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
clip | integer | no | |
frame | integer | no | |
position | number[] | no | |
seconds | number | no | |
size | number[] | no | default [400,200] |
time | integer | no | ticks (254016000000 per second) |
timecode | string | no | |
track | integer | no | a position counted from 0 (the first is 0) |
Call through film_run
text
film_run {
"path": "<file>.kfilm",
"steps": [{ "command": "graphics.newRectangle" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: clip, frame, position, seconds, size, time, timecode, track. film_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": {
"clip": {
"type": "integer",
"x-khp-types": [
"Clip"
]
},
"frame": {
"type": "integer"
},
"position": {
"items": {
"type": "number"
},
"type": "array"
},
"seconds": {
"default": 5,
"type": "number"
},
"size": {
"description": "default [400,200]",
"items": {
"type": "number"
},
"type": "array"
},
"time": {
"description": "ticks (254016000000 per second)",
"type": "integer"
},
"timecode": {
"type": "string"
},
"track": {
"description": "a position counted from 0 (the first is 0)",
"type": "integer"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (film_commands through @kition/[email protected], built from KitionAI/kition-film@375db59). As data: commands.jsonl.