Houdini 20.5 Nodes APEX nodes

graph::AddNode

Adds a node to an APEX graph.

On this page
Since 20.0

Adds a node with a given name and callback to an APEX graph. Optionally, the node can be further configured with a position in the graph, a color, parameters for the node’s ports, and additional metadata. The metadata for a node can be stored either in a dictionary called properties, or as tags in the form of a string array.

Warning

If the graph already has a node with the same name as name, the new node is still added, but there are now two nodes with the same name in the graph, which could cause issues with finding and filtering nodes. If you are not sure whether the graph already has an existing node with the same name, use graph::FindOrAddNode instead.

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 the node is added to.

name: String

The name of the node to add to the graph.

callback: String

The type of the node to add to the graph.

pos: Vector3

The position of the new node in the graph layout.

color: Vector3

The color of the new node.

parms: Dict

The parameters to set for the node’s ports. The key-value pairs of the dictionary entries are:

  • key: port name on the new node

  • value: parameter value for the port

tags: StringArray

Strings values associated with the new node. Tags can be used to filter nodes independently from the name.

properties: Dict

The custom metadata dictionary for the new node.

Outputs

*graph: ApexGraphHandle

The updated graph with the added node.

nodeid: ApexNodeID

The node ID of the newly created node. This ID is the identifier for the node within the graph.

See also

APEX nodes