CastToGraph¶
Cast an object of unknown type to type graph, or otherwise pass out None if the object was not a graph.
This node is useful when some node returns a graph value, but the type information that this is a graph is lost, for example if we have to pass the value through a generic node like Passthrough, IfElse, or Call. Now we have an object of unknown type, and let's suppose we want to pass it to a node that accepts as graph. In almost all circumstances, such a node will capture the preceding nodes that are wired into it into a verbatim graph, which is then evaluated. However, we would like to hand that node a graph that we already have as a plain value instead of our input being captured into a graph. By using this node we make clear that our value is of type Graph, namely the output port of this node has type graph. If we now connect this node to to the graph-accepting node, we have an edge going from type graph to type graph, and this is an ordinary value-passing scenario (solid edge in some GUIs), as opposed to a graph-capturing scenario (dotted edge). Version 1.0.0
Ports/Properties¶
input¶
Input value.
- verbose name: Input
- default value: None
- port type: DataPort
- value type: object (can be None)
- data direction: IN
graph¶
Input graph or None.
- verbose name: Graph
- default value: None
- port type: GraphPort
- value type: Graph
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)