Scene kit command

text.set

Text Settings

Changes text `object`: body, font size, alignment, extrude, bevel, spacing.

Kit
Scene 0.1.0 (.kscene)
Changes the document
yes
Acts on
object (one id), which a run step’s on fills

Parameters

Parameters of text.set
NameTypeRequiredDescription
align"left" | "center" | "right"noHorizontal alignment of each line
bevelDepthnumbernoThe round edge's radius, metres
bevelResolutionintegernoSegments in the round edge (4)
bodystringnoThe text; a newline starts a new line
characterSpacingnumbernoLetter spacing as a multiple of each advance (1)
extrudenumbernoHalf the thickness the letters are extruded to, metres
fontstringnoThe font's name (only the bundled Inter is available)
lineSpacingnumbernoLine distance as a multiple of the size (1)
objectinteger | stringnoThe curve or text; the active or edited one when left out
offsetXnumbernoMoves the text sideways, metres
offsetYnumbernoMoves the text up, metres
picknumber[]noInstead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)
resolutionintegernoPoints per curved segment of each letter (12)
shearnumbernoSlants the letters: x moves by shear × y
sizenumbernoThe text's size (1: the font's full height is one metre)
wordSpacingnumbernoSpace width as a multiple (1)

Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: align, bevelDepth, bevelResolution, body, characterSpacing, extrude, font, lineSpacing, object, offsetX, offsetY, pick, resolution, shear, size, wordSpacing. 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": {
    "align": {
      "description": "Horizontal alignment of each line",
      "enum": [
        "left",
        "center",
        "right"
      ],
      "type": "string"
    },
    "bevelDepth": {
      "description": "The round edge's radius, metres",
      "type": "number"
    },
    "bevelResolution": {
      "description": "Segments in the round edge (4)",
      "type": "integer"
    },
    "body": {
      "description": "The text; a newline starts a new line",
      "type": "string"
    },
    "characterSpacing": {
      "description": "Letter spacing as a multiple of each advance (1)",
      "type": "number"
    },
    "extrude": {
      "description": "Half the thickness the letters are extruded to, metres",
      "type": "number"
    },
    "font": {
      "description": "The font's name (only the bundled Inter is available)",
      "type": "string"
    },
    "lineSpacing": {
      "description": "Line distance as a multiple of the size (1)",
      "type": "number"
    },
    "object": {
      "description": "The curve or text; the active or edited one when left out",
      "oneOf": [
        {
          "description": "the object's id",
          "type": "integer"
        },
        {
          "description": "the object's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "offsetX": {
      "description": "Moves the text sideways, metres",
      "type": "number"
    },
    "offsetY": {
      "description": "Moves the text up, metres",
      "type": "number"
    },
    "pick": {
      "description": "Instead of `object`/`objects`: a world point [x, y, z] in metres; the command acts on the object there now (the smallest whose mesh's bounds hold the point, else the nearest light, camera, empty, curve, text, lattice or armature whose origin is within 0.25 m). A place: with `basis`, a write by it is refused when what is at the point is no longer what was there (moved away, another moved in, its parent moved)",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "resolution": {
      "description": "Points per curved segment of each letter (12)",
      "type": "integer"
    },
    "shear": {
      "description": "Slants the letters: x moves by shear × y",
      "type": "number"
    },
    "size": {
      "description": "The text's size (1: the font's full height is one metre)",
      "type": "number"
    },
    "wordSpacing": {
      "description": "Space width as a multiple (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.