Sort DAT

From TouchDesigner 099 Wiki

Summary

The Sort DAT will sort table DAT data by row or column.

PythonIcon.png sortDAT_Class

Parameters

Sort /sortmethod - Determines how the table will be sorted.

  • Rows (Specify Column Name) - Sort rows using the column specified under the Name parameter.
  • Rows (Specify Column Index) - Sort rows using the column specified under the Index parameter.
  • Rows (Preserve Input Order) - Uses the current ordering of the input. This sorting allows parameters such as Preserve First, Unique Output, and Reverse Output to be applied to the original input.
  • Columns (Specify Row Name) - Sort columns using the row specified under the Name parameter.
  • Columns (Specify Row Index) - Sort columns using the row specified under the Index parameter.
  • Columns (Preserve Input Order) - Uses the current ordering of the input. This sorting allows parameters such as Preserve First, Unique Output, and Reverse Output to be applied to the original input.

Name /name - When using Sort Specify Row/Column Name, specify the name in this parameter. If the sort name does not find a match, the output will be unsorted.

Index /index - When using Sort Specify Row/Column Index, specify the index in this parameter. If the sort index is -1 or out of bounds, the output will be unsorted.

Order /order - Determines the type of sorting.

  • Alphabetical - Use alphabetical sorting. Numbers are treated as characters, sorted by their ASCII values.
  • Alphabetical with Numbers - Use alphanumerical sorting.
  • Numbers - Use numerical sorting. Characters are all treated as 0, incoming order is preserved.
  • Random - Randomly sorts the table, uses random Seed parameter below.

Seed /seed - The random seed when Sort Order is set to Random.

Ignore Case /ignorecase - Ignores case sensitivity when Sort Order is set to Alphabetical or Alphabetical with Numbers.

Preserve First /preservefirst - Does not resort the first row or column (depending if Sort is set to Rows or Columns).

Unique Output /unique - Remove duplicate rows/column entries in the sorted row/column.

Reverse Output /reverse - Reverses the sort order.