CHOP Execute DAT
Summary
The CHOP Execute DAT will run its script when the values of a specified CHOP change. You can specify which channels to look at, and trigger based on their values changing in various ways. The script gets called for every sample that changes, so when rendering one frame, it may get called 2 or more times per channel, depending on how many frames forward TouchDesigner has stepped (see Time Slicing).
Arguments are passed to the script to describe what type of change was detected.
You can view the arguments by including the command echo $args in the script.
These arguments are:
-
arg0path of the CHOP Execute DAT -
arg1type of trigger (offtoon,change, ... -
arg2path of the CHOP -
arg3current sample value -
arg4CHOP channel name -
arg5CHOP channel index -
arg6channel sample index
The sample index is compatible with the chopi() expression (it may not necessarily start with 0, but the CHOP's index range).
Parameters
Execute From /executeloc - Determines the location the script is run from.
- Current Node
/current- The script is executed from the current node location (for example, where the pc Command points to). - 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 Component
/comp- The script is executed from the component specified in the Component parameter below.
From Component /component - The component who's state change will trigger the DAT to execute its script when Execute is set to On Panel Change. This component is also the path that the script will be executed from if the Execute From parameter is set to Specified Component.
CHOP /chop - The CHOP whose channel change will trigger the DAT to execute its script.
Channel /channel - Which channel will trigger change.
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 script executes when the channel specified switches from off to on, called at the first "on" frame. - While On
/on- The script executes when the channel specified is on. It is called once each frame. - On to Off
/ontooff- The script executes when the channel specified switches from on to off, called at the first "off" frame. - While Off
/off- The script executes when the channel specified is off. It is called once each frame. - On Value Change
/change- The script executes when the channel specified changes value in any way. It is called once each frame.
Frequency /freq - Enabled when using the While On or While Off options above. Determines if the DAT executes for Every Sample or One Sample Per Frame.
Edit... button /edit - Clicking this opens a text editor to add/edit/delete text from the DAT.
| ||||||||||||||
