Motion
Get Motion

ReferenceScripting APIMotionSceneset

MotionScene.set

method

Changes one of a layer's settings at once. The value is kept in the setting's range.

Nameset
Kindmethod of MotionScene
Called asscene.set(…)
As a nodeSet Layer Setting (logic graph)
Since0.3

Syntax

set(    layer: string,    setting: string,    value: SettingValue): void

Parameters

NameTypeDescription
layerstringThe layer's name or id, or a folder's (each layer in it)
settingstringA setting's key, such as "opacity" or "colour1"
valueSettingValueA number, a colour ("#rrggbb"), words or true/false

Returns

Nothing.

Remarks

A layer that isn't there does nothing, and the console says so once.

Example

scene.set("Sun", "opacity", 0.5);

See also

SettingValue · In examples: Constellations, Kelp Forest, Pulse, Rain Harbour, Resonance, Valley Hours