---
title: "mask.add: Create Mask — Film kit command — Kition"
description: "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."
canonical: "https://developer.kition.ai/docs/kits/film/commands/mask.add"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/film/commands/mask.add](https://developer.kition.ai/docs/kits/film/commands/mask.add)

# 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); reference: [Film kit commands](https://developer.kition.ai/docs/kits/film.md)
- Changes the document: yes
- Acts on: `clip` (one id), which a run step’s `on` fills

## 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/film-darwin-arm64@0.1.0 and the kit itself (film_commands through @kition/cli@0.1.1, built from KitionAI/kition-film@375db59).
