OP Find DAT

From Derivative
Jump to: navigation, search


Summary

The OP Find DAT traverses the component hierarchy starting at one component and looking at all nodes within that component, and outputs a table with one row per node that matches criteria the user chooses. For example, the criteria could be all Ramp TOPs, or all nodes whose name starts with “wave”, or all nodes with the Clone parameter set to “master1”, or all Geometry components with a tag called “emitter”.

The criteria can limited to include only nodes of certain families, or certain operator types. It can filter on matching its path, certain parameters containing certain values (both constant and expressions), comments, tags, or the content of a DAT containing certain strings.

You can also cause the DAT to only look to some depth of the hierarchy from the specified component, such as 2 levels down, or limitless.

Criteria can be case-sensitive or not, but case-sensitive On or Off applies to all criteria in the OP Find DAT.

Furthermore you can exclude some nodes using more specialized criteria by returning a True of False in a callback contained in the attached callback DAT.

With the Combine Filters Menu (Any or All, Default is All), you can do an "or" or "and" on the pattern matching criterea.

It also takes an optional DAT containing a list of operators (eg, another OP Find DAT) which can be used to chain filters.

Output Columns

There is a variety of columns that you can select from including name, id, paths, type and tags. (id is a member of the operator, which is an integer unique to the node, and doesn't change during the running of the TouchDesigner process.)

You can also output custom columns by defining the column names in the callback DAT, and filling in the column cells via another function in the callback DAT. For example, you can output a custom column which is the tx parameter value of the node.

You can control when the OP Find DAT cooks. Normally it cooks whenever any of the nodes in the specified hierarchy changes. Using the Active Cook menu parameter, you can also force-cook it every frame, or turn off cooking entirely. You can also click the Pulse parameter on Active Cook in order to force-cook it once, or do the equivalent using the node.cookpulse.pulse() python call.

Instead of being give the path to a component to start at, the OP Find DAT can take an input DAT containing a pre-generated list of paths to nodes to start from, and merge the results of each input line together in the output. To use this, the input DAT should contain the node “id” as the first column, which can be generated with another OP Find DAT with the Column called “ID” turned on.

For example, say you first list all components that are panels, then you separate into groups based on type or Clone parameter. The first OP Find DAT pre-filters a huge hierarchy to a small fraction of the nodes, the subsequent OP Find DATs are operating on simpler sets to eliminate a lot of checking and cooking.

Refer to Help -> Operator Snippets.

See also: Script DAT

PythonIcon.pngopfindDAT_Class


Parameters - Component Page

Active Cook activecook - - Determines when to cook the DAT.

Cook Pulse cookpulse -

Component component - The path to the component where the search starts from.

Minimum Depth mindepth - Set a minmum depth for the sub-components the OP Find DAT should recursively search through.

Limit Max Depth limitmaxdepth - Turns on the Maximum Depth parameter to limit searching through sub-components. Turning this toggle off will search through all sub-networks.

Maximum Depth maxdepth - Set the maximum depth for the sub-components the OP Find DAT should recursively search through.



Parameters - Families Page

The page of parameters determines which operator families are included in the search.

Object COMPs objects -

Panel COMPs panels -

Other COMPs other -

TOPs tops -

CHOPs chops -

SOPs sops -

MATs mats -

DATs dats -



Parameters - Filters Page

Case Sensitive casesensitive - Use case sensitivity in all pattern matching below.

Combine Filters combinefilters - - Combine 'All' or 'Any' of the filters below to get a match.

  • All all -
  • Any any -

Name namefilter - Use the operator's names like 'wave1', 'wave2', etc.

Type typefilter - Use names like waveCHOP and panelexecuteDAT. Look at the column Type to see the syntax.

Path pathfilter -

Parent Path (relative) parentfilter -

Exclude Path (relative) excludefilter -

Comment commentfilter -

Tags tagsfilter -

DAT Text textfilter -

Par Name parnamefilter -

Par Value parvaluefilter -

Par Expression parexpressionfilter -

Par Non-Default Only parnondefaultonly - Only match with parameters that are non-default values.



Parameters - Columns Page

ID idcol - An integer that uniquely defines the node in this process. It's the same number for the duration of the process, but may be different when you run the process again.

Name namecol -

Type typecol -

Path pathcol -

Relative Path relpathcol -

Parent Path parentpath -

Depth depthcol -

Cook Times cooktimescol -

Tags tagscol -



Parameters - Callbacks Page

Callbacks DAT callbacks - Path to a DAT containing callbacks for each event received. See opfindDAT_Class for usage.

Convert Bool to Int convertbool - For boolean logic values, the value will be '1' or '0'. When this parameter is Off, they will be 'True" or 'False'.

Convert None to Empty convertnone - For 'None' values, the value will be converted to Empty.



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.



DATs
Art-Net • CHOP Execute • CHOP to • Clip • Convert • DAT•  Execute • DAT xport• Error • EtherDream • Evaluate • Examine • Execute • FIFO • File In • File Out • Folder • In • Indices • Info • Insert • Introduction To DATs id• Keyboard In • Merge • MIDI Event • MIDI In • Monitors • MQTT Client • Multi Touch In • Null • OP Execute • OP Find • OSC In • OSC Out • Out • Panel Execute • Parameter Execute • Perform • Render Pick • Reorder • Script • Select • Serial • 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 • 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.

Cloning can make multiple components match the contents of a master component. A Component whose Clone parameter is set will be forced to contain the same nodes, wiring and parameters as its master component. Cloning does not create new components as does the Replicator COMP.

To re-compute the output data of the Operators. An operator cooks when (1) its inputs change, (2) its Parameters change, (3) when the timeline moves forward in some cases, or (4) Scripting commands are run on the node. When the operator is a Gadget, it also cooks when a user interacts with it. When an operator cooks, it usually causes operators connected to its output to re-cook. When TouchDesigner draws the screen, it re-cooks all the necessary operators in all Networks, contributing to a frame's total "cook time".

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.

An Operator Family that contains its own Network inside. There are twelve 3D Object Component and eight 2D Panel Component types. See also Path.

The component types that are used to render 3D scenes: Geometry Component contain the 3D shapes to render, plus Camera, Light, Ambient Light, Null, Bone, Handle and other component types.

The location of an operator within the TouchDesigner environment, for example, /geo1/torus1, a node called torus1 in a component called geo1. The path / is called Root. To refer instead to a filesystem folder, directory, disk file or http: address, see Folder.

A text string that contains data (string, float, list, boolean, etc.) and operators (+ * < etc) that are evaluated by the node's language (python or Tscript) and returns a string, float list or boolean, etc. Expressions are used in parameters, DATs and in scripts.

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.