Houdini 20.5 Nodes APEX nodes

graph::IsConnected

Determines whether an input port to a subgraph or subnet is connected.

On this page
Since 20.0

This node is designed to be used within subgraphs and subnets. It determines whether a given input port of the subgraph/subnet is connected (in the parent graph). The connection status can then be used as an input for conditional operations.

The example subnet below has three input ports. Both the add and subtract operations are evaluated in the graph regardless of whether or not the input ports are connected in the parent graph.

Original subnet

If we want the subtract operation to run only if the c port on the input node is connected in the parent graph, the graph::IsConnected node can be used with the conditional IfBegin and IfEnd nodes to achieve this:

Bypass subtract operation if its input is not connected in the parent graph
Third subnet input not connected in parent graph

This allows you to have optional inputs that are only used to run a part of the graph if they are connected.

The input port of this node can be connected to any port type.

Inputs

input: void

The input that is examined for its connection status.

checkdefault: bool

If set to True, the input is also considered to be connected if the corresponding input port in the parent graph is not at the default value.

Outputs

result: Bool

The connection status of the input port. Returns True if the subgraph that contains the input port has a connection for input in the parent graph.

See also

APEX nodes