Plush

Inputs#

plupy · Type index

Module: plupy · obtained from obj.inputs, use.inputs

Declared inputs as a mapping: on an object (obj.inputs) their defaults and wiring; on a use (use.inputs) that use's values.

Obtain with obj.inputs for defaults or use.inputs for stored use values.

Expression / methodResult and effect
inputs[name]Authored value with default/inheritance fallback
inputs[name] = valueSet the declared default or use value
inputs.reset(name)Clear the stored value/default, restoring inheritance; returns None
obj.inputs.remove(name)Remove the declared input and its dependent wires; returns None
obj.inputs.connect(name, pin)Connect a declared input to a pin in this graph; returns None
obj.inputs.disconnect(name, pin)Disconnect that route; returns None
for name in inputs, len(inputs)Declared names and count

A use cannot declare/remove inputs or edit graph wiring. Expose a child's field on its interface before wiring it from a parent. Writes/reset affect the chosen owner even while forwarded values mask it. Unknown inputs, incompatible values, wrong graph ownership or invalid routing raise PlupyError. Read forwarded values through use.evaluated.inputs.

class Inputs(Mapping)

A read-only mapping protocol (x[key], for key in x, len(x), key in x, .get, .keys(), .items()); writes are listed below when supported.

Usage and examples

Members: Iteration · Length · Indexing · Assignment · reset · remove · connect · disconnect

Iteration#

for item in x

The declared input names.

Length#

len(x)

How many inputs are declared.

Indexing#

x[key]

The authored value, falling back to the default or inherited value; an undeclared name raises PlupyError.

Assignment#

x[key] = value

Set the declared default (on an object) or this use's value (on a use).

reset#

reset(name)

Clear the stored value or default so inheritance applies again.

remove#

remove(name)

Remove a declared input and the wires that depend on it (objects only).

connect#

connect(name, pin)

Connect a declared input to a pin in this object's graph.

disconnect#

disconnect(name, pin)

Disconnect that route.

PlupyError · edit

Source#