From Derivative
Jump to navigation Jump to search

Events in TouchDesigner are generated from a variety of conditions - from actions that a user causes, from external devices and software, and from internal TouchDesigner states.

A variety of operator types respond to events. Each has python callback functions in a DAT that enable a user to write code to react to events.

TouchDesigner is a procedural pull-based system (outputs to displays, audio devices and other destinations cook the nodes it needs to generate the outputs). But it also a push system based on operators that respond to events.

The event operators respond to events they receive via their python callback functions. The callbacks can cause other operators to change and cook via their parameters, table cells, extension properties, storage.

The operators that respond to events are:

The groups of "Execute" DATs that respond to changes within TouchDesigner:

The DATs that respond to user interface interactions:

Operators that react to external events:

And operators that run scripts when some of their their parameters are pulsed:

Operators like OP Find DAT and Folder DAT, have callbacks are called when conditions change. The callbacks can then change parameters and subsequently cause nodes to cook.

When the event operators change parameters or other data, the target nodes will then cook according to the pull-system cooking rules.

The Script operators (Script CHOP, Script DAT, Script TOP, Script SOP) are not event nodes - they are part of the pull system and will cook when TouchDesigner determines it depends on some other data in TouchDesigner - channels, parameters, table cells, extension properties, storage.

Note: You can force a node to cook by calling OP.cook(). Its data is passed downstream according to the cooking rules.

See also: Cook, Event CHOP