Finites states for infinite people.

Banana mash is a finite state-mashine for TouchDesigner with a nice looking UI and powerfull callbacks.

Repository on GitHub

  • Conditionals: A group of parameters that can be used define conditions for the connections.
  • Default State: The state that will be targeted at startup.
  • Check on Parchange: Checks all connections of the current state when one of the conditionals is adjusted. Skips timing.
  • Time Active: Checks if states should act on timing. If not set to true, states will remain static until a check is initiated, either via a parameter-adjustment, calling the Check() method or pulsing the Check parameter.
  • Auto Continue: Should a state evaluate all connections when it is entered or should it wait for an external trigger. DANGER: Recursion may appear!

  • OnStateEnter(state, time): Gets called when a new state is entered. If using autocinitue results in a chain, every state of the chain will be called.
  • OnStateExit(state): Called before stateEnter. 
  • OnStateCycle(state, time): Gets called when a state is evaluated and no connections is used.
  • State_Callbacks: You can define the same callbacks, but for specific states. For example to trigger when state Foo is entered, simply def OnFooEnter(time)

  1. The current active state.
  2. The state of the current time.

The UI is situated in a subcomponent of the bananMashBASE. You can move the UI outside and reffer the baseCOMP.
L-Click: Select State. Drag Network.
M-Click: Drag Network.
R-Click: Create new Connection.
Wheel: Zoom.
Del: Remove State.
Ctrl+N/Green +: New State

Upper Table: Connections of selected State.
Bottom Table: Conditions as string. Tries to evaluate the string value as a python-expression. So stuff like op() is usable to an extend.

Downloads: 43

Created at: 3.6.2021

Uploaded: 4.6.2021
Fixed bug where callbacks were called in the wrong order.