Film kit command
mask.add
Create Mask
Adds a mask to `clip`'s `effect` (default Opacity): `shape` ellipse, polygon or bezier `path`, with `center`, `size` and `path` points in frame (sequence) pixels, mapped onto the clip through its Motion at the playhead so the mask stays on that part of the picture. Answers its index.
- 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 |
|---|---|---|---|
center | number[] | no | |
clip | integer | no | |
effect | string | no | index|id?="opacity"; default "opacity" |
path | string | no | [[x,y]…]|{vertices}? |
shape | "ellipse" | "polygon" | "bezier" | no | |
size | number[] | no |
Call through film_run
text
film_run {
"path": "<file>.kfilm",
"steps": [{ "command": "mask.add" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: center, clip, effect, path, shape, size. 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": {
"center": {
"items": {
"type": "number"
},
"type": "array"
},
"clip": {
"type": "integer",
"x-khp-types": [
"Clip"
]
},
"effect": {
"description": "index|id?=\"opacity\"; default \"opacity\"",
"type": "string"
},
"path": {
"description": "[[x,y]…]|{vertices}?",
"type": "string"
},
"shape": {
"enum": [
"ellipse",
"polygon",
"bezier"
],
"type": "string"
},
"size": {
"items": {
"type": "number"
},
"type": "array"
}
},
"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.