Motion kit command
layer.newLight
Light
Adds a light layer: `kind` Parallel, Spot (default), Point, Ambient or Environment, with color, intensity, cone, falloff and shadow options. Lights affect 3D layers; Environment lights from an equirectangular image layer.
- Kit
- Motion 0.1.0 (.kmotion)
- Changes the document
- yes
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
castsShadows | boolean | no | |
color | string | no | |
coneAngle | number | no | |
coneFeather | number | no | |
falloff | number | no | None|Smooth|Inverse Square Clamped |
falloffDistance | number | no | |
intensity | number | no | |
kind | "Parallel" | "Spot" | "Point" | "Ambient" | "Environment" | no | default Spot; Environment lights and reflects from an equirectangular image layer: prop.set its lightOptions/source to that layer's id, or leave it empty for the comp's Environment Layer, see layer.environment |
name | string | no | |
poi | any[] | no | [x,y,z] |
position | any[] | no | [x,y,z] |
radius | number | no | |
shadowDarkness | number | no | |
shadowDiffusion | number | no |
Call through motion_run
motion_run {
"path": "<file>.kmotion",
"steps": [{ "command": "layer.newLight" }]
}The required parameters, with placeholders for their types: not a tested example. Optional: castsShadows, color, coneAngle, coneFeather, falloff, falloffDistance, intensity, kind, name, poi, position, radius, shadowDarkness, shadowDiffusion. 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": {
"castsShadows": {
"type": "boolean"
},
"color": {
"type": "string"
},
"coneAngle": {
"type": "number"
},
"coneFeather": {
"type": "number"
},
"falloff": {
"description": "None|Smooth|Inverse Square Clamped",
"type": "number"
},
"falloffDistance": {
"type": "number"
},
"intensity": {
"type": "number"
},
"kind": {
"description": "default Spot; Environment lights and reflects from an equirectangular image layer: prop.set its lightOptions/source to that layer's id, or leave it empty for the comp's Environment Layer, see layer.environment",
"enum": [
"Parallel",
"Spot",
"Point",
"Ambient",
"Environment"
],
"type": "string"
},
"name": {
"type": "string"
},
"poi": {
"description": "[x,y,z]",
"type": "array"
},
"position": {
"description": "[x,y,z]",
"type": "array"
},
"radius": {
"type": "number"
},
"shadowDarkness": {
"type": "number"
},
"shadowDiffusion": {
"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.