GraphNode

    Category: Core

    A GraphNode is a container with several input and output slots allowing connections between GraphNodes. Slots can have different, incompatible types.

    Properties

    Methods

    void ( )
    voidclear_slot ( idx )
    Color ( int idx )
    get_connection_input_count ( )
    get_connection_input_position ( idx )
    int ( int idx )
    get_connection_output_color ( idx )
    int ( )
    Vector2 ( int idx )
    get_connection_output_type ( idx )
    Color ( int idx ) const
    get_slot_color_right ( idx ) const
    int ( int idx ) const
    get_slot_type_right ( idx ) const
    bool ( int idx ) const
    is_slot_enabled_right ( idx ) const
    voidset_slot ( idx, bool enable_left, type_left, Color color_left, enable_right, int type_right, color_right, Texture custom_left=null, custom_right=null )
    StyleBoxbreakpoint
    close
    Colorclose_color
    close_offset
    StyleBoxcomment
    commentfocus
    StyleBoxdefaultfocus
    defaultframe
    StyleBoxframe
    port
    intport_offset
    position
    Textureresizer
    selectedframe
    intseparation
    title_color
    Fonttitle_font
    title_offset

    Signals

    • close_request ( )

    Signal sent on closing the GraphNode.


    Signal sent when the GraphNode is dragged.


    • offset_changed ( )

    Signal sent when the GraphNode is moved.


    • raise_request ( )

    Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode.


    Enumerations

    enum Overlay:

    • OVERLAY_DISABLED = 0
    • OVERLAY_BREAKPOINT = 1
    • OVERLAY_POSITION = 2

    Property Descriptions


    • offset
    Setterset_offset(value)
    Getterget_offset()

    The offset of the GraphNode, relative to the scroll offset of the GraphEdit. Note that you cannot use position directly, as is a Container.


    • overlay
    Setterset_overlay(value)
    Getterget_overlay()


    • selected
    Setterset_selected(value)
    Getteris_selected()

    Setterset_show_close_button(value)
    Getteris_close_button_visible()

    • title

    Method Descriptions

    • void clear_all_slots ( )

    Disable all input and output slots of the GraphNode.


    • void clear_slot ( int idx )

    Disable input and output slot whose index is ‘idx’.


    • get_connection_input_color ( int idx )

    Returns the color of the input connection ‘idx’.


    Returns the number of enabled input slots (connections) to the GraphNode.


    • get_connection_input_position ( int idx )

    Returns the position of the input connection ‘idx’.


    • get_connection_input_type ( int idx )

    Returns the type of the input connection ‘idx’.


    • get_connection_output_color ( int idx )

    • get_connection_output_count ( )

    Returns the number of enabled output slots (connections) of the GraphNode.


    • Vector2 get_connection_output_position ( idx )

    Returns the position of the output connection ‘idx’.


    • int get_connection_output_type ( idx )

    Returns the type of the output connection ‘idx’.


    • Color get_slot_color_left ( idx ) const

    Returns the color set to ‘idx’ left (input) slot.


    • Color get_slot_color_right ( idx ) const

    Returns the color set to ‘idx’ right (output) slot.


    • int get_slot_type_left ( idx ) const

    Returns the (integer) type of left (input) ‘idx’ slot.


    • int get_slot_type_right ( idx ) const

    Returns the (integer) type of right (output) ‘idx’ slot.


    • bool is_slot_enabled_left ( idx ) const

    • bool is_slot_enabled_right ( idx ) const

    Returns if right (output) slot ‘idx’ is enabled, otherwise.


    • void set_slot ( int idx, enable_left, int type_left, color_left, bool enable_right, type_right, Color color_right, custom_left=null, Texture custom_right=null )