Houdini 18.5 Nodes TOP nodes

Sort TOP node

Sorts work items by a list of attributes

On this page
Since 17.5

This node reorders input work items based on one more attribute values. The attributes are used to create a tuple that identifies the work item and determines its new index. The ordering of values in the Attributes to Sort By multiparm determine the order that attributes are inserted into the tuple.

For example, consider 3 work item with the buildingnum and floornum attributes. The first two work items both have buildingnum = 2, and floornum = 0 and floornum = 1 respectively. The third work item has buildingnum = 0 and floornum = 0. By specifying "buildingnum" as the first attribute to sort by and "floornum" as the second, the items would would be sorted in the order they were originally in. If "floornum" was put first and "buildingnum" second, the items would be reorder so that the new order is 3, 1, 2 instead.

Parameters

Sort Direction

Determines if work items should be sorted in ascending or descending order

Attributes to Sort By

The number of attribute conditions.

Name

The name of the attribute.

Type

The type of the attribute, either Float, Integer, or String.

Index

This parameter determines the attribute index that the condition should check.

Examples

Sort Example for Sort TOP node

This example demonstrates how to use the Sort TOP to reorder work items based on an attribute value.

See also

TOP nodes