cell Class

From TouchDesigner Documentation
Revision as of 10:25, 9 August 2017 by Admin (talk | contribs) (Cell Class Auto Create)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


The Cell Class describes the contents of a single cell from a DAT operator table. The DAT Class offers many ways of accessing its individual cells. DAT cells are always internally stored as strings, but may be accessed as numeric values.


Members[edit]

owner(Read Only):

The OP to which this object belongs.

val(Read Only):

Get or set the cell contents, which are always stored as a string value.

valid(Read Only):

True if the referenced cell currently exists, False if it has been deleted.

col(Read Only):

The numeric column of the cell.

row(Read Only):

The numeric row of the cell.

Methods[edit]

offset(r, c):

: -> Cell or None

The cell offset to this cell by the specified amount, or None. r - The number of rows from the cell. Positive values count down, while negative values count up. c - The number of columns from the cell. Positive values count right, while negative values count left. c = op('table1')['March', 'Sales']

d = c.offset(-1, 2) # one row up, two columns right of cell C

run(endFrame=False, fromOP=None, , group=None, delayFrames=0, delayMilliSeconds=0, delayRef=me, arg1, arg2...):

: -> Run

Run the contents of the cell as a script, returning a Run object which can be used to optionally modify its execution. endFrame - (Keyword, Optional) If set to True, the execution will be delayed until the end of the current frame. fromOP - (Keyword, Optional) Specifies an optional operator from which the execution will be run relative to. group - (Keyword, Optional) Can be used to specify a group label string. This label can then be used with the td.runs object to modify its execution. delayFrames - (Keyword, Optional) Can be used to delay the execution a specific amount of frames. delayMilliSeconds - (Keyword, Optional) Can be used to delay the execution a specific amount of milliseconds. This value is rounded to the nearest frame. delayRef - (Keyword, Optional) Specifies an optional operator from which the delay time is derived.

arg - (Optional) Arguments that will be made available to the script in a local tuple named args.

TouchDesigner Build:

{list}

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.