Command · Update Mask
mask.update
Changes a mask: only the fields given (name, shape, mode, inverted, enabled, params, path / pathKeys).
- v1
- Capability EditSequence
- Tool
mask_update
Request
{
"command": "mask.update",
"params": {
"clip": 42,
"inverted": true,
"mask": 1,
"params": {
"expansion": 0.02
}
}
}Parameters
clipinteger | object (1..)Required- The clip. A clip id, or {"track", "time"} for the clip there.
effectinteger (1..)- The effect instance id (clip.details lists them). mask.add: omit for the clip's opacity mask (cut-outs); the others: default the effect holding the mask.
enabledboolean- On or off.
invertedboolean- Cover the outside instead.
maskinteger (1..)Required- The mask id.
mode`add` | `subtract` | `intersect`- How it combines with the masks before it. Default add.
namestring- Display name, e.g. "Face".
paramsobject- Parameter -> number or {"keys": [{"time", "value", "interpolation"}]} (key times are sequence times on the clip): center.x/.y, size.x/.y (0..1 of the frame), rotation, roundness, feather and expansion (frame heights), opacity, transform.x/.y/.scaleX/.scaleY/.rotation/.skew/.anchorX/.anchorY.
patharray- Path shape: its vertices, [x, y] or {x, y, inX, inY, outX, outY} (tangents as offsets), 0..1 of the frame.
pathKeysarray- Animated path: [{"time", "vertices"}], every key with the same vertex count.
sequenceinteger (1..)- Sequence id; only needed when the project has several.
shape`ellipse` | `rectangle` | `path`- Default ellipse.
Discussion
Changes a mask: only the fields given (name, shape, mode, inverted, enabled, params, path / pathKeys). A number replaces an animated parameter; {"keys": [...]} replaces its keys.
Run it with wabcut-cli cmd <project> --json, from an MCP client as mask_update, or from an extension. See Edit commands for requests, references and results.
See also
mask.*
- mask.add
Add Mask. Adds a mask to a clip: to an effect ("effect"; the effect then only changes the masked area - a local correction, including the colour grade) or, without "effect", to the clip's opacity mask (it cuts the clip out).
- mask.list
List Masks. A clip's masks by effect, with their parameters (keys at media times) and paths.
- mask.objectSelect
Select Object. AI Object Mask: segments the person or object you click on (positive and negative clicks), draw a box around, or name ("subject": a face, a person, a car...) on a frame of a clip with SAM 2.1 (local, on this computer), and tracks it through the shot.
- mask.propagate
Track Object Mask. Tracks an object mask's object through the clip (or In / Out) from its last clicked frame: after a selection made with "propagate": "none", or across a shot cut with acrossShots.
- mask.refine
Refine Object Mask. More clicks (positive: part of the object; negative: not) or a new box on a frame of an object mask: segments it again there and re-tracks from that frame.
- mask.remove
Remove Mask. Removes a mask from its effect.