Skip to content

← programming package

ConditionTest

Basic condition test node.

The node has one input of arbitrary type and two outputs that can take on values 0 or 1, named true and false. Further, the node has a predefined value to compare to, and optionally the type of comparison can be specified. If the comparison between the value and the input yields True, then the output named "true" outputs 1, and otherwise the output named "false" yields 1. These outputs can be wired to the "update" port of subsequent nodes to control whether these nodes shall execute (i.e., be updated) or not. Version 1.0.1

Ports/Properties

input

Input condition.

  • verbose name: Input
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

true

True branch. Executed if condition is true.

  • verbose name: True
  • default value: None
  • port type: DataPort
  • value type: bool (can be None)
  • data direction: OUT

false

False branch. Executed if condition is false.

  • verbose name: False
  • default value: None
  • port type: DataPort
  • value type: bool (can be None)
  • data direction: OUT

value

The value to compare to. Usually a scalar.

  • verbose name: Comparison Value
  • default value: None
  • port type: Port
  • value type: object (can be None)

operator

Comparison operator to use. Tests whether the input is greater/less/etc than the given value.

  • verbose name: Comparison Operator
  • default value: equal
  • port type: EnumPort
  • value type: str (can be None)

collapse_op

Collapse operation. This is optional and only used if the input is an array.

  • verbose name: Collapse Operation
  • default value: all
  • port type: EnumPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)