editor.compose.set
Sets a picture clip's blend mode, or its chroma or luma key and the key's settings.
A chroma key takes color, similarity, smoothness and spill; a luma key low, high and softness; each 0 to 1. A setting of the other kind of key is refused.
Parameters
- clipstringrequiredThe clip's id, from editor.timeline.get.
- blendstringA blend mode's name.
- keystring
none,chromaorluma. - colorstringA chroma key's colour, "#RRGGBB".
- similaritynumber0 to 1.
- smoothnessnumber0 to 1.
- spillnumber0 to 1.
- lownumber0 to 1.
- highnumber0 to 1.
- softnessnumber0 to 1.
- canvasstringA canvas's id or name, shown first. Default: the canvas shown.
Result
- blendstringIts blend mode.
- keyobject | nullIts key and settings.
Errors
Invalid params (-32602) with nothing to set, for an unknown blend or key, a value out of range, or a sound clip. A state error (-32005) for a key setting when the clip has no key. A state error (-32005) when no Editor project is open, or the open one is read-only because a newer Lightair made it. Invalid params (-32602) for a clip id that can't be read; not found (-32004) for a clip that isn't on the canvas.
Events
Subscribers to events get editor.changed.
From an AI agent
The MCP server's editor_compose (action: set) reaches this method.
Example
{ "jsonrpc": "2.0", "id": 1, "method": "editor.compose.set", "params": { "clip": "019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d", "key": "chroma", "similarity": 0.4 }}lightair call editor.compose.set '{"clip":"019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d","key":"chroma","similarity":0.4}'const result = lightair.call("editor.compose.set", {"clip":"019ad3f6-5e6f-7071-8283-9e0f1a2b3c4d","key":"chroma","similarity":0.4});Result
{ "blend": "Normal", "key": { "key": "chroma", "color": "#00FF00", "similarity": 0.4, "smoothness": 0.032, "spill": 0.04 } }