The methods presented below can be used to sort items in lists. The items may be ordered or rearranged, but all items will remain part of the list. See the how-to Filter lists for methods to extract and filter items.
Sort items in a list (Sort List)
The component Sort ListInputs Keys (K) List of sortable keys Values A (A) Optional list of values to sort synchronously Outputs Keys (K) Sorted keys Values A (A) Synchronous values in A
We can also add additional lists, besides input A, via ZUI. The attached lists will be sorted synchronously to the provided keys.
We can, for example, retrieve the length of lines, add them to Sort ListInputs Keys (K) List of sortable keys Values A (A) Optional list of values to sort synchronously Outputs Keys (K) Sorted keys Values A (A) Synchronous values in A
Shuffle order (Jitter)
The component JitterInputs List (L) Values to shuffle Jitter (J) Shuffling strength. (0.0 = no shuffling, 1.0 = complete shuffling) Seed (S) Seed of shuffling engine Outputs Values (V) Shuffled values Indices (I) Index map of shuffled items
Reverse order (Reverse List)
The component Reverse ListInputs List (L) Base list Outputs List (L) Reversed list
We can also use a shortcut for this function: We can right-click an input or output grip of a component and then select Reverse to achieve the same. This will be indicated by the corresponding icon next to the grip.
Offset items in a list (Shift List)
The component Shift ListInputs List (L) List to shift Shift (S) Shift offset Wrap (W) Wrap values Outputs List (L) Shifted list