Houdini 21.0 Nodes TOP nodes

Attribute Classify TOP node

Creates a new attribute to classify work items by their unique attribute values

On this page
Since 21.0

This node creates a new integer class attribute for each unique combination of existing attributes on the input work items. For example, if you have 100 input work items with a scale and color attribute, you can use this node to identify each distinct combination of scale and color.

TOP Attributes

This node create a single attribute named class by default. The name of the attribute can be changed using the Class Attribute parameter.

class

int

An integer that corresponds to the class for the work item. The class value starts at 0, and increases for reach unique input attribute configuration.

Parameters

Create

Generate When

Determines when this node will generate work items. You should generally leave this set to “Automatic” unless you know the node requires a specific generation mode, or that the work items need to be generated dynamically.

All Upstream Items are Generated

This node will generate work items once all of the input nodes have generated their work items.

All Upstream Items are Cooked

This node will generate work items once all of the input nodes have cooked their work items.

Each Upstream Item is Cooked

This node will generate work items each time a work item in an input node is cooked.

Automatic

The generation mode is selected based on the generation mode of the input nodes. If any of the input nodes are generating work items when their inputs cook, this node will be set to Each Upstream Item is Cooked. Otherwise, it will be set to All Upstream Items are Generated.

Classify When

When on, set it to an expression that’s evaluated for each upstream work item. Work items will only be considered when creating class attributes if the expression evaluates to a non-zero value.

Classify

Class Attribute

The name of the integer attribute that’s created to store the class number for each work item.

Create Class For

Determines how the attributes used for classifiation should be grouped.

Each Matching Attribute

Each classification attribute is processed individually. A work item can be in multiple classes, one for each attribute value. For example, if there are four input work items with attributes a and b that are being classified, then each unique value for either a or b results in a new class.

a

b

class

0

0

0, 1

0

1

0, 2

4

0

3, 1

4

1

3, 2

All Matching Attributes

All classification attributes are processed as a single unique combination. A work item is always in exaclty one distinct class.

a

b

class

0

0

0

0

1

1

4

0

2

4

1

3

On No Match

Determines how work items that are missing the classification attributes should be handled.

Exclude Work Item

The work item is excluded completely, as if it had been filtered out.

Exclude Class Attribute

The work item passes through the node without having the Class Attribute added to it.

Use Default Class

The work item is assigned to the Default Class.

Use Unmatched Class

A new class is created at the end of the class numbers to hold all unmatched work items.

Default Class

When On No Match is set to Use Default Class, specifies the default class number for unmatched work items.

Attributes

Specify Names Using

Determines how the list of attribute names used for classification is specified.

Attribute Patrern

Attribute names are specified using an attribute pattern.

String Attribute

Attribute names are specfied as a list in an existing string attribute, for example wedgeattribs.

Attribute List

Attribute names are specified using a multi-parm list.

On Missing Attribute

Determines whether a missing attribute should cause the node to report an error, a warning, or silently be ignored.

Attribute Pattern

When Specify Names Using is set to Attribute Pattern, specifies the pattern to use for generating the list of attribute name(s) for classification.

Attribute Name

When Specify Names Using is set to String Attribute, specifies the name of the string attribute that contains one or more attribute name to use for classification.

Attribute Names

When Specify Names Using is set top Attribute List, specifies the number of attributes in the list.

Attribute Name

An attribute name list entry.

See also

TOP nodes