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’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
align | "left" | "center" | "right" | no | Horizontal alignment of each line |
bevelDepth | number | no | The round edge's radius, metres |
bevelResolution | integer | no | Segments in the round edge (4) |
body | string | no | The text; a newline starts a new line |
characterSpacing | number | no | Letter spacing as a multiple of each advance (1) |
extrude | number | no | Half the thickness the letters are extruded to, metres |
font | string | no | The font's name (only the bundled Inter is available) |
lineSpacing | number | no | Line distance as a multiple of the size (1) |
object | integer | string | no | The curve or text; the active or edited one when left out |
offsetX | number | no | Moves the text sideways, metres |
offsetY | number | no | Moves the text up, metres |
pick | number[] | no | 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) |
resolution | integer | no | Points per curved segment of each letter (12) |
shear | number | no | Slants the letters: x moves by shear × y |
size | number | no | The text's size (1: the font's full height is one metre) |
wordSpacing | number | no | Space 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.