Scene kit command
physics.cloth.set
Cloth Settings
Changes cloth settings and partial `effectorWeights` on `objects`. Weights default to 1 and range from -200 to 200; other systems are unaffected.
- Kit
- Scene 0.1.0 (.kscene)
- Changes the document
- yes
- Acts on
objects(a list of ids), which a run step’sonfills
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
airDamping | number | no | Air damping |
bending | number | no | Bending stiffness |
collisionDistance | number | no | How close the cloth comes to collision objects, in metres |
compression | number | no | Compression stiffness |
effectorWeights | object | no | Partial cloth or soft-body influence weights; All multiplies field weights, Gravity is independent |
mass | number | no | Mass of each vertex in kg |
objects | integer | string | (integer | string)[] | no | The objects; the selection when left out |
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) |
pinGroup | string | no | The vertex group that stays put (empty: none) |
quality | integer | no | Steps per frame (1 to 80) |
selfCollision | boolean | no | The cloth collides with itself |
selfDistance | number | no | How far apart the cloth keeps from itself, in metres |
shear | number | no | Shear stiffness |
tension | number | no | Stretch stiffness |
Call through scene_run
text
scene_run {
"path": "<file>.kscene",
"steps": [{ "command": "physics.cloth.set" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: airDamping, bending, collisionDistance, compression, effectorWeights, mass, objects, pick, pinGroup, quality, selfCollision, selfDistance, shear, tension. 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": {
"airDamping": {
"description": "Air damping",
"type": "number"
},
"bending": {
"description": "Bending stiffness",
"type": "number"
},
"collisionDistance": {
"description": "How close the cloth comes to collision objects, in metres",
"type": "number"
},
"compression": {
"description": "Compression stiffness",
"type": "number"
},
"effectorWeights": {
"additionalProperties": false,
"description": "Partial cloth or soft-body influence weights; All multiplies field weights, Gravity is independent",
"properties": {
"all": {
"description": "All field weights multiplier, -200 to 200 (1); does not affect gravity",
"type": "number"
},
"drag": {
"description": "Drag weight, -200 to 200 (1)",
"type": "number"
},
"force": {
"description": "Force weight, -200 to 200 (1)",
"type": "number"
},
"gravity": {
"description": "Signed gravity multiplier, -200 to 200 (1), independent of All",
"type": "number"
},
"turbulence": {
"description": "Turbulence weight, -200 to 200 (1)",
"type": "number"
},
"vortex": {
"description": "Vortex weight, -200 to 200 (1)",
"type": "number"
},
"wind": {
"description": "Wind weight, -200 to 200 (1)",
"type": "number"
}
},
"type": "object"
},
"mass": {
"description": "Mass of each vertex in kg",
"type": "number"
},
"objects": {
"description": "The objects; the selection when left out",
"oneOf": [
{
"description": "an object's id",
"type": "integer"
},
{
"description": "an object's name",
"type": "string"
},
{
"description": "ids or names",
"items": {
"oneOf": [
{
"type": "integer"
},
{
"type": "string"
}
]
},
"type": "array"
}
],
"x-khp-name": "name",
"x-khp-types": [
"Object"
]
},
"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"
},
"pinGroup": {
"description": "The vertex group that stays put (empty: none)",
"type": "string"
},
"quality": {
"description": "Steps per frame (1 to 80)",
"type": "integer"
},
"selfCollision": {
"description": "The cloth collides with itself",
"type": "boolean"
},
"selfDistance": {
"description": "How far apart the cloth keeps from itself, in metres",
"type": "number"
},
"shear": {
"description": "Shear stiffness",
"type": "number"
},
"tension": {
"description": "Stretch stiffness",
"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.