Scene kit command

bone.set

Bone Settings

Changes bone `bone`: name, head, tail, roll, parent, connection, deform.

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 bone.set
NameTypeRequiredDescription
bonestringnoThe bone; the active one when left out
connectedbooleannoThe head sits on the parent's tail
deformbooleannoThe bone deforms meshes
envelopeDistancenumbernoEnvelope: how far past the radii it fades out, metres (0.25)
envelopeMultiplybooleannoMultiply the bone's vertex group weights by its envelope
envelopeWeightnumbernoEnvelope: its strength where full (1)
headnumber[]noWhere it starts, armature space [x, y, z]
headRadiusnumbernoEnvelope: the radius at the head, metres (0.1)
namestringnoA new name
objectinteger | stringnoThe armature; the active one when left out
parentstringnoThe parent bone; an empty string clears it
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)
rollnumbernoTurn about its own axis, degrees
shapeinteger | stringnoCustom shape: the object whose mesh draws the bone; null for the octahedron
shapeBoneSizebooleannoCustom shape: scaled by the bone's length too (true)
shapeRotationnumber[]noCustom shape: its turn in the bone's axes, degrees [x, y, z]
shapeScalenumber[]noCustom shape: its scale [x, y, z]
shapeTranslationnumber[]noCustom shape: its offset in the bone's axes, metres [x, y, z]
shapeWirebooleannoCustom shape: drawn as its edges only
tailnumber[]noWhere it ends, armature space [x, y, z]
tailRadiusnumbernoEnvelope: the radius at the tail, metres (0.05)

Call through scene_run

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

The required parameters, with placeholders for their types: not a tested example. Optional: bone, connected, deform, envelopeDistance, envelopeMultiply, envelopeWeight, head, headRadius, name, object, parent, pick, roll, shape, shapeBoneSize, shapeRotation, shapeScale, shapeTranslation, shapeWire, tail, tailRadius. 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": {
    "bone": {
      "description": "The bone; the active one when left out",
      "type": "string"
    },
    "connected": {
      "description": "The head sits on the parent's tail",
      "type": "boolean"
    },
    "deform": {
      "description": "The bone deforms meshes",
      "type": "boolean"
    },
    "envelopeDistance": {
      "description": "Envelope: how far past the radii it fades out, metres (0.25)",
      "type": "number"
    },
    "envelopeMultiply": {
      "description": "Multiply the bone's vertex group weights by its envelope",
      "type": "boolean"
    },
    "envelopeWeight": {
      "description": "Envelope: its strength where full (1)",
      "type": "number"
    },
    "head": {
      "description": "Where it starts, armature space [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "headRadius": {
      "description": "Envelope: the radius at the head, metres (0.1)",
      "type": "number"
    },
    "name": {
      "description": "A new name",
      "type": "string"
    },
    "object": {
      "description": "The armature; the active 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"
      ]
    },
    "parent": {
      "description": "The parent bone; an empty string clears it",
      "type": "string"
    },
    "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"
    },
    "roll": {
      "description": "Turn about its own axis, degrees",
      "type": "number"
    },
    "shape": {
      "description": "Custom shape: the object whose mesh draws the bone; null for the octahedron",
      "oneOf": [
        {
          "description": "the object's id",
          "type": "integer"
        },
        {
          "description": "the object's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Object"
      ]
    },
    "shapeBoneSize": {
      "description": "Custom shape: scaled by the bone's length too (true)",
      "type": "boolean"
    },
    "shapeRotation": {
      "description": "Custom shape: its turn in the bone's axes, degrees [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "shapeScale": {
      "description": "Custom shape: its scale [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "shapeTranslation": {
      "description": "Custom shape: its offset in the bone's axes, metres [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "shapeWire": {
      "description": "Custom shape: drawn as its edges only",
      "type": "boolean"
    },
    "tail": {
      "description": "Where it ends, armature space [x, y, z]",
      "items": {
        "type": "number"
      },
      "type": "array"
    },
    "tailRadius": {
      "description": "Envelope: the radius at the tail, metres (0.05)",
      "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.