Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

value.fallback (procNode)

The value wired into value, or fallback when nothing is: how a graph used as a node takes an input its caller may leave unwired. Whether value is wired is known when the graph is planned, and fallback is built only when it is the one taken. A device value passes through as it stands.

Inputs

  • value (Any, optional): the value used when it is wired.
  • fallback (Any): the value used when value is not wired, built only then.

Outputs

  • value (Any): whichever of the two is taken.

Example

local size = g:input("size", nil, { type = "Float", optional = true })
local used = g.value.fallback({ value = size, fallback = 1 })