Motion
Get Motion

ReferenceScripting APIMotionEffect

MotionEffect

interface

One of a layer's effects (layer.effect).

NameMotionEffect
Kindinterface
Script reaches it asMotionLayer.effect()
Since0.3

Syntax

interface MotionEffect { … }

Properties

NameTypeDescription
indexpropertyreadonly numberIts number in the stack (0 the first); -1 when there's no such effect.
typepropertyreadonly stringIts kind ("blur", "glow"...).
namepropertyreadonly stringIts name, as the scene gives it ("" for none).
enabledpropertyreadonly booleanWhether it's on.

Methods

SignatureDescription
set(key: string, value: SettingValue): voidmethodChanges one of its settings at once.
animate(key: string, value: string | number, seconds: number, options?: MotionAnimateOptions): Promise<boolean>methodMoves one of its number or colour settings over seconds.
get(key: string): SettingValue | undefinedmethodOne of its settings: what the script set, or what the scene started with.
enable(): voidmethodTurns it on.
disable(): voidmethodTurns it off.

See also

SettingValue