Scene Rollback
scene_rollbackRestore a Maya scene by opening a saved checkpoint and pointing it back to its original file path; saves current state first unless discarding is enabled.
Instructions
Open a checkpoint file and point the scene at its original path (S2).
Boundary: Disambiguated from scene_checkpoint (save a checkpoint from the current scene) and scene_checkpoint_list (list the ones already written) — scene_rollback is the read-back half.
Before opening, the current scene is saved to a file first (auto_before_rollback); if that fails, the read-back aborts — pass discard_current_state=True to escape (the result reports safety_snapshot="skipped_by_user"). The scene points back only when it has a file path at read-back time; otherwise it stays on the checkpoint path (S1) and scene_rebound_to is null.
The checkpoint file carries no undo history — call scene_snapshot afterwards to rebuild context.
The result also says scene_modified_before: whether the scene still had changes that were never saved at the moment this call read the flag — a read of its own, just before the rollback request and before any file is opened. It is the same Maya flag scene_snapshot reports; after the open, that flag describes the checkpoint, not the scene being replaced. The value never changes what this tool does: a changed scene and a clean scene take the same path, and the copy written before the switch behaves exactly as before (safety_snapshot reports "skipped_by_user" only when discard_current_state lets a failed save through). The one new failure is Maya refusing to answer that question: the call then errors, with nothing opened yet, instead of printing a made-up "clean".
That read is its own round trip, so it is worth saying what it covers when calls overlap: two scene_rollback calls for one session can each run their own read and their own switch. The value then describes the scene as it was at that read, which may be a scene the other call has already replaced. Nothing is gated by that difference, and scene_name_before still names the scene the rollback itself read (empty when the scene was never saved).
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": {
"filename": "<filename>"
},
"name": "scene_rollback"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Checkpoint filename from scene_checkpoint_list (cp_*.ma or prev_*.ma). | |
| session_key | No | Maya session key. | |
| discard_current_state | No | Escape hatch — proceed even if saving the current scene fails. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |