ReferenceScripting APIMotionSceneset
MotionScene.set
methodChanges one of a layer's settings at once. The value is kept in the setting's range.
| Name | set |
|---|---|
| Kind | method of MotionScene |
| Called as | scene.set(…) |
| As a node | Set Layer Setting (logic graph) |
| Since | 0.3 |
Syntax
set( layer: string, setting: string, value: SettingValue): voidParameters
| Name | Type | Description |
|---|---|---|
layer | string | The layer's name or id, or a folder's (each layer in it) |
setting | string | A setting's key, such as "opacity" or "colour1" |
value | SettingValue | A 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
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.