Scene kit command
modifier.set
Change Modifier
Changes the settings of modifier `index` or `name` on `object`.
- 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 |
|---|---|---|---|
angle | number | no | screw: degrees to turn |
angleLimit | number | no | bevel: edges sharper than this many degrees are bevelled; decimate planar: faces flatter than this join (5) |
axes | boolean[] | no | mirror: [x, y, z] axes to mirror across |
axis | "x" | "y" | "z" | no | screw and simpleDeform: the local axis |
constantOffset | number[] | no | array: an extra offset in metres [x, y, z] |
coordinates | "local" | "global" | "uv" | no | displace: where the image is looked up (local: -1 to 1 in object axes covers it once) |
count | integer | no | array: the number of copies |
direction | "normal" | "x" | "y" | "z" | no | displace: where to push |
distance | number | no | weld: the distance that joins vertices |
enabled | boolean | no | Shown in the viewport and renders |
envelopes | boolean | no | armature: vertices in no bone's group follow the bones whose envelopes reach them (false) |
factor | number | no | smooth: how far each vertex moves towards its neighbours |
group | integer | no | geometryNodes: the node group's id (node.newGroup makes one) |
image | string | no | displace: an image's hash (from image.add) whose brightness pushes; null for none |
index | integer | no | The modifier's position in the stack, from 0 |
inputs | object | no | geometryNodes: the group's inputs by name |
invertVertexGroup | boolean | no | armature: use one minus that group's weights |
iterations | integer | no | decimate unsubdivide: half steps of subdivision to undo, 0 to 16 |
levels | integer | no | subdivision: levels, 0 to 6; multires: the level shown (at most the mesh's levels) |
limits | number[] | no | simpleDeform: [low, high], the share of the range that deforms, 0 to 1 |
merge | boolean | no | mirror and array: join vertices where copies meet |
mergeThreshold | number | no | mirror: the distance that joins vertices on the plane |
midLevel | number | no | displace: the value that does not move (0.5) |
mode | "twist" | "bend" | "taper" | "stretch" | "collapse" | "unsubdivide" | "planar" | no | simpleDeform: what it does; decimate: collapse, unsubdivide, or planar |
multiModifier | boolean | no | armature: deform what the Armature modifier above got and mix over its result by the group |
name | string | no | The modifier's name (instead of index) |
negative | boolean | no | shrinkwrap project: cast against it (false) |
noiseScale | number | no | displace: noise feature size in metres; 0 pushes every vertex alike |
object | integer | string | no | The mesh object; the active one when left out |
offset | number | no | solidify: -1 grows inwards, 1 outwards; wireframe: -1 to 1; shrinkwrap: metres kept from the surface |
operand | integer | string | no | boolean and shrinkwrap: the other mesh object; lattice: the lattice object; armature: the armature |
operation | "difference" | "union" | "intersect" | no | boolean: what to keep |
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) |
positive | boolean | no | shrinkwrap project: cast along the vertex normal (true) |
preserveVolume | boolean | no | armature: blend the bones as dual quaternions, so joints keep their volume (false) |
ratio | number | no | decimate collapse: the share of triangles to keep, 0 to 1 |
relativeOffset | number[] | no | array: the offset between copies as a fraction of the mesh size [x, y, z] |
rename | string | no | A new name |
rim | boolean | no | solidify: close the open edges |
screwOffset | number | no | screw: how far along the axis one turn moves, metres |
sculptLevels | integer | no | multires: the level sculpt mode shows and sculpts |
segments | integer | no | bevel: segments across each bevel (1 is a flat chamfer) |
steps | integer | no | screw: steps around one turn |
strength | number | no | displace: how far, in metres, at full value; lattice: how much of the bend (1) |
thickness | number | no | solidify: the shell's thickness in metres |
vertexGroup | string | no | armature: a group whose weights say how much of the deformation each vertex takes; null for all |
vertexGroups | boolean | no | armature: vertices follow the bones of their groups (true) |
width | number | no | bevel: the bevel's width in metres |
wrapMethod | "nearestSurface" | "project" | "nearestVertex" | no | shrinkwrap: where vertices go |
Call through scene_run
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "modifier.set" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: angle, angleLimit, axes, axis, constantOffset, coordinates, count, direction, distance, enabled, envelopes, factor, group, image, index, inputs, invertVertexGroup, iterations, levels, limits, merge, mergeThreshold, midLevel, mode, multiModifier, name, negative, noiseScale, object, offset, operand, operation, pick, positive, preserveVolume, ratio, relativeOffset, rename, rim, screwOffset, sculptLevels, segments, steps, strength, thickness, vertexGroup, vertexGroups, width, wrapMethod. scene_run answers the step’s result in completed[i].result.
Result
The kit gives no result schema for this command.
Parameter schema
{
"additionalProperties": false,
"properties": {
"angle": {
"description": "screw: degrees to turn",
"type": "number"
},
"angleLimit": {
"description": "bevel: edges sharper than this many degrees are bevelled; decimate planar: faces flatter than this join (5)",
"type": "number"
},
"axes": {
"description": "mirror: [x, y, z] axes to mirror across",
"items": {
"type": "boolean"
},
"type": "array"
},
"axis": {
"description": "screw and simpleDeform: the local axis",
"enum": [
"x",
"y",
"z"
],
"type": "string"
},
"constantOffset": {
"description": "array: an extra offset in metres [x, y, z]",
"items": {
"type": "number"
},
"type": "array"
},
"coordinates": {
"description": "displace: where the image is looked up (local: -1 to 1 in object axes covers it once)",
"enum": [
"local",
"global",
"uv"
],
"type": "string"
},
"count": {
"description": "array: the number of copies",
"type": "integer"
},
"direction": {
"description": "displace: where to push",
"enum": [
"normal",
"x",
"y",
"z"
],
"type": "string"
},
"distance": {
"description": "weld: the distance that joins vertices",
"type": "number"
},
"enabled": {
"description": "Shown in the viewport and renders",
"type": "boolean"
},
"envelopes": {
"description": "armature: vertices in no bone's group follow the bones whose envelopes reach them (false)",
"type": "boolean"
},
"factor": {
"description": "smooth: how far each vertex moves towards its neighbours",
"type": "number"
},
"group": {
"description": "geometryNodes: the node group's id (node.newGroup makes one)",
"type": "integer",
"x-khp-name": "name",
"x-khp-types": [
"NodeGroup"
]
},
"image": {
"description": "displace: an image's hash (from image.add) whose brightness pushes; null for none",
"type": "string"
},
"index": {
"description": "The modifier's position in the stack, from 0",
"type": "integer"
},
"inputs": {
"additionalProperties": true,
"description": "geometryNodes: the group's inputs by name",
"type": "object"
},
"invertVertexGroup": {
"description": "armature: use one minus that group's weights",
"type": "boolean"
},
"iterations": {
"description": "decimate unsubdivide: half steps of subdivision to undo, 0 to 16",
"type": "integer"
},
"levels": {
"description": "subdivision: levels, 0 to 6; multires: the level shown (at most the mesh's levels)",
"type": "integer"
},
"limits": {
"description": "simpleDeform: [low, high], the share of the range that deforms, 0 to 1",
"items": {
"type": "number"
},
"type": "array"
},
"merge": {
"description": "mirror and array: join vertices where copies meet",
"type": "boolean"
},
"mergeThreshold": {
"description": "mirror: the distance that joins vertices on the plane",
"type": "number"
},
"midLevel": {
"description": "displace: the value that does not move (0.5)",
"type": "number"
},
"mode": {
"description": "simpleDeform: what it does; decimate: collapse, unsubdivide, or planar",
"enum": [
"twist",
"bend",
"taper",
"stretch",
"collapse",
"unsubdivide",
"planar"
],
"type": "string"
},
"multiModifier": {
"description": "armature: deform what the Armature modifier above got and mix over its result by the group",
"type": "boolean"
},
"name": {
"description": "The modifier's name (instead of index)",
"type": "string"
},
"negative": {
"description": "shrinkwrap project: cast against it (false)",
"type": "boolean"
},
"noiseScale": {
"description": "displace: noise feature size in metres; 0 pushes every vertex alike",
"type": "number"
},
"object": {
"description": "The mesh object; 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"
]
},
"offset": {
"description": "solidify: -1 grows inwards, 1 outwards; wireframe: -1 to 1; shrinkwrap: metres kept from the surface",
"type": "number"
},
"operand": {
"description": "boolean and shrinkwrap: the other mesh object; lattice: the lattice object; armature: the armature",
"oneOf": [
{
"description": "the object's id",
"type": "integer"
},
{
"description": "the object's name",
"type": "string"
}
],
"x-khp-name": "name",
"x-khp-types": [
"Object"
]
},
"operation": {
"description": "boolean: what to keep",
"enum": [
"difference",
"union",
"intersect"
],
"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"
},
"positive": {
"description": "shrinkwrap project: cast along the vertex normal (true)",
"type": "boolean"
},
"preserveVolume": {
"description": "armature: blend the bones as dual quaternions, so joints keep their volume (false)",
"type": "boolean"
},
"ratio": {
"description": "decimate collapse: the share of triangles to keep, 0 to 1",
"type": "number"
},
"relativeOffset": {
"description": "array: the offset between copies as a fraction of the mesh size [x, y, z]",
"items": {
"type": "number"
},
"type": "array"
},
"rename": {
"description": "A new name",
"type": "string"
},
"rim": {
"description": "solidify: close the open edges",
"type": "boolean"
},
"screwOffset": {
"description": "screw: how far along the axis one turn moves, metres",
"type": "number"
},
"sculptLevels": {
"description": "multires: the level sculpt mode shows and sculpts",
"type": "integer"
},
"segments": {
"description": "bevel: segments across each bevel (1 is a flat chamfer)",
"type": "integer"
},
"steps": {
"description": "screw: steps around one turn",
"type": "integer"
},
"strength": {
"description": "displace: how far, in metres, at full value; lattice: how much of the bend (1)",
"type": "number"
},
"thickness": {
"description": "solidify: the shell's thickness in metres",
"type": "number"
},
"vertexGroup": {
"description": "armature: a group whose weights say how much of the deformation each vertex takes; null for all",
"type": "string"
},
"vertexGroups": {
"description": "armature: vertices follow the bones of their groups (true)",
"type": "boolean"
},
"width": {
"description": "bevel: the bevel's width in metres",
"type": "number"
},
"wrapMethod": {
"description": "shrinkwrap: where vertices go",
"enum": [
"nearestSurface",
"project",
"nearestVertex"
],
"type": "string"
}
},
"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.