The Text DAT lets you edit free-form, multi-line ASCII text. It is used for scripts, GLSL shaders, notes, XML and other purposes. "Free-form text" is one of the two forms of DATs (the other being tables of rows and columns of cells, each cell containing a text string as in a Table DAT).
Text can be typed into the DAT when its Viewer Active is on, or in an external text editor. The Text DAT can get its data from a file on disk or from a file on the web. Use
http:// when specifying a remote text file.
See also the Execute DATs which are specialized to run their text as a script: CHOP Execute DAT runs its script when a CHOP channel changes, DAT Execute DAT when a DAT changes, Execute DAT when you start or end your TouchDesigner process or want to run a script every frame, Panel Execute DAT when a control panel changes, Parameter Execute DAT when a parameter of a node changes, and OP Execute DAT when anything else about an operator changes, including creation and deletion of nodes in a component's network.
Use the Web DAT to fetch via a URL query.
Parameters - File Page
edit - Clicking this opens a text editor to add/edit/delete text from the DAT.
file - The filesystem path and name of the file to load. Accepts
Sync to File
syncfile - When set to 1, loads the file from disk into the DAT when the projects starts. A filename must be specified. If the file does not exist, it will be created the first time the DAT is edited externally. The file is monitored so that any changes made to the file will update the DAT, and any changes made to the DAT will be written to the file right away. If the file is removed, the DAT will retain its current contents.
Load on Start
loadonstart - When set to 1, reloads the file from disk into the DAT when the projects starts. Pulse to reload instantly.
Write on Toe Save
write - When set to 1, writes the contents of the DAT out to the file on disk when the project is saved. Pulse to save instantly.
Parameters - Common Page
language - ⊞ - Select how the DAT decides which script language to operate on.
input- The DAT uses the inputs script language.
node- The DAT uses it's own script language.
extension - ⊞ - Select the file extension this DAT should expose to external editors.
dat- various common file extensions.
- From Language
language- pick extension from DATs script language.
- Custom Extension
custom- Specify a custom extension.
customext - Specifiy the custom extension.
wordwrap - ⊞ - Enable Word Wrap for Node Display.
input- The DAT uses the inputs setting.
on- Turn on Word Wrap.
off- Turn off Word Wrap.
- Input 0 -
|• • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • •|
To pulse a parameter is to send it a signal from a CHOP or python or a mouse click that causes a new action to occur immediately. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel, and a pulse via python is via a
.pulse() call on a pulse-type parameter, such as Reset in a Speed CHOP.