Skip to content

node switch

Blossom Merz edited this page Sep 27, 2026 · 6 revisions

Home > Data > Switch

< Previous: Compare | Next: Series >

Node Library

Switch node icon   Switch (node)

Route one of two inputs to the output: the toggle off takes A, on takes B.

Switch node diagram

Category: Data | Add menu: Data > Numbers > Switch

Switch is a routing node. It takes two inputs and passes exactly one of them through, chosen by a boolean: with Toggle off the output is A, with it on the output is B. Nothing is converted, merged or combined, so whatever arrives on the winning input leaves the node unchanged.

It is type-agnostic. Geometry, numbers, colors, strings and whole collections all travel through it the same way. That is what makes it useful for an A/B comparison: wire two variants of a pattern into A and B, leave the rest of the graph wired exactly as it is, and flip the toggle to see one or the other. Two variants feeding a single Realize is the common shape.

Inputs

  • A (any): the value taken when Toggle is off.
  • B (any): the value taken when Toggle is on.
  • Toggle (boolean): which input wins. Wire a Toggle node in, or any other boolean source.

Outputs

  • Result (any): whichever input the toggle chose, passed through untouched.

Note

A number wired into Toggle reads as a boolean: 0 is off, any other finite number is on. A non-finite number, the kind a bad division produces upstream, counts as off rather than on. Without that guard a NaN would read as "not zero" and silently flip the switch.

If the chosen input has nothing wired to it, the output is empty geometry rather than an error or a missing value, so downstream nodes see exactly what they would see from any other empty source.

< Previous: Compare | Next: Series >

Related

Locus Studio Docs

Home

Getting Started

Modeling - Drawing

Modeling - Editing

Annotation

Layers

Modeling Menus

The Nodes Window

Node Library

Clusters

Bridging Modeling & Nodes

Patterns & Symmetry

Image-Driven Fields

Saving, Exporting & Files

Preferences & Language

CLI

Reference

Clone this wiki locally