|On this page|
This node reduces the values in an array attribute down to a single value. For example, you can use this node to find the sum of all values in an array, the largest or smallest value, or the most common value. This node operates on float, integer, string, and file attribute arrays, although some reduction operations like Average and Sum only work on numeric attribute types.
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.
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.
When on, the node only reduces the values in the array attributes (from the Number of Reductions multiparm list) if they come from work items where this parameter’s expression evaluates to a non-zero value. For example, a value of 0 means don’t apply the operation, a value of 1 means reduce the array attributes on all incoming work items, and the expression
@pdg_index > 3 means reduce only the array attributes on work items whose indexes are greater than 3.
On Missing Attributes
Determines how the node handles cases where an input work item is missing an array attribute from the Number of Reductions multiparm list.
Missing attributes are silently ignored.
Missing attributes are ignored, but a warning is added to the node.
Missing attributes produce an error and cause the node to fail.
Number of Reductions
Multiparm that determines the number of reduction operations to perform.
The name of the array attribute to apply the operation to.
The reduction operation to apply to the array attribute.
When on, the node treats the array attribute as an array of value vectors with the specified length instead of as a single array of values. For example, if Stride is 3, then the reduction operation would be applied as if the array attribute contained a list of vectors with 3 components each.