Skip to content
Changelog

object.update

Changes an object: its name, place, size, rotation, opacity, visibility, lock, or its source's settings.

JSON-RPC 2.0project.write

Position and size are in canvas pixels, in the primary canvas unless canvas is given. Visibility changes on every canvas the object is laid out on, unless canvas is given. settings are merged into its source's settings key by key.

Everything given is one undo step.

Parameters

  • objectstringrequiredThe object's id or name.
  • scenestringIts scene's id or name. Default: the scene being edited.
  • canvasstringA canvas's id or name.
  • namestringA new name.
  • visiblebooleanShow or hide it.
  • lockedbooleanLock or unlock it.
  • xnumberLeft edge.
  • ynumberTop edge.
  • widthnumberWidth, at least 1.
  • heightnumberHeight, at least 1.
  • rotationnumberRotation in degrees.
  • opacitynumber0 to 1.
  • settingsobjectSettings merged into its source's.

Result

  • (the object)objectThe object as state.get lists it.

Errors

Not found (-32004) for an unknown scene, object or canvas. Invalid params (-32602) for settings on a group, which has no source.

Events

Subscribers to events get workspace.changed, object.visible.

From an AI agent

The MCP server's update_object reaches this method.

Example

ws://localhost:4455/rpc
{
"jsonrpc": "2.0",
"id": 1,
"method": "object.update",
"params": {
"object": "Title",
"x": 100,
"y": 80,
"opacity": 0.8
}
}

Result

{ "id": "019ad3f4-1a2b-7c3d-8e4f-5a6b7c8d9e0f", "name": "Title", "kind": "text_ft2_source_v2", "source": "019ad3f4-2b3c-7d4e-9f50-6b7c8d9e0f1a", "parent": null, "visible": true, "locked": false, "x": 100, "y": 80, "width": 384, "height": 179.2, "rotation": 0, "opacity": 0.8 }

object.add · object.move · source.update