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

Parameters of layer.newLight
NameTypeRequiredDescription
castsShadowsbooleanno
colorstringno
coneAnglenumberno
coneFeathernumberno
falloffnumbernoNone|Smooth|Inverse Square Clamped
falloffDistancenumberno
intensitynumberno
kind"Parallel" | "Spot" | "Point" | "Ambient" | "Environment"nodefault 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
namestringno
poiany[]no[x,y,z]
positionany[]no[x,y,z]
radiusnumberno
shadowDarknessnumberno
shadowDiffusionnumberno

Call through motion_run

text
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

json
{
  "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.