Houdini 20.5 Nodes APEX nodes

graph::FindOrAddPort

Finds or adds a port or subport on an APEX node based on a port name.

On this page
Since 20.0

Finds or adds a port or subport on an APEX node based on the portname. If the port name is unique on the node, the port name can be used directly in portname. If the port name has a matching input or output port with the same name, it is important to specify in the portname whether you want to query the input or output port.

Action

portname

Query an input port

<my_port>[in]

Query an output port

<my_port>[out]

Specify subport names in square brackets “[]” after the port name

<my_port>[<my_subport>]

Specify input/output ports with [in] or [out] after the subport name

<my_port>[<my_subport>][in]

If the port cannot be found or added, an invalid port ID is returned. The Convert<ApexPortID, Bool> node can be used to determine whether or not a port ID is valid.

The graph ports of this node are in-place ports, which means that the graph is updated without creating a copy.

Inputs

*graph: ApexGraphHandle Required

The graph that contains the port to find.

nodeid: ApexNodeID

The node with the port to add or find.

portname: String

The port to add or find.

Outputs

*graph: ApexGraphHandle

The graph with the found or added port.

portid: ApexPortID

The unique port identifier, created at run time, that represents the port found or added in the graph.

See also

APEX nodes