Apply scene operations
scene_applyApply a batch of validated scene operations to a base revision. Mutating batches commit atomically into one new immutable revision (or nothing); query/select-only batches still execute in Blender and return operationResults, but create no revision and do not move the project head. Returns a durable job handle. Call docs_operations FIRST to see the vocabulary: there are 300 operations covering mesh editing, booleans, lathe/loft/sweep, curves, UV unwrap, modifiers, materials, lights, cameras, render settings, geometry nodes, and batch/query helpers — most modelling needs no scene_script at all. Prefer this over scene_script: operations are validated before dispatch and cost less.
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": {
"projectId": "<projectId>",
"idempotencyKey": "<idempotencyKey>",
"operations": "<operations>"
},
"name": "scene_apply"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dryRun | No | Validate against the ACTUAL scene and report what each operation would touch, without committing, queueing a job, or consuming compute. Free and synchronous. Resolves every id and $ref against the target revision, so stale ids, purged materials and unknown targets surface here instead of failing a whole batch, and checks material.create_node_graph sockets against the pinned Blender build; configured layouts and geometry-node graphs retain explicit advisory limits. Use it to probe an uncertain operation before spending a container on it. What it does NOT do: run any geometry, so it cannot tell you a boolean will miss, a profile will not close, or a bevel will overlap — for those, put the READ ONLY mesh.* checks in the real batch and read operationResults. | |
| message | No | Short description saved with the new revision. | |
| projectId | Yes | Stable project ID returned by project_create or projects_list. | |
| operations | Yes | Ordered batch of validated scene operations; use docs_operations for exact schemas. | |
| baseRevisionId | No | "HEAD" (default) targets the project's current head. Mutations MUST build on the head: passing an older revision is rejected with REVISION_CONFLICT, since history is linear. To continue from an older scene, revision_restore it forward first. | HEAD |
| idempotencyKey | Yes | Stable caller-chosen key for safe retries of this same request. | |
| generatePreview | No | Render a thumbnail for a new revision (default maximum side 384px; previewMaxSidePx can request up to 1024px). Defaults to on for mutating batches. A batch whose operations only READ or SELECT (mesh.get_*, *.analyze_*, mesh.select_*) creates no revision, so this is forced off even when explicitly true. | |
| previewMaxSidePx | No | Opt-in thumbnail maximum side in pixels; default 384, maximum 1024, preserving the active camera aspect ratio. Larger previews spend more compute at the same 16 samples. Has no effect when generatePreview is false or the batch is read-only. scene_snapshot later reads that stored image and cannot resize or regenerate it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| job | No | ||
| dryRun | No | ||
| problems | No | ||
| readOnly | No | ||
| warnings | No | ||
| declaredRefs | No | ||
| readOnlyNote | No | ||
| operationCount | No | ||
| dimensionChecks | No | ||
| generatePreview | No | ||
| geometrySimulation | No |