Scene kit command

file.import

Import

Imports a glTF/GLB, OBJ, STL, FBX, USD or .blend file from the workspace (`path`) or base64 into the scene.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes

Parameters

Parameters of file.import
NameTypeRequiredDescription
base64stringnoThe file's bytes, instead of a path
format"glb" | "gltf" | "obj" | "stl" | "fbx" | "usd" | "usda" | "usdc" | "usdz" | "blend"noThe format of base64 bytes
pathstringnoA .glb, .gltf, .obj, .stl, .fbx, .usd, .usda, .usdc, .usdz, or .blend file, relative to this scene's folder

Call through scene_run

text
scene_run {
  "path": "<file>.kscene",
  "steps": [{ "command": "file.import" }]
}

The required parameters, with placeholders for their types: not a tested example. Optional: base64, format, path. scene_run answers the step’s result in completed[i].result.

Result

The kit gives no result schema for this command.

Parameter schema

json
{
  "additionalProperties": false,
  "properties": {
    "base64": {
      "description": "The file's bytes, instead of a path",
      "type": "string"
    },
    "format": {
      "description": "The format of base64 bytes",
      "enum": [
        "glb",
        "gltf",
        "obj",
        "stl",
        "fbx",
        "usd",
        "usda",
        "usdc",
        "usdz",
        "blend"
      ],
      "type": "string"
    },
    "path": {
      "description": "A .glb, .gltf, .obj, .stl, .fbx, .usd, .usda, .usdc, .usdz, or .blend file, relative to this scene's folder",
      "type": "string",
      "x-khp-file": {
        "accept": [
          "glb",
          "gltf",
          "obj",
          "stl",
          "fbx",
          "usd",
          "usda",
          "usdc",
          "usdz",
          "blend"
        ],
        "access": "read"
      }
    }
  },
  "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.