Scene kit command

material.new

New Material

Creates a material with base color, metallic and roughness and answers its id. It is given to the selected objects (in Edit mode, to the object edited) unless `assign: false`; the answer lists them.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes

Parameters

Parameters of material.new
NameTypeRequiredDescription
assignbooleannoGive it to the selected objects: true unless false
baseColornumber[] | stringnoBase colour
metallicnumberno0 to 1
namestringnoThe material's name
roughnessnumberno0 to 1

Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: assign, baseColor, metallic, name, roughness. 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": {
    "assign": {
      "description": "Give it to the selected objects: true unless false",
      "type": "boolean"
    },
    "baseColor": {
      "description": "Base colour",
      "oneOf": [
        {
          "description": "[r, g, b] or [r, g, b, a], linear, 0 to 1",
          "items": {
            "type": "number"
          },
          "type": "array"
        },
        {
          "description": "#rrggbb (sRGB)",
          "type": "string"
        }
      ]
    },
    "metallic": {
      "description": "0 to 1",
      "type": "number"
    },
    "name": {
      "description": "The material's name",
      "type": "string"
    },
    "roughness": {
      "description": "0 to 1",
      "type": "number"
    }
  },
  "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.