Skip to content

← special_purpose package

OutputSlot

A placeholder node in a subgraph that will be merged into an ambient graph.

The node represents the place where a numbered output goes from the subgraph out to the ambient graph, and is used to designate edges from specific nodes of he subgraph graph to specific destinations in the ambient graph. Two scenarios in which this node can occur are: 1) when creating a graph using the Create Graph (Graph Template) node. In this context the overall template is a static literal graph which may have slots for subgraphs that are computed at runtime; these slots are indicated with Template Slot nodes in the graph, and they are to be substituted by the computed subgraphs. In order to determine precisely how the subgraph should connect with the ambient graph (from what nodes and ports the edges go out, and what nodes/ports those edges go to), the template placeholder can have one or more numberd out-edges that can go anywhere in the ambient graph. When the template placeholder is replaced by the computed graph, it is still necessary to indiate from what nodes/ports inside that graph these out-edges emanate. This is done by placing a numbered Next Node Placeholder node in the computed graph (the number pairs with the number of the out-edge of the template placeholder). Once inserted, the Output Slot node disappears, but the edge going to it continues on to the destination node/edge of the out-edge of the template placeholder. 2) when using the graph_mode() context manager in a Python script to create graphs using a define-by-run approach. In this context, any node invocation (e.g., MyNode(...)() will create a a graph that has a Output Slot node in it that indicates the connection point for the next node in the graph. When the result of MyNode(...)() is then passed to another node invocation (e.g., MyOtherNode()(...)), the Output Slot node is replaced by that other node, and the result is a two-node graph. This process can be repeated to create larger graphs (generally tree-shaped, although additional edges can be inserted explicitly to it). See also the Input Slot node for a corresponding node for designating inbound edges of the subgraph. Version 1.1.0

Ports/Properties

data

Outgoing data.

  • verbose name: Data
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

number

Number of the output slot. In places where there can be multiple such nodes, this one indicates the node's place in the ordering (counting from 1).

  • verbose name: Number
  • default value: 1
  • port type: IntPort
  • value type: int (can be None)

usage

Usage of the output slot. Slots can be used in two scenarios: for use with Create Graph (Graph Template) nodes, or for internal use by with the Python-side graph_mode() context manager. The latter is used for creating graphs using a define-by-run approach, where the graph is created on the fly as the nodes are executed in Python code. Do not manually set this to "python graph mode".

  • verbose name: Usage (Reserved)
  • default value: graph template
  • port type: EnumPort
  • value type: str (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

  • verbose name: Set Breakpoint (Debug Only)
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

  • verbose name: Metadata
  • default value: {}
  • port type: DictPort
  • value type: dict (can be None)