First Valid

 
 
 

Categories

  • Execution

Description

The First Valid node passes through the data of the first input port connected to a tree branch that is not in error. All other input ports are ignored.

Often when designing ICE trees and compounds, you want a fallback case if something is not working. For example, you want to use the point normals in your calculations in a compound. However, you might want the compound you're building to work for point clouds as well. Since point clouds do not have point normals you might like to use an attribute called "Direction" instead. And if there is no such attribute you might want to default to a zero vector. To do this, connect the graphs that implement each of these cases. The first case should be connected to the first port. The first fallback should be to the second port, etc.

First Valid only considers graph errors, such as if an attribute or object does not exist or is of the wrong type. The node does not consider runtime errors such as a division by zero. To handle runtime errors, use graph logic such as If nodes.

The data types of all inputs must be defined and must be compatible. If necessary, you can force an input data type to be defined by plugging it through a node from the Constant category such as Scalar or 3D Vector.

First Valid always considers execute-type connections to be valid, and will always use the first one connected.

Ports

Inputs

In

The data of the first of these ports that is valid is passed to the output.

Outputs

Out

The data of the first valid input port.

Creative Commons License Except where otherwise noted, this work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License