Scene kit command
file.export
Export
Exports the scene (or `selectedOnly`) as glTF/GLB, OBJ, STL, FBX, USD (usda, usdc, usdz) or a PNG render and answers the file as base64. Does not change the scene.
- Kit
- Scene 0.1.0 (.kscene)
- Changes the document
- no
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | "glb" | "gltf" | "obj" | "stl" | "fbx" | "usda" | "usdc" | "usdz" | "png" | yes | The file format |
frame | number | no | png: the frame to render (the current frame when left out) |
samples | integer | no | png: samples per pixel side, 1 to 4 (2) |
selectedOnly | boolean | no | Only the selected objects |
Call through scene_run
text
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "file.export", "params": { "format": <"glb" | "gltf" | "obj" | "stl" | "fbx" | "usda" | "usdc" | "usdz" | "png"> } }]
}The required parameters, with placeholders for their types: not a tested example. Optional: frame, samples, selectedOnly. scene_run answers the step’s result in completed[i].result.
Result
| Name | Type | Required | Description |
|---|---|---|---|
base64 | string | no | |
extension | string | no | |
format | string | no | |
mime | string | no |
Result JSON Schema
json
{
"additionalProperties": true,
"properties": {
"base64": {
"type": "string"
},
"extension": {
"type": "string"
},
"format": {
"type": "string"
},
"mime": {
"type": "string"
}
},
"type": "object"
}Parameter schema
json
{
"additionalProperties": false,
"properties": {
"format": {
"description": "The file format",
"enum": [
"glb",
"gltf",
"obj",
"stl",
"fbx",
"usda",
"usdc",
"usdz",
"png"
],
"type": "string"
},
"frame": {
"description": "png: the frame to render (the current frame when left out)",
"type": "number"
},
"samples": {
"description": "png: samples per pixel side, 1 to 4 (2)",
"type": "integer"
},
"selectedOnly": {
"description": "Only the selected objects",
"type": "boolean"
}
},
"required": [
"format"
],
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (scene_commands through @kition/[email protected], built from KitionAI/kition-scene@4d06faf). As data: commands.jsonl.