Cell Class

From Derivative
Revision as of 16:17, 27 September 2017 by Markus Heckmann (talk | contribs)
Jump to navigation Jump to 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]

ownerOP (Read Only):

The OP to which this object belongs.

valvalue :

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

validbool (Read Only):

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

colint (Read Only):

The numeric column of the cell.

rowint (Read Only):

The numeric row of the cell.

Methods[edit]

run(endFrame=False, fromOP=None, , group=None, delayFrames=0, delayMilliSeconds=0, delayRef=me, arg1, arg2...)td.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.

offset(r, c)td.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

TouchDesigner Build: