Panel Execute DAT

From TouchDesigner Documentation
Jump to: navigation, search


The Panel Execute DAT will run its script when the Panel Values of a specified panel component changes. You can specify which panel values to monitor, and trigger scripts based on their values changing in various ways.

Panel Execute DATs are created with default python method placeholders. For each monitored condition in the parameters, there is a matching python method in the DAT. When a condition is turned on in the parameters, each time that condition is satisfied the corresponding python method will be executed.

In the template Python script, panelValue is passed to each method, and you can query each call by printing and panelValue.val. See PanelValue Class.


Parameters - Panel Execute Page

Active active - While on, the DAT will respond to the Panel that is referenced.

Execute from executeloc - - (Tscript only) Determines the location the script is run from.

  • Current Node current - (Tscript only) The script is executed from the current node location.
  • This Node here - The script is executed from the parent of the DAT. The DAT executes from the parent to make siblings of the DAT easy to access: DAT scripts used to execute from inside the DAT.
  • Specified Operator op - The script is executed from the operator specified in the From Operator parameter below.

From Operator fromop - The path that the script will be executed from if the Execute From parameter is set to Specified Operator.

Panels panels - Select which Panel COMPs to monitor for changes.

Panel Value panelvalue - The Panel Value(s) that is monitored to trigger the execution of the script.

Scripts will execute based on a combination of the five trigger events listed below. The script is executed once per trigger (except for While On/While Off cases). Each event will only cause one trigger to go off (i.e. if both Off to On and On Value Change are checked, one event will be fired with Off to On as the trigger). Logic for the 'on' state is greater than zero.

Off to On offtoon - The onOffToOn() method executes when the panel value specified switches from off to on, called at the first "on" frame.

While On whileon - The whileOn() method executes when the panel value specified is on. It is called once each frame.

On to Off ontooff - The onOnToOff() method executes when the panel value specified switches from on to off, called at the first "off" frame.

While Off whileoff - The whileOff() method executes when the panel value specified is off. It is called once each frame.

Value Change valuechange - The onValueChange() method executes when the panel value specified changes value in any way. It is called once each frame.

Edit.. edit - Clicking this opens a text editor to edit text in the DAT.

Parameters - Common Page

Language language - - Select how the DAT decides which script language to operate on.

  • Input input - The DAT uses the inputs script language.
  • Node node - The DAT uses it's own script language.

Edit/View Extension extension - - Select the file extension this DAT should expose to external editors.

  • dat dat - various common file extensions.
  • From Language language - pick extension from DATs script language.
  • Custom Extension custom - Specify a custom extension.

Custom Extension customext - Specifiy the custom extension.

Word Wrap wordwrap - - Enable Word Wrap for Node Display.

  • Input input - The DAT uses the inputs setting.
  • On on - Turn on Word Wrap.
  • Off off - Turn off Word Wrap.

Operator Inputs

  • Input 0 -

TouchDesigner Build:

Art-Net • CHOP Execute • CHOP to • Clip • Convert • CPlusPlus • DAT •  Execute • DAT xport • Error • EtherDream • Evaluate • Examine • Execute • FIFO • File In • File Out • Folder • In • Indices • Info • Insert • Experimental:JSON • Keyboard In • Lookup • Merge • MIDI Event • MIDI In • Monitors • MQTT Client • Multi Touch In • NDI • Null • OP Execute • OP Find • OSC In • OSC Out • Out • Panel Execute • Parameter • Parameter Execute • Perform • Render Pick • Reorder • Script • Select • Serial • SocketIO • SOP to • Sort • Substitute • Switch • Table • TCP/IP • Text • Touch In • Touch Out • Transpose • TUIO In • UDP In • UDP Out • UDT In • UDT Out • Web Client • Web • Web Server • Experimental:Web Server • WebSocket • XML

An Operator Family that manipulates text strings: multi-line text or tables. Multi-line text is often a command Script, but can be any multi-line text. Tables are rows and columns of cells, each containing a text string.

The generic thing that holds an Operator, and includes Flags (display, bypass, lock, render, immune) and its position/size in the network. Whether you "lay down an Operator" or "lay down an Node", you're doing the same thing.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.

The internal states of a panel component are Panel Values, and are accessed with a Panel CHOP, a OP.panel Python expression, or a Panel Execute DAT.