Set layer transition
set_layer_transitionSet how a layer ENTERS at the start of its on-timeline window and LEAVES at the end, instead of popping. The transition is EDGE-RELATIVE — only a length and a look are stored — so it rides the edge through every later trim, slide or clip retime. Prefer this over fade_layer / apply_preset whenever the intent is 'enters and leaves nicely': those write opacity keyframes at ABSOLUTE frames, which strand themselves the moment the edge moves, and clutter the timeline lanes. A layer created WITH a block is born carrying a short fade at each edge — whether you passed the block or the editor minted one — so check inspect_layers before adding one, rather than assuming there is none. Layers created before this default existed, and any edge cleared to "cut", carry nothing and do need setting. A layer with NO block is always-present, has no edges, and a transition on it is inert. Video clips default to a hard cut, because a hard cut between shots is the grammar of short-form video. kind "cut" clears the edge back to a hard cut. The length is a request: when the window is too short to hold both ramps they are squeezed proportionally at render time, and the stored values are left intact.
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": {
"elementId": "<elementId>",
"edge": "<edge>",
"kind": "<kind>",
"projectId": "<projectId>"
},
"name": "set_layer_transition"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| edge | Yes | Which edge to set. "in" is the start of the layer's window, "out" the end. | |
| kind | Yes | The look. "cut" = hard edge (clears any transition). "fade" = opacity ramp. "slide" = travels in/out from a direction while fading. "pop" = scales up from 80% with an overshoot. | |
| curve | No | Optional easing override (linear, easeIn, easeOut, easeInOut, outQuart, outExpo, outBack, inBack, inOutBack). Defaults suit the kind: entries decelerate in, exits accelerate away. | |
| frames | No | Ramp length in frames (30 fps). Default 6. Ignored for kind "cut". | |
| direction | No | For kind "slide" only. On the IN edge this is where the layer comes FROM; on the OUT edge, where it goes TO. Default "left". | |
| elementId | Yes | Element id of the layer (image.<id>, video.<id>, text.<id>, shapes.<id>, or group.<id>). | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The payload, shaped by the tool. | |
| note | No | What to do next when not ready. | |
| error | No | Why it failed. | |
| status | No | For cache-backed readers: whether the answer was ready. | |
| editorUrl | No | Opens this project in the editor. |