Reorder CHOP

From TouchDesigner 099 Wiki


The Reorder CHOP re-orders the first input CHOP's channels by numeric or alphabetic patterns. Either a channel pattern specifies the new order, or a number sequence specifies the new order.

If the second input, the Order Reference is present, the Numeric Pattern and Character Pattern are ignored, and the first input CHOP's channels are reordered to match as well as possible the reference CHOP's. In this case, Method is not used.

Channel values are never affected.

PythonIcon.png reorderCHOP_Class


Method - There are three different reordering methods. You can enter a Numeric Pattern, a Character Pattern, or use an optional second input CHOP as an order reference.

Numeric Pattern - This reorders the channels by channel number. Normally the index order is 0,1,2,3... etc.. The first channel is at index 0. Standard numeric patterns are allowed such as "0-6:1,2" or "!*:1,3".

Character Pattern - This reorders the channels by channel name. Standard character patterns are allowed such as "ch[XYZ]" or "chan[1-15:2,5]" or "chan? ch*". See Scope and Channel Name Matching Options p. 102 in the section, Standard Options of CHOPs.

Remaining Position - Channels that do not match are called "remaining" and can also be ordered: they can be placed at the At Beginning or At Ending (in reference to the position of the matched channels).

Remaining Order - The channels that did not match can have the Same as Input order, or can be sorted AlphaNumerically.


All examples assume the Remaining Position is At Ending and the Remaining Order is Same as Input

Input Numeric Pattern Result
A B C D 3 2 1 0 D C B A
C B D A 3 1 A B C D
A B C D E [1-5:2] A C E B D
A1 A2 B1 B2 *1 *2 A1 B1 A2 B2
c4 c2 c3 c1 c[1-4] c1 c2 c3 c4

Standard Options and Local Variables

There are no local variables.