ReferenceScript nodesRendering
Toggle Effect
Turns one of a layer's effects on or off.
ƒToggle EffectTarget is Layer
LayerLayer
Effect0
On
Inputs
| Pin | Type | Starts at | Notes |
|---|---|---|---|
in | what happens next | – | – |
Layerlayer | layer | – | – |
Effecteffect | text | "0" | – |
Onon | bool | true | – |
Outputs
| Pin | Type |
|---|---|
then | what happens next |
The code it becomes
The graph below written as a script would write it.
// On Scene Start(function (e, on) { if (on) e.enable(); else e.disable(); })(scene.layer("").effect(isFinite(Number("0")) && "0" !== "" ? Number("0") : "0"), !!(true));In a graph
◆On Scene Start
ƒToggle EffectTarget is Layer
LayerLayer
Effect0
On
The node with what starts it and Print to show what it gives, as Studio draws them.
Related
Notes from the community
Written by creators and checked by the docs' editors. Not part of Motion's official reference.