Type

Mask

One of a clip's masks. A clip keeps a list of them in masks, top first. Each one keeps part of the picture, takes part away, or, with the mode none, cuts nothing and waits for a layer or an effect to use it.

Fields

  • expandnumberoptional · default 0

    How far the edge is moved out, in the picture's shorter side; in when negative.

  • feathernumberoptional · default 0

    How soft the edge is, 0..=1: one fades across half the picture's shorter side.

  • idstringoptional · default ""

    Unique among the clip's masks; what a layer or an effect that uses it names it by. Left out, one is minted.

  • invertbooloptional

    Keeps the outside of the shape instead of the inside.

  • keysmap of ParamKey[]optional

    The numbers that ride rather than hold, by Mask name, each at a fraction of the clip like a ClipKey's. A number with keys is played from them, and the field above is only what it falls back to with the keys taken off.

  • modeMaskModeoptional · default "add"

    How it joins the masks above it.

  • namestringoptional

    What the panel calls it; empty for the panel's own numbering.

  • opacitynumberoptional · default 1

    How much it counts, 0..=1.

  • rotationnumberoptional · default 0

    Clockwise degrees about the mask's centre.

  • scalenumberoptional · default 1

    A factor on its size, both ways.

  • sourceMaskSourceoptional · default {"height":0.66,"kind":"shape","roundness":0,"shape":"circle","width":0.66}

    What it is drawn from. Left out, a circle.

  • xnumberoptional · default 0

    The centre's offset from the picture's centre, as a fraction of the picture's width; positive is right.

  • ynumberoptional · default 0

    The same down the picture's height; positive is down.

updateClip sets the whole list: a list replaces it, an empty list takes every mask off. setMaskKey keys one number of one mask, named by its id: x, y, rotation, scale, feather, expand, opacity, width, height or roundness. The keys belong to the mask, so a mask moved to another clip takes its animation with it. A new mask starts in the middle, two thirds of the shorter side across.

{
  "id": "m1",
  "mode": "subtract",
  "source": {
    "kind": "shape",
    "shape": "circle",
    "width": 0.66,
    "height": 0.66,
    "roundness": 0
  },
  "x": 0.2,
  "feather": 0.1
}