GraphEdit is an area capable of showing various GraphNodes. It manages connection events between them.
GraphEdit manages the showing of GraphNodes it contains, as well as connections and disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits.
Makes possible the connection between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type.
Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type.
Remove all connections between nodes.
Create a connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode. If the connection already exists, no connection is created.
Remove the connection between 'from_port' slot of 'from' GraphNode and 'to_port' slot of 'to' GraphNode, if connection exists.
Return an Array containing the list of connections. A connection consists in a structure of the form {from_slot: 0, from: "GraphNode name 0", to_slot: 1, to: "GraphNode name 1" }
Return true if the 'from_port' slot of 'from' GraphNode is connected to the 'to_port' slot of 'to' GraphNode.
Returns whether it's possible to connect slots of the specified types.
Makes it not possible to connect between two different slot types. The type is defined with the [method GraphNode.set_slot] method.
Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type.
Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type.
Sets the specified [code]node[/code] as the one selected.
- If [code]true[/code], enables disconnection of existing connections in the GraphEdit by dragging the right end.
- The scroll offset.
- The snapping distance in pixels.
- If [code]true[/code], enables snapping.
- The current zoom value.
Signal sent at the beginning of a GraphNode movement.
Signal sent at the end of a GraphNode movement.
Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be created.
Signal sent when a GraphNode is attempted to be removed from the GraphEdit.
Signal sent to the GraphEdit when the connection between 'from_slot' slot of 'from' GraphNode and 'to_slot' slot of 'to' GraphNode is attempted to be removed.
Signal sent when a GraphNode is attempted to be duplicated in the GraphEdit.
Emitted when a GraphNode is selected.
Signal sent when a popup is requested. Happens on right-clicking in the GraphEdit. 'p_position' is the position of the mouse pointer when the signal is sent.