Houdini 22.0 Nodes APEX nodes

component::ConnectPorts

Wires or unwires graph ports from a table of connection entries.

On this page
Since 22.0

Each entry in addconnections describes one source port and the set of target ports it drives. Nodes are named with APEX path patterns rather than literal names, and those patterns are rewritten before they are resolved. This lets a single authored table be replayed across several segments and mirrored onto the opposite side, instead of being duplicated per limb.

Two independent rewrites are applied to every pattern, in this order:

This node handles one segment per cook. Looping over the segments is the caller’s job — the rig component resolves its segment list with component::FindSegments and cooks this node once per segment. Mirroring, by contrast, is handled here: when mirror is on, every entry is applied twice, once exactly as authored and once with the names mirrored.

Each Dict in addconnections is one multiparm instance and is read with the literal # instance token:

Key

Type

Description

connectsrcnode#

String

Pattern for the source node. Only the first match is used. Leave it empty for a target-only entry.

connectsrcport#

String

Name of the source output port, without the [out] qualifier.

connectsrcalias#

String

Sub-port alias when the source port is variadic. Empty wires the port itself.

connecttargetnode#

String

Pattern for the target nodes. Every match is wired, not just the first.

connecttargetport#

String

Name of the target input port, without the [in] qualifier.

connecttargetalias#

String

Sub-port alias when the target port is variadic.

disconnectsrc#

bool

Drop every wire on the source port and make no new connection.

disconnecttarget#

bool

Drop every wire on the target ports and make no new connection.

Note

disconnectsrc# and disconnecttarget# are mutually exclusive. Each one is a standalone disconnect that makes the other side of the entry irrelevant, and neither creates a connection. The rig component enforces this by disabling the opposite side of the entry.

An entry whose node pattern or port name is empty is skipped rather than reported as an error, so one table can be shared across segments that do not all contain the same nodes.

Inputs

graph: ApexGraphHandle

The graph whose ports are wired or unwired.

addconnections: DictArray

One Dict per connection entry. See the key table above.

left: String

A wildcard pattern for the side the table is authored on, for example, L_*. It is matched against the whole node name, so a bare L_ silently matches nothing. Used only by the mirror rename, and ignored when mirror is off.

origsegment: String

The literal placeholder text to replace in the authored patterns, for example, {segment}. Leaving this or segment empty skips the substitution.

segment: String

The literal text substituted for origsegment, that is, the one segment this cook builds. Leaving it empty skips the substitution.

mirror: Bool

When on, applies every entry twice: once exactly as authored, then again with the names renamed from left to right. When off, only the authored side is applied.

Outputs

graph: ApexGraphHandle

The graph with the connections added or removed.

See also

APEX nodes