Difference between revisions of "Text DAT"

From TouchDesigner Documentation
Jump to: navigation, search
(cleaning)
(Tag: 2018.28070)
Line 1: Line 1:
 
{{Summary
 
{{Summary
|OPfamily=DAT
+
|opFamily=DAT
|OPlabel=Text
+
|opLabel=Text
|OPfilter=False
+
|opFilter=False
 
|long=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]]).
 
|long=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]]).
 
 
Line 10: Line 10:
 
 
 
Use the [[Web DAT]] to fetch via a URL query.
 
Use the [[Web DAT]] to fetch via a URL query.
|OPclass=textDAT_Class
+
|opClass=textDAT_Class
|OPtype=text
+
|opType=text
 
|short=The Text DAT lets you edit free-form, multi-line ASCII text.
 
|short=The Text DAT lets you edit free-form, multi-line ASCII text.
|OPlicense=Non-Commercial
+
|opLicense=Non-Commercial
 
}}
 
}}
 
{{ParameterPage
 
{{ParameterPage
 
|items=
 
|items=
{{ParButton
+
{{Parameter|parLabel=Edit..
|Parlabel=Edit..
+
|opFamily=DAT
|OPfamily=DAT
+
|parName=edit
|Parname=edit
+
|parSummary=Clicking this opens a text editor to add/edit/delete text from the DAT.
|Parsummary=Clicking this opens a text editor to add/edit/delete text from the DAT.
+
|opType=text
|OPtype=text
+
|parOrder=0
|Parorder=0
+
|parType=
}}
+
|parReadOnly=
{{ParFilePath
+
|parItems=
|Parlabel=File
+
}}
|OPfamily=DAT
+
{{Parameter|parLabel=File
|Parname=file
+
|opFamily=DAT
|Parsummary=The filesystem path and name of the file to load. Accepts <code>.txt</code> and <code>.dat</code> files.
+
|parName=file
|OPtype=text
+
|parSummary=The filesystem path and name of the file to load. Accepts <code>.txt</code> and <code>.dat</code> files.
|Parorder=1
+
|opType=text
}}
+
|parOrder=1
{{ParToggle
+
|parType=
|Parlabel=Load on Start
+
|parReadOnly=
|OPfamily=DAT
+
|parItems=
|Parname=loadonstart
+
}}
|Parsummary=When set to 1, reloads the file from disk into the DAT when the projects starts. Pulse to reload instantly.
+
{{Parameter|parLabel=Load on Start
|OPtype=text
+
|opFamily=DAT
|Parorder=2
+
|parName=loadonstart
}}
+
|parSummary=When set to 1, reloads the file from disk into the DAT when the projects starts. Pulse to reload instantly.
{{ParButton
+
|opType=text
|Parlabel=Load File
+
|parOrder=2
|OPfamily=DAT
+
|parType=
|Parname=loadonstartpulse
+
|parReadOnly=
|Parsummary=
+
|parItems=
|OPtype=text
+
}}
|Parorder=3
+
{{Parameter|parLabel=Load File
}}
+
|opFamily=DAT
{{ParToggle
+
|parName=loadonstartpulse
|Parlabel=Write on Toe Save
+
|parSummary=
|OPfamily=DAT
+
|opType=text
|Parname=write
+
|parOrder=3
|Parsummary=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.
+
|parType=
|OPtype=text
+
|parReadOnly=
|Parorder=4
+
|parItems=
}}
+
}}
{{ParButton
+
{{Parameter|parLabel=Write on Toe Save
|Parlabel=Write File
+
|opFamily=DAT
|OPfamily=DAT
+
|parName=write
|Parname=writepulse
+
|parSummary=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.
|Parsummary=
+
|opType=text
|OPtype=text
+
|parOrder=4
|Parorder=5
+
|parType=
}}
+
|parReadOnly=
 +
|parItems=
 +
}}
 +
{{Parameter|parLabel=Write File
 +
|opFamily=DAT
 +
|parName=writepulse
 +
|parSummary=
 +
|opType=text
 +
|parOrder=5
 +
|parType=
 +
|parReadOnly=
 +
|parItems=
 +
}}
 
 
|OPfamily=DAT
+
|opFamily=DAT
|Pagesummary=
+
|pageSummary=
|Pagename=File
+
|pageName=File
 
}}
 
}}
 
{{:DAT Generator Common Page
 
{{:DAT Generator Common Page
 
}}
 
}}
{{History
+
{{InputsPage
 +
|opFamily=DAT
 +
|opInputs={{OPInput
 +
|opFamily=DAT
 +
|inputIndex=0
 +
|inputName=
 +
|inputSummary=
 +
}}
 +
}}{{History
 
}}
 
}}
 
{{DATNavBox
 
{{DATNavBox
|OPfamily=DAT
+
|opFamily=DAT
 
}}
 
}}
 
{{#invoke:Category
 
{{#invoke:Category
 
|list|DATs}}
 
|list|DATs}}

Revision as of 16:57, 24 January 2019

Summary
[edit]

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.

PythonIcon.pngtextDAT_Class


Parameters - File Page

Edit.. edit - Clicking this opens a text editor to add/edit/delete text from the DAT.  

File file - The filesystem path and name of the file to load. Accepts .txt and .dat files.  

Load on Start loadonstart - When set to 1, reloads the file from disk into the DAT when the projects starts. Pulse to reload instantly.  

Load File loadonstartpulse -  

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.  

Write File writepulse -  


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:

DATs
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.

An Operator Family which operate on Channels (a series of numbers) which are used for animation, audio, mathematics, simulation, logic, UI construction, and many other applications.

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 via python is via the .pulse() function on a pulse-type parameter, such as Reset in a Speed CHOP. A pulse from a CHOP is typically a 0 to 1 to 0 signal in a channel.

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.