ReferenceScripting APIMotionEffect
MotionEffect
interfaceOne of a layer's effects (layer.effect).
| Name | MotionEffect |
|---|---|
| Kind | interface |
| Script reaches it as | MotionLayer.effect() |
| Since | 0.3 |
Syntax
interface MotionEffect { … }Properties
| Name | Type | Description |
|---|---|---|
indexproperty | readonly number | Its number in the stack (0 the first); -1 when there's no such effect. |
typeproperty | readonly string | Its kind ("blur", "glow"...). |
nameproperty | readonly string | Its name, as the scene gives it ("" for none). |
enabledproperty | readonly boolean | Whether it's on. |
Methods
| Signature | Description |
|---|---|
set(key: string, value: SettingValue): voidmethod | Changes one of its settings at once. |
animate(key: string, value: string | number, seconds: number, options?: MotionAnimateOptions): Promise<boolean>method | Moves one of its number or colour settings over seconds. |
get(key: string): SettingValue | undefinedmethod | One of its settings: what the script set, or what the scene started with. |
enable(): voidmethod | Turns it on. |
disable(): voidmethod | Turns it off. |
See also
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.