Motion kit command
layer.new3dPrimitive
3D Primitive
Adds a 3D primitive layer: `kind` cube, sphere, plane, torus, cone or cylinder with size options, `position` [x, y, z] and material (`baseColor`, `metallic` and `roughness` as percents 0 to 100, `emissive`, shadows). Switches the comp to Advanced 3D.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
acceptsLights | boolean | no | |
acceptsShadows | number | no | |
baseColor | string | number[] | no | |
castsShadows | boolean | no | |
comp | integer | string | no | read by the command beside its listed parameters |
depth | integer | no | |
emissive | string | number[] | no | |
height | number | no | |
kind | "cube" | "sphere" | "plane" | "torus" | "cone" | "cylinder" | no | |
metallic | number | no | |
name | string | no | |
position | any[] | no | [x,y,z] |
radius | number | no | |
rings | any | no | |
roughness | number | no | |
segments | number | no | |
tubeRadius | any | no | |
type | string | no | read by the command beside its listed parameters |
width | number | no |
Call through motion_run
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "layer.new3dPrimitive" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: acceptsLights, acceptsShadows, baseColor, castsShadows, comp, depth, emissive, height, kind, metallic, name, position, radius, rings, roughness, segments, tubeRadius, type, width. motion_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": {
"acceptsLights": {
"type": "boolean"
},
"acceptsShadows": {
"type": "number"
},
"baseColor": {
"oneOf": [
{
"description": "#rrggbb",
"type": "string"
},
{
"description": "[r, g, b(, a)] 0 to 1",
"items": {
"type": "number"
},
"type": "array"
}
]
},
"castsShadows": {
"type": "boolean"
},
"comp": {
"description": "read by the command beside its listed parameters",
"oneOf": [
{
"description": "comp's item id as motion_inspect lists it",
"type": "integer"
},
{
"description": "the item id as receipts print it (\"1\"), or the comp's name",
"type": "string"
}
],
"x-khp-name": "name",
"x-khp-types": [
"Item"
]
},
"depth": {
"type": "integer"
},
"emissive": {
"oneOf": [
{
"description": "#rrggbb",
"type": "string"
},
{
"description": "[r, g, b(, a)] 0 to 1",
"items": {
"type": "number"
},
"type": "array"
}
]
},
"height": {
"type": "number"
},
"kind": {
"enum": [
"cube",
"sphere",
"plane",
"torus",
"cone",
"cylinder"
],
"type": "string"
},
"metallic": {
"type": "number"
},
"name": {
"type": "string"
},
"position": {
"description": "[x,y,z]",
"type": "array"
},
"radius": {
"type": "number"
},
"rings": {},
"roughness": {
"type": "number"
},
"segments": {
"type": "number"
},
"tubeRadius": {},
"type": {
"description": "read by the command beside its listed parameters",
"type": "string"
},
"width": {
"type": "number"
}
},
"type": "object"
}Generated from the command list of @kition/[email protected] and the kit itself (motion_commands through @kition/[email protected], built from KitionAI/kition-motion@4719aa7). As data: commands.jsonl.