save_scene
Writes the open stage's root layer to a USD file: overwrites the stage's own file when no path is given, or saves a copy to the specified path.
Instructions
Write the open stage's root layer to a USD file: back to the stage's own file when file_path is empty, or as a copy at file_path.
Without file_path it overwrites the file the stage was opened from, and fails for a stage never saved, such as new_scene's. With file_path it overwrites any file there, and the stage stays tied to its own file, or to none; but another file the open stage has loaded (a sublayer, a referenced or payload file) is an error, since writing it would replace a file the open scene is made of: name another path. The stage's own file, by any name, is a save. Only the root layer is written: sublayers and referenced files stay as they are, still referenced, and Kit's session layer stays out, so the answer names the variant selections it holds, which set_variant_selection writes there by default. For one self-contained file, use flatten_usd; for one prim's subtree, export_prim_as_file.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "save_scene"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | No | The USD file to write, on Kit's machine, but never another file the open stage has loaded; empty overwrites the stage's own file |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |