Skip to main content
Glama

Object Matte by sight

ae_object_matte_ui

Creates an Object Matte on an After Effects layer through the macOS UI using lasso outlines or point clicks, then renders a preview to verify kept and excluded subjects.

Instructions

Object Matte (AE 26) on a layer through After Effects' UI — macOS only; no script can create a selection. Give lassos and points in the pixels of a frame you looked at (comp pixels of an ae_render_frame by default, or layer source pixels with space:"layer"). A LASSO takes the subjects inside the outline — AE snaps it to their silhouettes — so one lasso can take a whole group of people at once: outline them generously, heads and feet with a margin. A POINT takes the subject under it as AE segments it — often only a garment or a torso in a crowd, so use points only for a lone, clearly separated subject. mode:"subtract" removes (Option). The tool opens the layer in the Layer panel at time (the base frame), makes the Object Matte tool active (checked through the active-tool code — Option+W is the Roto Brush group's shortcut and cycles its members), acts with real mouse events, reads back the strokes the effect recorded (error_px = where each landed vs where it was meant to), optionally propagates by stepping the comp time (propagate_to), and then RENDERS A PREVIEW and returns it as images: top — the matte over black, bottom — the frame with the excluded parts in red, with markers: cyan boxes on gaps between kept pieces (where a hidden, lying or partly visible person is usually left out) and green/yellow rings on the people points you listed. A part of a person, someone behind another or lying on the ground is a subject too: add it with a lasso that overlaps the neighbouring kept matte so the pieces merge. The result is never verified by the tool: look at the images and check every person. With only preview_times (no points, lassos or propagate_to) it renders the preview without touching the UI — use it to check any frames. The Layer panel must be visible and large enough for the whole picture.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "comp": "<comp>",
      "layer": "<layer>",
      "time": "<time>"
    },
    "name": "ae_object_matte_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
compYesComposition name or item id.
modeNoadd (default): Shift-click / lasso adds to the matte; subtract: Option-click / Option-lasso removes.
timeYesComposition time (s) of the base frame the points were picked on.
zoomNoLayer panel zoom to set before acting (1 = 100 %). Default: the current zoom, lowered until the picture fits 45 % of the window width.
layerYes1-based layer index or layer name (the layer that gets the matte — the plate).
spaceNoCoordinate space of points and lassos: comp (default — pixels of an ae_render_frame of this comp) or layer (source pixels).
lassosNoClosed outlines (≥ 3 points each, ~12–40 points following the group's contour with a margin): each takes the subjects inside it, snapped to their silhouettes.
peopleNoYour checklist of the people who belong in the matte, picked on the frame `people_time` in COMP pixels: a point on each one's head, body and feet (any you can see). The preview marks each point green (inside the matte) or yellow (outside) and reports whole / partial / missing per person. Pass it on every call.
pointsNoClicks: each takes the subject under it as AE segments it (in a crowd often only a part — prefer lassos).
dry_runNoFind the picture and report the mapping without clicking.
previewNoRender the preview after the actions (default true).
settle_msNoPause per propagated frame (default 250 ms; raise on 4K).
shot_pathNoAbsolute path to save the capture with the picture rectangle (PNG, ≤ 1600 px wide) for the user.
tool_codeNoProject.toolType code of the Object Matte tool (default "161", AE 26.5). The tool reads the active tool and presses Option+W only until this code is active — Option+W is the Roto Brush group's shortcut and cycles its members.
gap_radiusNoComp pixels: gaps narrower than ~2× this between kept pieces are reported (default 100; raise to 150–200 to catch wider holes).
people_timeNoFrame (s) the people points were picked on (default `time`); people are checked only on that preview frame.
preview_dirNoAbsolute folder for the preview PNGs (default: the system temp folder, files overwritten each call). Use the chat's working folder.
propagate_toNoAfter the actions, step the comp time from `time` to this time frame by frame so AE propagates the matte (both directions allowed).
preview_timesNoTimes (s) to preview. Default: the base frame, plus propagate_to when given. Alone (no points/lassos/propagate_to) = preview only, no UI.
preview_widthNoWidth of each preview panel in pixels (default 1000).
preview_regionNoComp-pixel rectangle to preview at higher detail (e.g. a group of people) instead of the whole frame.
preview_overlayNoAdd the bottom panel with excluded parts in red (default true; renders the frame once more with the effect switched off, then restores it).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.0

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only carry destructiveHint=false, so the description does the heavy lifting and does it well: it discloses that it opens the Layer panel, activates the tool by pressing Option+W in a cycle, emits real mouse events, and steps comp time to propagate. It also states the critical limits — the result is never verified by the tool, the Layer panel must be visible and large enough for the whole picture, and error_px reports where each stroke actually landed versus intended. It stops short of stating failure modes (what happens if the panel is too small, or the runtime cost of propagation), which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core claim and platform limit are front-loaded, but the body is a dense run of long sentences with em-dash parentheticals carrying two or three ideas each, which slows parsing. The Option+W / tool-code cycling rationale is stated in the prose and repeated almost verbatim in the tool_code schema description, so some text does not earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 22-parameter tool with nested objects and no output schema, the description covers what matters: it substitutes for the missing output schema by describing the returned images (matte over black on top, excluded parts in red below, cyan gap boxes, green/yellow rings on people points) and the per-person whole/partial/missing reporting. Prerequisites (macOS, visible Layer panel) and the unverified-result caveat are both present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3, but the prose genuinely adds construction guidance the schema does not: lassos should be ~generous outlines including heads and feet with margin, points should sit on head/body/feet of the people checklist, and mode:"subtract" maps to the Option modifier. That is operational meaning beyond type and range, though it does not explain every parameter (zoom, settle_ms, tool_code are only covered by their schema text).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The first sentence names the specific operation (Object Matte / Roto Brush-style segmentation on a layer), the mechanism (driven through After Effects' own UI because no script can create the selection), and the platform limit (macOS only). No sibling tool does anything comparable, so the agent can discriminate it immediately from ae_render_frame, ae_layer_info, or ae_do.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives explicit when-to-use rules for the two input forms: lassos for groups because AE snaps the outline to silhouettes, points only for a lone, clearly separated subject because AE often segments just a garment in a crowd. It also names the preview-only invocation path (preview_times alone, no UI touched) and the recovery move for a partly visible or occluded person (add an overlapping lasso so the pieces merge).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.