class_graphedit.rst 84 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/GraphEdit.xml.
  6. .. _class_GraphEdit:
  7. GraphEdit
  8. =========
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  11. An editor for graph-like structures, using :ref:`GraphNode<class_GraphNode>`\ s.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **GraphEdit** provides tools for creation, manipulation, and display of various graphs. Its main purpose in the engine is to power the visual programming systems, such as visual shaders, but it is also available for use in user projects.
  16. \ **GraphEdit** by itself is only an empty container, representing an infinite grid where :ref:`GraphNode<class_GraphNode>`\ s can be placed. Each :ref:`GraphNode<class_GraphNode>` represents a node in the graph, a single unit of data in the connected scheme. **GraphEdit**, in turn, helps to control various interactions with nodes and between nodes. When the user attempts to connect, disconnect, or delete a :ref:`GraphNode<class_GraphNode>`, a signal is emitted in the **GraphEdit**, but no action is taken by default. It is the responsibility of the programmer utilizing this control to implement the necessary logic to determine how each request should be handled.
  17. \ **Performance:** It is greatly advised to enable low-processor usage mode (see :ref:`OS.low_processor_usage_mode<class_OS_property_low_processor_usage_mode>`) when using GraphEdits.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  24. | :ref:`bool<class_bool>` | clip_contents | ``true`` (overrides :ref:`Control<class_Control_property_clip_contents>`) |
  25. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`connection_lines_antialiased<class_GraphEdit_property_connection_lines_antialiased>` | ``true`` |
  27. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  28. | :ref:`float<class_float>` | :ref:`connection_lines_curvature<class_GraphEdit_property_connection_lines_curvature>` | ``0.5`` |
  29. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`connection_lines_thickness<class_GraphEdit_property_connection_lines_thickness>` | ``4.0`` |
  31. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  32. | :ref:`FocusMode<enum_Control_FocusMode>` | focus_mode | ``2`` (overrides :ref:`Control<class_Control_property_focus_mode>`) |
  33. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  34. | :ref:`GridPattern<enum_GraphEdit_GridPattern>` | :ref:`grid_pattern<class_GraphEdit_property_grid_pattern>` | ``0`` |
  35. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  36. | :ref:`bool<class_bool>` | :ref:`minimap_enabled<class_GraphEdit_property_minimap_enabled>` | ``true`` |
  37. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  38. | :ref:`float<class_float>` | :ref:`minimap_opacity<class_GraphEdit_property_minimap_opacity>` | ``0.65`` |
  39. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  40. | :ref:`Vector2<class_Vector2>` | :ref:`minimap_size<class_GraphEdit_property_minimap_size>` | ``Vector2(240, 160)`` |
  41. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  42. | :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` | :ref:`panning_scheme<class_GraphEdit_property_panning_scheme>` | ``0`` |
  43. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`right_disconnects<class_GraphEdit_property_right_disconnects>` | ``false`` |
  45. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  46. | :ref:`Vector2<class_Vector2>` | :ref:`scroll_offset<class_GraphEdit_property_scroll_offset>` | ``Vector2(0, 0)`` |
  47. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`show_arrange_button<class_GraphEdit_property_show_arrange_button>` | ``true`` |
  49. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  50. | :ref:`bool<class_bool>` | :ref:`show_grid<class_GraphEdit_property_show_grid>` | ``true`` |
  51. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  52. | :ref:`bool<class_bool>` | :ref:`show_grid_buttons<class_GraphEdit_property_show_grid_buttons>` | ``true`` |
  53. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  54. | :ref:`bool<class_bool>` | :ref:`show_menu<class_GraphEdit_property_show_menu>` | ``true`` |
  55. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`show_minimap_button<class_GraphEdit_property_show_minimap_button>` | ``true`` |
  57. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  58. | :ref:`bool<class_bool>` | :ref:`show_zoom_buttons<class_GraphEdit_property_show_zoom_buttons>` | ``true`` |
  59. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`show_zoom_label<class_GraphEdit_property_show_zoom_label>` | ``false`` |
  61. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  62. | :ref:`int<class_int>` | :ref:`snapping_distance<class_GraphEdit_property_snapping_distance>` | ``20`` |
  63. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  64. | :ref:`bool<class_bool>` | :ref:`snapping_enabled<class_GraphEdit_property_snapping_enabled>` | ``true`` |
  65. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  66. | :ref:`float<class_float>` | :ref:`zoom<class_GraphEdit_property_zoom>` | ``1.0`` |
  67. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  68. | :ref:`float<class_float>` | :ref:`zoom_max<class_GraphEdit_property_zoom_max>` | ``2.0736`` |
  69. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  70. | :ref:`float<class_float>` | :ref:`zoom_min<class_GraphEdit_property_zoom_min>` | ``0.232568`` |
  71. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  72. | :ref:`float<class_float>` | :ref:`zoom_step<class_GraphEdit_property_zoom_step>` | ``1.2`` |
  73. +----------------------------------------------------+--------------------------------------------------------------------------------------------+---------------------------------------------------------------------------+
  74. .. rst-class:: classref-reftable-group
  75. Methods
  76. -------
  77. .. table::
  78. :widths: auto
  79. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`_get_connection_line<class_GraphEdit_private_method__get_connection_line>`\ (\ from_position\: :ref:`Vector2<class_Vector2>`, to_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| |
  81. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`bool<class_bool>` | :ref:`_is_in_input_hotzone<class_GraphEdit_private_method__is_in_input_hotzone>`\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |
  83. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`bool<class_bool>` | :ref:`_is_in_output_hotzone<class_GraphEdit_private_method__is_in_output_hotzone>`\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |
  85. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`bool<class_bool>` | :ref:`_is_node_hover_valid<class_GraphEdit_private_method__is_node_hover_valid>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |virtual| |
  87. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | |void| | :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |
  89. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | |void| | :ref:`add_valid_left_disconnect_type<class_GraphEdit_method_add_valid_left_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) |
  91. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | |void| | :ref:`add_valid_right_disconnect_type<class_GraphEdit_method_add_valid_right_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) |
  93. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | |void| | :ref:`arrange_nodes<class_GraphEdit_method_arrange_nodes>`\ (\ ) |
  95. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | |void| | :ref:`attach_graph_element_to_frame<class_GraphEdit_method_attach_graph_element_to_frame>`\ (\ element\: :ref:`StringName<class_StringName>`, frame\: :ref:`StringName<class_StringName>`\ ) |
  97. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | |void| | :ref:`clear_connections<class_GraphEdit_method_clear_connections>`\ (\ ) |
  99. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`connect_node<class_GraphEdit_method_connect_node>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |
  101. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | |void| | :ref:`detach_graph_element_from_frame<class_GraphEdit_method_detach_graph_element_from_frame>`\ (\ element\: :ref:`StringName<class_StringName>`\ ) |
  103. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | |void| | :ref:`disconnect_node<class_GraphEdit_method_disconnect_node>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |
  105. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | |void| | :ref:`force_connection_drag_end<class_GraphEdit_method_force_connection_drag_end>`\ (\ ) |
  107. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] | :ref:`get_attached_nodes_of_frame<class_GraphEdit_method_get_attached_nodes_of_frame>`\ (\ frame\: :ref:`StringName<class_StringName>`\ ) |
  109. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`Dictionary<class_Dictionary>` | :ref:`get_closest_connection_at_point<class_GraphEdit_method_get_closest_connection_at_point>`\ (\ point\: :ref:`Vector2<class_Vector2>`, max_distance\: :ref:`float<class_float>` = 4.0\ ) |const| |
  111. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_connection_line<class_GraphEdit_method_get_connection_line>`\ (\ from_node\: :ref:`Vector2<class_Vector2>`, to_node\: :ref:`Vector2<class_Vector2>`\ ) |const| |
  113. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_connection_list<class_GraphEdit_method_get_connection_list>`\ (\ ) |const| |
  115. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] | :ref:`get_connections_intersecting_with_rect<class_GraphEdit_method_get_connections_intersecting_with_rect>`\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| |
  117. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`GraphFrame<class_GraphFrame>` | :ref:`get_element_frame<class_GraphEdit_method_get_element_frame>`\ (\ element\: :ref:`StringName<class_StringName>`\ ) |
  119. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | :ref:`HBoxContainer<class_HBoxContainer>` | :ref:`get_menu_hbox<class_GraphEdit_method_get_menu_hbox>`\ (\ ) |
  121. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`bool<class_bool>` | :ref:`is_node_connected<class_GraphEdit_method_is_node_connected>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |
  123. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`bool<class_bool>` | :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |const| |
  125. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | |void| | :ref:`remove_valid_connection_type<class_GraphEdit_method_remove_valid_connection_type>`\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |
  127. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | |void| | :ref:`remove_valid_left_disconnect_type<class_GraphEdit_method_remove_valid_left_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) |
  129. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | |void| | :ref:`remove_valid_right_disconnect_type<class_GraphEdit_method_remove_valid_right_disconnect_type>`\ (\ type\: :ref:`int<class_int>`\ ) |
  131. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | |void| | :ref:`set_connection_activity<class_GraphEdit_method_set_connection_activity>`\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) |
  133. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | |void| | :ref:`set_selected<class_GraphEdit_method_set_selected>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
  135. +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. .. rst-class:: classref-reftable-group
  137. Theme Properties
  138. ----------------
  139. .. table::
  140. :widths: auto
  141. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  142. | :ref:`Color<class_Color>` | :ref:`activity<class_GraphEdit_theme_color_activity>` | ``Color(1, 1, 1, 1)`` |
  143. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  144. | :ref:`Color<class_Color>` | :ref:`connection_hover_tint_color<class_GraphEdit_theme_color_connection_hover_tint_color>` | ``Color(0, 0, 0, 0.3)`` |
  145. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  146. | :ref:`Color<class_Color>` | :ref:`connection_rim_color<class_GraphEdit_theme_color_connection_rim_color>` | ``Color(0.1, 0.1, 0.1, 0.6)`` |
  147. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  148. | :ref:`Color<class_Color>` | :ref:`connection_valid_target_tint_color<class_GraphEdit_theme_color_connection_valid_target_tint_color>` | ``Color(1, 1, 1, 0.4)`` |
  149. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  150. | :ref:`Color<class_Color>` | :ref:`grid_major<class_GraphEdit_theme_color_grid_major>` | ``Color(1, 1, 1, 0.2)`` |
  151. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  152. | :ref:`Color<class_Color>` | :ref:`grid_minor<class_GraphEdit_theme_color_grid_minor>` | ``Color(1, 1, 1, 0.05)`` |
  153. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  154. | :ref:`Color<class_Color>` | :ref:`selection_fill<class_GraphEdit_theme_color_selection_fill>` | ``Color(1, 1, 1, 0.3)`` |
  155. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  156. | :ref:`Color<class_Color>` | :ref:`selection_stroke<class_GraphEdit_theme_color_selection_stroke>` | ``Color(1, 1, 1, 0.8)`` |
  157. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  158. | :ref:`int<class_int>` | :ref:`port_hotzone_inner_extent<class_GraphEdit_theme_constant_port_hotzone_inner_extent>` | ``22`` |
  159. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  160. | :ref:`int<class_int>` | :ref:`port_hotzone_outer_extent<class_GraphEdit_theme_constant_port_hotzone_outer_extent>` | ``26`` |
  161. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  162. | :ref:`Texture2D<class_Texture2D>` | :ref:`grid_toggle<class_GraphEdit_theme_icon_grid_toggle>` | |
  163. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  164. | :ref:`Texture2D<class_Texture2D>` | :ref:`layout<class_GraphEdit_theme_icon_layout>` | |
  165. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  166. | :ref:`Texture2D<class_Texture2D>` | :ref:`minimap_toggle<class_GraphEdit_theme_icon_minimap_toggle>` | |
  167. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  168. | :ref:`Texture2D<class_Texture2D>` | :ref:`snapping_toggle<class_GraphEdit_theme_icon_snapping_toggle>` | |
  169. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  170. | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_in<class_GraphEdit_theme_icon_zoom_in>` | |
  171. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  172. | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_out<class_GraphEdit_theme_icon_zoom_out>` | |
  173. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  174. | :ref:`Texture2D<class_Texture2D>` | :ref:`zoom_reset<class_GraphEdit_theme_icon_zoom_reset>` | |
  175. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  176. | :ref:`StyleBox<class_StyleBox>` | :ref:`menu_panel<class_GraphEdit_theme_style_menu_panel>` | |
  177. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  178. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_GraphEdit_theme_style_panel>` | |
  179. +-----------------------------------+-----------------------------------------------------------------------------------------------------------+-------------------------------+
  180. .. rst-class:: classref-section-separator
  181. ----
  182. .. rst-class:: classref-descriptions-group
  183. Signals
  184. -------
  185. .. _class_GraphEdit_signal_begin_node_move:
  186. .. rst-class:: classref-signal
  187. **begin_node_move**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_begin_node_move>`
  188. Emitted at the beginning of a :ref:`GraphElement<class_GraphElement>`'s movement.
  189. .. rst-class:: classref-item-separator
  190. ----
  191. .. _class_GraphEdit_signal_connection_drag_ended:
  192. .. rst-class:: classref-signal
  193. **connection_drag_ended**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_connection_drag_ended>`
  194. Emitted at the end of a connection drag.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_GraphEdit_signal_connection_drag_started:
  198. .. rst-class:: classref-signal
  199. **connection_drag_started**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, is_output\: :ref:`bool<class_bool>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_connection_drag_started>`
  200. Emitted at the beginning of a connection drag.
  201. .. rst-class:: classref-item-separator
  202. ----
  203. .. _class_GraphEdit_signal_connection_from_empty:
  204. .. rst-class:: classref-signal
  205. **connection_from_empty**\ (\ to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, release_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_connection_from_empty>`
  206. Emitted when user drags a connection from an input port into the empty space of the graph.
  207. .. rst-class:: classref-item-separator
  208. ----
  209. .. _class_GraphEdit_signal_connection_request:
  210. .. rst-class:: classref-signal
  211. **connection_request**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_connection_request>`
  212. Emitted to the GraphEdit when the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>` is attempted to be created.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_GraphEdit_signal_connection_to_empty:
  216. .. rst-class:: classref-signal
  217. **connection_to_empty**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, release_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_connection_to_empty>`
  218. Emitted when user drags a connection from an output port into the empty space of the graph.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_GraphEdit_signal_copy_nodes_request:
  222. .. rst-class:: classref-signal
  223. **copy_nodes_request**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_copy_nodes_request>`
  224. Emitted when this **GraphEdit** captures a ``ui_copy`` action (:kbd:`Ctrl + C` by default). In general, this signal indicates that the selected :ref:`GraphElement<class_GraphElement>`\ s should be copied.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_GraphEdit_signal_delete_nodes_request:
  228. .. rst-class:: classref-signal
  229. **delete_nodes_request**\ (\ nodes\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\]\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_delete_nodes_request>`
  230. Emitted when this **GraphEdit** captures a ``ui_graph_delete`` action (:kbd:`Delete` by default).
  231. \ ``nodes`` is an array of node names that should be removed. These usually include all selected nodes.
  232. .. rst-class:: classref-item-separator
  233. ----
  234. .. _class_GraphEdit_signal_disconnection_request:
  235. .. rst-class:: classref-signal
  236. **disconnection_request**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_disconnection_request>`
  237. Emitted to the GraphEdit when the connection between ``from_port`` of ``from_node`` :ref:`GraphNode<class_GraphNode>` and ``to_port`` of ``to_node`` :ref:`GraphNode<class_GraphNode>` is attempted to be removed.
  238. .. rst-class:: classref-item-separator
  239. ----
  240. .. _class_GraphEdit_signal_duplicate_nodes_request:
  241. .. rst-class:: classref-signal
  242. **duplicate_nodes_request**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_duplicate_nodes_request>`
  243. Emitted when this **GraphEdit** captures a ``ui_graph_duplicate`` action (:kbd:`Ctrl + D` by default). In general, this signal indicates that the selected :ref:`GraphElement<class_GraphElement>`\ s should be duplicated.
  244. .. rst-class:: classref-item-separator
  245. ----
  246. .. _class_GraphEdit_signal_end_node_move:
  247. .. rst-class:: classref-signal
  248. **end_node_move**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_end_node_move>`
  249. Emitted at the end of a :ref:`GraphElement<class_GraphElement>`'s movement.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _class_GraphEdit_signal_frame_rect_changed:
  253. .. rst-class:: classref-signal
  254. **frame_rect_changed**\ (\ frame\: :ref:`GraphFrame<class_GraphFrame>`, new_rect\: :ref:`Vector2<class_Vector2>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_frame_rect_changed>`
  255. Emitted when the :ref:`GraphFrame<class_GraphFrame>` ``frame`` is resized to ``new_rect``.
  256. .. rst-class:: classref-item-separator
  257. ----
  258. .. _class_GraphEdit_signal_graph_elements_linked_to_frame_request:
  259. .. rst-class:: classref-signal
  260. **graph_elements_linked_to_frame_request**\ (\ elements\: :ref:`Array<class_Array>`, frame\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_graph_elements_linked_to_frame_request>`
  261. Emitted when one or more :ref:`GraphElement<class_GraphElement>`\ s are dropped onto the :ref:`GraphFrame<class_GraphFrame>` named ``frame``, when they were not previously attached to any other one.
  262. \ ``elements`` is an array of :ref:`GraphElement<class_GraphElement>`\ s to be attached.
  263. .. rst-class:: classref-item-separator
  264. ----
  265. .. _class_GraphEdit_signal_node_deselected:
  266. .. rst-class:: classref-signal
  267. **node_deselected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_node_deselected>`
  268. Emitted when the given :ref:`GraphElement<class_GraphElement>` node is deselected.
  269. .. rst-class:: classref-item-separator
  270. ----
  271. .. _class_GraphEdit_signal_node_selected:
  272. .. rst-class:: classref-signal
  273. **node_selected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_node_selected>`
  274. Emitted when the given :ref:`GraphElement<class_GraphElement>` node is selected.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _class_GraphEdit_signal_paste_nodes_request:
  278. .. rst-class:: classref-signal
  279. **paste_nodes_request**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_paste_nodes_request>`
  280. Emitted when this **GraphEdit** captures a ``ui_paste`` action (:kbd:`Ctrl + V` by default). In general, this signal indicates that previously copied :ref:`GraphElement<class_GraphElement>`\ s should be pasted.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_GraphEdit_signal_popup_request:
  284. .. rst-class:: classref-signal
  285. **popup_request**\ (\ at_position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_popup_request>`
  286. Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. ``at_position`` is the position of the mouse pointer when the signal is sent.
  287. .. rst-class:: classref-item-separator
  288. ----
  289. .. _class_GraphEdit_signal_scroll_offset_changed:
  290. .. rst-class:: classref-signal
  291. **scroll_offset_changed**\ (\ offset\: :ref:`Vector2<class_Vector2>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_signal_scroll_offset_changed>`
  292. Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code.
  293. .. rst-class:: classref-section-separator
  294. ----
  295. .. rst-class:: classref-descriptions-group
  296. Enumerations
  297. ------------
  298. .. _enum_GraphEdit_PanningScheme:
  299. .. rst-class:: classref-enumeration
  300. enum **PanningScheme**: :ref:`๐Ÿ”—<enum_GraphEdit_PanningScheme>`
  301. .. _class_GraphEdit_constant_SCROLL_ZOOMS:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **SCROLL_ZOOMS** = ``0``
  304. :kbd:`Mouse Wheel` will zoom, :kbd:`Ctrl + Mouse Wheel` will move the view.
  305. .. _class_GraphEdit_constant_SCROLL_PANS:
  306. .. rst-class:: classref-enumeration-constant
  307. :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **SCROLL_PANS** = ``1``
  308. :kbd:`Mouse Wheel` will move the view, :kbd:`Ctrl + Mouse Wheel` will zoom.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _enum_GraphEdit_GridPattern:
  312. .. rst-class:: classref-enumeration
  313. enum **GridPattern**: :ref:`๐Ÿ”—<enum_GraphEdit_GridPattern>`
  314. .. _class_GraphEdit_constant_GRID_PATTERN_LINES:
  315. .. rst-class:: classref-enumeration-constant
  316. :ref:`GridPattern<enum_GraphEdit_GridPattern>` **GRID_PATTERN_LINES** = ``0``
  317. Draw the grid using solid lines.
  318. .. _class_GraphEdit_constant_GRID_PATTERN_DOTS:
  319. .. rst-class:: classref-enumeration-constant
  320. :ref:`GridPattern<enum_GraphEdit_GridPattern>` **GRID_PATTERN_DOTS** = ``1``
  321. Draw the grid using dots.
  322. .. rst-class:: classref-section-separator
  323. ----
  324. .. rst-class:: classref-descriptions-group
  325. Property Descriptions
  326. ---------------------
  327. .. _class_GraphEdit_property_connection_lines_antialiased:
  328. .. rst-class:: classref-property
  329. :ref:`bool<class_bool>` **connection_lines_antialiased** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_connection_lines_antialiased>`
  330. .. rst-class:: classref-property-setget
  331. - |void| **set_connection_lines_antialiased**\ (\ value\: :ref:`bool<class_bool>`\ )
  332. - :ref:`bool<class_bool>` **is_connection_lines_antialiased**\ (\ )
  333. If ``true``, the lines between nodes will use antialiasing.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_GraphEdit_property_connection_lines_curvature:
  337. .. rst-class:: classref-property
  338. :ref:`float<class_float>` **connection_lines_curvature** = ``0.5`` :ref:`๐Ÿ”—<class_GraphEdit_property_connection_lines_curvature>`
  339. .. rst-class:: classref-property-setget
  340. - |void| **set_connection_lines_curvature**\ (\ value\: :ref:`float<class_float>`\ )
  341. - :ref:`float<class_float>` **get_connection_lines_curvature**\ (\ )
  342. The curvature of the lines between the nodes. 0 results in straight lines.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_GraphEdit_property_connection_lines_thickness:
  346. .. rst-class:: classref-property
  347. :ref:`float<class_float>` **connection_lines_thickness** = ``4.0`` :ref:`๐Ÿ”—<class_GraphEdit_property_connection_lines_thickness>`
  348. .. rst-class:: classref-property-setget
  349. - |void| **set_connection_lines_thickness**\ (\ value\: :ref:`float<class_float>`\ )
  350. - :ref:`float<class_float>` **get_connection_lines_thickness**\ (\ )
  351. The thickness of the lines between the nodes.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_GraphEdit_property_grid_pattern:
  355. .. rst-class:: classref-property
  356. :ref:`GridPattern<enum_GraphEdit_GridPattern>` **grid_pattern** = ``0`` :ref:`๐Ÿ”—<class_GraphEdit_property_grid_pattern>`
  357. .. rst-class:: classref-property-setget
  358. - |void| **set_grid_pattern**\ (\ value\: :ref:`GridPattern<enum_GraphEdit_GridPattern>`\ )
  359. - :ref:`GridPattern<enum_GraphEdit_GridPattern>` **get_grid_pattern**\ (\ )
  360. The pattern used for drawing the grid.
  361. .. rst-class:: classref-item-separator
  362. ----
  363. .. _class_GraphEdit_property_minimap_enabled:
  364. .. rst-class:: classref-property
  365. :ref:`bool<class_bool>` **minimap_enabled** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_minimap_enabled>`
  366. .. rst-class:: classref-property-setget
  367. - |void| **set_minimap_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  368. - :ref:`bool<class_bool>` **is_minimap_enabled**\ (\ )
  369. If ``true``, the minimap is visible.
  370. .. rst-class:: classref-item-separator
  371. ----
  372. .. _class_GraphEdit_property_minimap_opacity:
  373. .. rst-class:: classref-property
  374. :ref:`float<class_float>` **minimap_opacity** = ``0.65`` :ref:`๐Ÿ”—<class_GraphEdit_property_minimap_opacity>`
  375. .. rst-class:: classref-property-setget
  376. - |void| **set_minimap_opacity**\ (\ value\: :ref:`float<class_float>`\ )
  377. - :ref:`float<class_float>` **get_minimap_opacity**\ (\ )
  378. The opacity of the minimap rectangle.
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _class_GraphEdit_property_minimap_size:
  382. .. rst-class:: classref-property
  383. :ref:`Vector2<class_Vector2>` **minimap_size** = ``Vector2(240, 160)`` :ref:`๐Ÿ”—<class_GraphEdit_property_minimap_size>`
  384. .. rst-class:: classref-property-setget
  385. - |void| **set_minimap_size**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  386. - :ref:`Vector2<class_Vector2>` **get_minimap_size**\ (\ )
  387. The size of the minimap rectangle. The map itself is based on the size of the grid area and is scaled to fit this rectangle.
  388. .. rst-class:: classref-item-separator
  389. ----
  390. .. _class_GraphEdit_property_panning_scheme:
  391. .. rst-class:: classref-property
  392. :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **panning_scheme** = ``0`` :ref:`๐Ÿ”—<class_GraphEdit_property_panning_scheme>`
  393. .. rst-class:: classref-property-setget
  394. - |void| **set_panning_scheme**\ (\ value\: :ref:`PanningScheme<enum_GraphEdit_PanningScheme>`\ )
  395. - :ref:`PanningScheme<enum_GraphEdit_PanningScheme>` **get_panning_scheme**\ (\ )
  396. Defines the control scheme for panning with mouse wheel.
  397. .. rst-class:: classref-item-separator
  398. ----
  399. .. _class_GraphEdit_property_right_disconnects:
  400. .. rst-class:: classref-property
  401. :ref:`bool<class_bool>` **right_disconnects** = ``false`` :ref:`๐Ÿ”—<class_GraphEdit_property_right_disconnects>`
  402. .. rst-class:: classref-property-setget
  403. - |void| **set_right_disconnects**\ (\ value\: :ref:`bool<class_bool>`\ )
  404. - :ref:`bool<class_bool>` **is_right_disconnects_enabled**\ (\ )
  405. If ``true``, enables disconnection of existing connections in the GraphEdit by dragging the right end.
  406. .. rst-class:: classref-item-separator
  407. ----
  408. .. _class_GraphEdit_property_scroll_offset:
  409. .. rst-class:: classref-property
  410. :ref:`Vector2<class_Vector2>` **scroll_offset** = ``Vector2(0, 0)`` :ref:`๐Ÿ”—<class_GraphEdit_property_scroll_offset>`
  411. .. rst-class:: classref-property-setget
  412. - |void| **set_scroll_offset**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
  413. - :ref:`Vector2<class_Vector2>` **get_scroll_offset**\ (\ )
  414. The scroll offset.
  415. .. rst-class:: classref-item-separator
  416. ----
  417. .. _class_GraphEdit_property_show_arrange_button:
  418. .. rst-class:: classref-property
  419. :ref:`bool<class_bool>` **show_arrange_button** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_arrange_button>`
  420. .. rst-class:: classref-property-setget
  421. - |void| **set_show_arrange_button**\ (\ value\: :ref:`bool<class_bool>`\ )
  422. - :ref:`bool<class_bool>` **is_showing_arrange_button**\ (\ )
  423. If ``true``, the button to automatically arrange graph nodes is visible.
  424. .. rst-class:: classref-item-separator
  425. ----
  426. .. _class_GraphEdit_property_show_grid:
  427. .. rst-class:: classref-property
  428. :ref:`bool<class_bool>` **show_grid** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_grid>`
  429. .. rst-class:: classref-property-setget
  430. - |void| **set_show_grid**\ (\ value\: :ref:`bool<class_bool>`\ )
  431. - :ref:`bool<class_bool>` **is_showing_grid**\ (\ )
  432. If ``true``, the grid is visible.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _class_GraphEdit_property_show_grid_buttons:
  436. .. rst-class:: classref-property
  437. :ref:`bool<class_bool>` **show_grid_buttons** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_grid_buttons>`
  438. .. rst-class:: classref-property-setget
  439. - |void| **set_show_grid_buttons**\ (\ value\: :ref:`bool<class_bool>`\ )
  440. - :ref:`bool<class_bool>` **is_showing_grid_buttons**\ (\ )
  441. If ``true``, buttons that allow to configure grid and snapping options are visible.
  442. .. rst-class:: classref-item-separator
  443. ----
  444. .. _class_GraphEdit_property_show_menu:
  445. .. rst-class:: classref-property
  446. :ref:`bool<class_bool>` **show_menu** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_menu>`
  447. .. rst-class:: classref-property-setget
  448. - |void| **set_show_menu**\ (\ value\: :ref:`bool<class_bool>`\ )
  449. - :ref:`bool<class_bool>` **is_showing_menu**\ (\ )
  450. If ``true``, the menu toolbar is visible.
  451. .. rst-class:: classref-item-separator
  452. ----
  453. .. _class_GraphEdit_property_show_minimap_button:
  454. .. rst-class:: classref-property
  455. :ref:`bool<class_bool>` **show_minimap_button** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_minimap_button>`
  456. .. rst-class:: classref-property-setget
  457. - |void| **set_show_minimap_button**\ (\ value\: :ref:`bool<class_bool>`\ )
  458. - :ref:`bool<class_bool>` **is_showing_minimap_button**\ (\ )
  459. If ``true``, the button to toggle the minimap is visible.
  460. .. rst-class:: classref-item-separator
  461. ----
  462. .. _class_GraphEdit_property_show_zoom_buttons:
  463. .. rst-class:: classref-property
  464. :ref:`bool<class_bool>` **show_zoom_buttons** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_zoom_buttons>`
  465. .. rst-class:: classref-property-setget
  466. - |void| **set_show_zoom_buttons**\ (\ value\: :ref:`bool<class_bool>`\ )
  467. - :ref:`bool<class_bool>` **is_showing_zoom_buttons**\ (\ )
  468. If ``true``, buttons that allow to change and reset the zoom level are visible.
  469. .. rst-class:: classref-item-separator
  470. ----
  471. .. _class_GraphEdit_property_show_zoom_label:
  472. .. rst-class:: classref-property
  473. :ref:`bool<class_bool>` **show_zoom_label** = ``false`` :ref:`๐Ÿ”—<class_GraphEdit_property_show_zoom_label>`
  474. .. rst-class:: classref-property-setget
  475. - |void| **set_show_zoom_label**\ (\ value\: :ref:`bool<class_bool>`\ )
  476. - :ref:`bool<class_bool>` **is_showing_zoom_label**\ (\ )
  477. If ``true``, the label with the current zoom level is visible. The zoom level is displayed in percents.
  478. .. rst-class:: classref-item-separator
  479. ----
  480. .. _class_GraphEdit_property_snapping_distance:
  481. .. rst-class:: classref-property
  482. :ref:`int<class_int>` **snapping_distance** = ``20`` :ref:`๐Ÿ”—<class_GraphEdit_property_snapping_distance>`
  483. .. rst-class:: classref-property-setget
  484. - |void| **set_snapping_distance**\ (\ value\: :ref:`int<class_int>`\ )
  485. - :ref:`int<class_int>` **get_snapping_distance**\ (\ )
  486. The snapping distance in pixels, also determines the grid line distance.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _class_GraphEdit_property_snapping_enabled:
  490. .. rst-class:: classref-property
  491. :ref:`bool<class_bool>` **snapping_enabled** = ``true`` :ref:`๐Ÿ”—<class_GraphEdit_property_snapping_enabled>`
  492. .. rst-class:: classref-property-setget
  493. - |void| **set_snapping_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  494. - :ref:`bool<class_bool>` **is_snapping_enabled**\ (\ )
  495. If ``true``, enables snapping.
  496. .. rst-class:: classref-item-separator
  497. ----
  498. .. _class_GraphEdit_property_zoom:
  499. .. rst-class:: classref-property
  500. :ref:`float<class_float>` **zoom** = ``1.0`` :ref:`๐Ÿ”—<class_GraphEdit_property_zoom>`
  501. .. rst-class:: classref-property-setget
  502. - |void| **set_zoom**\ (\ value\: :ref:`float<class_float>`\ )
  503. - :ref:`float<class_float>` **get_zoom**\ (\ )
  504. The current zoom value.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _class_GraphEdit_property_zoom_max:
  508. .. rst-class:: classref-property
  509. :ref:`float<class_float>` **zoom_max** = ``2.0736`` :ref:`๐Ÿ”—<class_GraphEdit_property_zoom_max>`
  510. .. rst-class:: classref-property-setget
  511. - |void| **set_zoom_max**\ (\ value\: :ref:`float<class_float>`\ )
  512. - :ref:`float<class_float>` **get_zoom_max**\ (\ )
  513. The upper zoom limit.
  514. .. rst-class:: classref-item-separator
  515. ----
  516. .. _class_GraphEdit_property_zoom_min:
  517. .. rst-class:: classref-property
  518. :ref:`float<class_float>` **zoom_min** = ``0.232568`` :ref:`๐Ÿ”—<class_GraphEdit_property_zoom_min>`
  519. .. rst-class:: classref-property-setget
  520. - |void| **set_zoom_min**\ (\ value\: :ref:`float<class_float>`\ )
  521. - :ref:`float<class_float>` **get_zoom_min**\ (\ )
  522. The lower zoom limit.
  523. .. rst-class:: classref-item-separator
  524. ----
  525. .. _class_GraphEdit_property_zoom_step:
  526. .. rst-class:: classref-property
  527. :ref:`float<class_float>` **zoom_step** = ``1.2`` :ref:`๐Ÿ”—<class_GraphEdit_property_zoom_step>`
  528. .. rst-class:: classref-property-setget
  529. - |void| **set_zoom_step**\ (\ value\: :ref:`float<class_float>`\ )
  530. - :ref:`float<class_float>` **get_zoom_step**\ (\ )
  531. The step of each zoom level.
  532. .. rst-class:: classref-section-separator
  533. ----
  534. .. rst-class:: classref-descriptions-group
  535. Method Descriptions
  536. -------------------
  537. .. _class_GraphEdit_private_method__get_connection_line:
  538. .. rst-class:: classref-method
  539. :ref:`PackedVector2Array<class_PackedVector2Array>` **_get_connection_line**\ (\ from_position\: :ref:`Vector2<class_Vector2>`, to_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| |const| :ref:`๐Ÿ”—<class_GraphEdit_private_method__get_connection_line>`
  540. Virtual method which can be overridden to customize how connections are drawn.
  541. .. rst-class:: classref-item-separator
  542. ----
  543. .. _class_GraphEdit_private_method__is_in_input_hotzone:
  544. .. rst-class:: classref-method
  545. :ref:`bool<class_bool>` **_is_in_input_hotzone**\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`๐Ÿ”—<class_GraphEdit_private_method__is_in_input_hotzone>`
  546. Returns whether the ``mouse_position`` is in the input hot zone.
  547. By default, a hot zone is a :ref:`Rect2<class_Rect2>` positioned such that its center is at ``in_node``.\ :ref:`GraphNode.get_input_port_position<class_GraphNode_method_get_input_port_position>`\ (``in_port``) (For output's case, call :ref:`GraphNode.get_output_port_position<class_GraphNode_method_get_output_port_position>` instead). The hot zone's width is twice the Theme Property ``port_grab_distance_horizontal``, and its height is twice the ``port_grab_distance_vertical``.
  548. Below is a sample code to help get started:
  549. ::
  550. func _is_in_input_hotzone(in_node, in_port, mouse_position):
  551. var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
  552. var port_pos: Vector2 = in_node.get_position() + in_node.get_input_port_position(in_port) - port_size / 2
  553. var rect = Rect2(port_pos, port_size)
  554. return rect.has_point(mouse_position)
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_GraphEdit_private_method__is_in_output_hotzone:
  558. .. rst-class:: classref-method
  559. :ref:`bool<class_bool>` **_is_in_output_hotzone**\ (\ in_node\: :ref:`Object<class_Object>`, in_port\: :ref:`int<class_int>`, mouse_position\: :ref:`Vector2<class_Vector2>`\ ) |virtual| :ref:`๐Ÿ”—<class_GraphEdit_private_method__is_in_output_hotzone>`
  560. Returns whether the ``mouse_position`` is in the output hot zone. For more information on hot zones, see :ref:`_is_in_input_hotzone<class_GraphEdit_private_method__is_in_input_hotzone>`.
  561. Below is a sample code to help get started:
  562. ::
  563. func _is_in_output_hotzone(in_node, in_port, mouse_position):
  564. var port_size: Vector2 = Vector2(get_theme_constant("port_grab_distance_horizontal"), get_theme_constant("port_grab_distance_vertical"))
  565. var port_pos: Vector2 = in_node.get_position() + in_node.get_output_port_position(in_port) - port_size / 2
  566. var rect = Rect2(port_pos, port_size)
  567. return rect.has_point(mouse_position)
  568. .. rst-class:: classref-item-separator
  569. ----
  570. .. _class_GraphEdit_private_method__is_node_hover_valid:
  571. .. rst-class:: classref-method
  572. :ref:`bool<class_bool>` **_is_node_hover_valid**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) |virtual| :ref:`๐Ÿ”—<class_GraphEdit_private_method__is_node_hover_valid>`
  573. This virtual method can be used to insert additional error detection while the user is dragging a connection over a valid port.
  574. Return ``true`` if the connection is indeed valid or return ``false`` if the connection is impossible. If the connection is impossible, no snapping to the port and thus no connection request to that port will happen.
  575. In this example a connection to same node is suppressed:
  576. .. tabs::
  577. .. code-tab:: gdscript
  578. func _is_node_hover_valid(from, from_port, to, to_port):
  579. return from != to
  580. .. code-tab:: csharp
  581. public override bool _IsNodeHoverValid(StringName fromNode, int fromPort, StringName toNode, int toPort)
  582. {
  583. return fromNode != toNode;
  584. }
  585. .. rst-class:: classref-item-separator
  586. ----
  587. .. _class_GraphEdit_method_add_valid_connection_type:
  588. .. rst-class:: classref-method
  589. |void| **add_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_add_valid_connection_type>`
  590. Allows the connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method.
  591. See also :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connection_type>` and :ref:`remove_valid_connection_type<class_GraphEdit_method_remove_valid_connection_type>`.
  592. .. rst-class:: classref-item-separator
  593. ----
  594. .. _class_GraphEdit_method_add_valid_left_disconnect_type:
  595. .. rst-class:: classref-method
  596. |void| **add_valid_left_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_add_valid_left_disconnect_type>`
  597. Allows to disconnect nodes when dragging from the left port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. See also :ref:`remove_valid_left_disconnect_type<class_GraphEdit_method_remove_valid_left_disconnect_type>`.
  598. .. rst-class:: classref-item-separator
  599. ----
  600. .. _class_GraphEdit_method_add_valid_right_disconnect_type:
  601. .. rst-class:: classref-method
  602. |void| **add_valid_right_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_add_valid_right_disconnect_type>`
  603. Allows to disconnect nodes when dragging from the right port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. See also :ref:`remove_valid_right_disconnect_type<class_GraphEdit_method_remove_valid_right_disconnect_type>`.
  604. .. rst-class:: classref-item-separator
  605. ----
  606. .. _class_GraphEdit_method_arrange_nodes:
  607. .. rst-class:: classref-method
  608. |void| **arrange_nodes**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_arrange_nodes>`
  609. Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes.
  610. .. rst-class:: classref-item-separator
  611. ----
  612. .. _class_GraphEdit_method_attach_graph_element_to_frame:
  613. .. rst-class:: classref-method
  614. |void| **attach_graph_element_to_frame**\ (\ element\: :ref:`StringName<class_StringName>`, frame\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_attach_graph_element_to_frame>`
  615. Attaches the ``element`` :ref:`GraphElement<class_GraphElement>` to the ``frame`` :ref:`GraphFrame<class_GraphFrame>`.
  616. .. rst-class:: classref-item-separator
  617. ----
  618. .. _class_GraphEdit_method_clear_connections:
  619. .. rst-class:: classref-method
  620. |void| **clear_connections**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_clear_connections>`
  621. Removes all connections between nodes.
  622. .. rst-class:: classref-item-separator
  623. ----
  624. .. _class_GraphEdit_method_connect_node:
  625. .. rst-class:: classref-method
  626. :ref:`Error<enum_@GlobalScope_Error>` **connect_node**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_connect_node>`
  627. Create a connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`. If the connection already exists, no connection is created.
  628. .. rst-class:: classref-item-separator
  629. ----
  630. .. _class_GraphEdit_method_detach_graph_element_from_frame:
  631. .. rst-class:: classref-method
  632. |void| **detach_graph_element_from_frame**\ (\ element\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_detach_graph_element_from_frame>`
  633. Detaches the ``element`` :ref:`GraphElement<class_GraphElement>` from the :ref:`GraphFrame<class_GraphFrame>` it is currently attached to.
  634. .. rst-class:: classref-item-separator
  635. ----
  636. .. _class_GraphEdit_method_disconnect_node:
  637. .. rst-class:: classref-method
  638. |void| **disconnect_node**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_disconnect_node>`
  639. Removes the connection between the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` and the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`. If the connection does not exist, no connection is removed.
  640. .. rst-class:: classref-item-separator
  641. ----
  642. .. _class_GraphEdit_method_force_connection_drag_end:
  643. .. rst-class:: classref-method
  644. |void| **force_connection_drag_end**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_force_connection_drag_end>`
  645. Ends the creation of the current connection. In other words, if you are dragging a connection you can use this method to abort the process and remove the line that followed your cursor.
  646. This is best used together with :ref:`connection_drag_started<class_GraphEdit_signal_connection_drag_started>` and :ref:`connection_drag_ended<class_GraphEdit_signal_connection_drag_ended>` to add custom behavior like node addition through shortcuts.
  647. \ **Note:** This method suppresses any other connection request signals apart from :ref:`connection_drag_ended<class_GraphEdit_signal_connection_drag_ended>`.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_GraphEdit_method_get_attached_nodes_of_frame:
  651. .. rst-class:: classref-method
  652. :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] **get_attached_nodes_of_frame**\ (\ frame\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_get_attached_nodes_of_frame>`
  653. Returns an array of node names that are attached to the :ref:`GraphFrame<class_GraphFrame>` with the given name.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _class_GraphEdit_method_get_closest_connection_at_point:
  657. .. rst-class:: classref-method
  658. :ref:`Dictionary<class_Dictionary>` **get_closest_connection_at_point**\ (\ point\: :ref:`Vector2<class_Vector2>`, max_distance\: :ref:`float<class_float>` = 4.0\ ) |const| :ref:`๐Ÿ”—<class_GraphEdit_method_get_closest_connection_at_point>`
  659. Returns the closest connection to the given point in screen space. If no connection is found within ``max_distance`` pixels, an empty :ref:`Dictionary<class_Dictionary>` is returned.
  660. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``.
  661. For example, getting a connection at a given mouse position can be achieved like this:
  662. .. tabs::
  663. .. code-tab:: gdscript
  664. var connection = get_closest_connection_at_point(mouse_event.get_position())
  665. .. rst-class:: classref-item-separator
  666. ----
  667. .. _class_GraphEdit_method_get_connection_line:
  668. .. rst-class:: classref-method
  669. :ref:`PackedVector2Array<class_PackedVector2Array>` **get_connection_line**\ (\ from_node\: :ref:`Vector2<class_Vector2>`, to_node\: :ref:`Vector2<class_Vector2>`\ ) |const| :ref:`๐Ÿ”—<class_GraphEdit_method_get_connection_line>`
  670. Returns the points which would make up a connection between ``from_node`` and ``to_node``.
  671. .. rst-class:: classref-item-separator
  672. ----
  673. .. _class_GraphEdit_method_get_connection_list:
  674. .. rst-class:: classref-method
  675. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_connection_list**\ (\ ) |const| :ref:`๐Ÿ”—<class_GraphEdit_method_get_connection_list>`
  676. Returns an :ref:`Array<class_Array>` containing the list of connections. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``.
  677. .. rst-class:: classref-item-separator
  678. ----
  679. .. _class_GraphEdit_method_get_connections_intersecting_with_rect:
  680. .. rst-class:: classref-method
  681. :ref:`Array<class_Array>`\[:ref:`Dictionary<class_Dictionary>`\] **get_connections_intersecting_with_rect**\ (\ rect\: :ref:`Rect2<class_Rect2>`\ ) |const| :ref:`๐Ÿ”—<class_GraphEdit_method_get_connections_intersecting_with_rect>`
  682. Returns an :ref:`Array<class_Array>` containing the list of connections that intersect with the given :ref:`Rect2<class_Rect2>`. A connection consists in a structure of the form ``{ from_port: 0, from_node: "GraphNode name 0", to_port: 1, to_node: "GraphNode name 1" }``.
  683. .. rst-class:: classref-item-separator
  684. ----
  685. .. _class_GraphEdit_method_get_element_frame:
  686. .. rst-class:: classref-method
  687. :ref:`GraphFrame<class_GraphFrame>` **get_element_frame**\ (\ element\: :ref:`StringName<class_StringName>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_get_element_frame>`
  688. Returns the :ref:`GraphFrame<class_GraphFrame>` that contains the :ref:`GraphElement<class_GraphElement>` with the given name.
  689. .. rst-class:: classref-item-separator
  690. ----
  691. .. _class_GraphEdit_method_get_menu_hbox:
  692. .. rst-class:: classref-method
  693. :ref:`HBoxContainer<class_HBoxContainer>` **get_menu_hbox**\ (\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_get_menu_hbox>`
  694. Gets the :ref:`HBoxContainer<class_HBoxContainer>` that contains the zooming and grid snap controls in the top left of the graph. You can use this method to reposition the toolbar or to add your own custom controls to it.
  695. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  696. .. rst-class:: classref-item-separator
  697. ----
  698. .. _class_GraphEdit_method_is_node_connected:
  699. .. rst-class:: classref-method
  700. :ref:`bool<class_bool>` **is_node_connected**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_is_node_connected>`
  701. Returns ``true`` if the ``from_port`` of the ``from_node`` :ref:`GraphNode<class_GraphNode>` is connected to the ``to_port`` of the ``to_node`` :ref:`GraphNode<class_GraphNode>`.
  702. .. rst-class:: classref-item-separator
  703. ----
  704. .. _class_GraphEdit_method_is_valid_connection_type:
  705. .. rst-class:: classref-method
  706. :ref:`bool<class_bool>` **is_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) |const| :ref:`๐Ÿ”—<class_GraphEdit_method_is_valid_connection_type>`
  707. Returns whether it's possible to make a connection between two different port types. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method.
  708. See also :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>` and :ref:`remove_valid_connection_type<class_GraphEdit_method_remove_valid_connection_type>`.
  709. .. rst-class:: classref-item-separator
  710. ----
  711. .. _class_GraphEdit_method_remove_valid_connection_type:
  712. .. rst-class:: classref-method
  713. |void| **remove_valid_connection_type**\ (\ from_type\: :ref:`int<class_int>`, to_type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_remove_valid_connection_type>`
  714. Disallows the connection between two different port types previously allowed by :ref:`add_valid_connection_type<class_GraphEdit_method_add_valid_connection_type>`. The port type is defined individually for the left and the right port of each slot with the :ref:`GraphNode.set_slot<class_GraphNode_method_set_slot>` method.
  715. See also :ref:`is_valid_connection_type<class_GraphEdit_method_is_valid_connection_type>`.
  716. .. rst-class:: classref-item-separator
  717. ----
  718. .. _class_GraphEdit_method_remove_valid_left_disconnect_type:
  719. .. rst-class:: classref-method
  720. |void| **remove_valid_left_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_remove_valid_left_disconnect_type>`
  721. Disallows to disconnect nodes when dragging from the left port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_left_disconnect_type<class_GraphEdit_method_add_valid_left_disconnect_type>`.
  722. .. rst-class:: classref-item-separator
  723. ----
  724. .. _class_GraphEdit_method_remove_valid_right_disconnect_type:
  725. .. rst-class:: classref-method
  726. |void| **remove_valid_right_disconnect_type**\ (\ type\: :ref:`int<class_int>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_remove_valid_right_disconnect_type>`
  727. Disallows to disconnect nodes when dragging from the right port of the :ref:`GraphNode<class_GraphNode>`'s slot if it has the specified type. Use this to disable disconnection previously allowed with :ref:`add_valid_right_disconnect_type<class_GraphEdit_method_add_valid_right_disconnect_type>`.
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_GraphEdit_method_set_connection_activity:
  731. .. rst-class:: classref-method
  732. |void| **set_connection_activity**\ (\ from_node\: :ref:`StringName<class_StringName>`, from_port\: :ref:`int<class_int>`, to_node\: :ref:`StringName<class_StringName>`, to_port\: :ref:`int<class_int>`, amount\: :ref:`float<class_float>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_set_connection_activity>`
  733. Sets the coloration of the connection between ``from_node``'s ``from_port`` and ``to_node``'s ``to_port`` with the color provided in the :ref:`activity<class_GraphEdit_theme_color_activity>` theme property. The color is linearly interpolated between the connection color and the activity color using ``amount`` as weight.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_GraphEdit_method_set_selected:
  737. .. rst-class:: classref-method
  738. |void| **set_selected**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`๐Ÿ”—<class_GraphEdit_method_set_selected>`
  739. Sets the specified ``node`` as the one selected.
  740. .. rst-class:: classref-section-separator
  741. ----
  742. .. rst-class:: classref-descriptions-group
  743. Theme Property Descriptions
  744. ---------------------------
  745. .. _class_GraphEdit_theme_color_activity:
  746. .. rst-class:: classref-themeproperty
  747. :ref:`Color<class_Color>` **activity** = ``Color(1, 1, 1, 1)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_activity>`
  748. Color the connection line is interpolated to based on the activity value of a connection (see :ref:`set_connection_activity<class_GraphEdit_method_set_connection_activity>`).
  749. .. rst-class:: classref-item-separator
  750. ----
  751. .. _class_GraphEdit_theme_color_connection_hover_tint_color:
  752. .. rst-class:: classref-themeproperty
  753. :ref:`Color<class_Color>` **connection_hover_tint_color** = ``Color(0, 0, 0, 0.3)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_connection_hover_tint_color>`
  754. Color which is blended with the connection line when the mouse is hovering over it.
  755. .. rst-class:: classref-item-separator
  756. ----
  757. .. _class_GraphEdit_theme_color_connection_rim_color:
  758. .. rst-class:: classref-themeproperty
  759. :ref:`Color<class_Color>` **connection_rim_color** = ``Color(0.1, 0.1, 0.1, 0.6)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_connection_rim_color>`
  760. Color of the rim around each connection line used for making intersecting lines more distinguishable.
  761. .. rst-class:: classref-item-separator
  762. ----
  763. .. _class_GraphEdit_theme_color_connection_valid_target_tint_color:
  764. .. rst-class:: classref-themeproperty
  765. :ref:`Color<class_Color>` **connection_valid_target_tint_color** = ``Color(1, 1, 1, 0.4)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_connection_valid_target_tint_color>`
  766. Color which is blended with the connection line when the currently dragged connection is hovering over a valid target port.
  767. .. rst-class:: classref-item-separator
  768. ----
  769. .. _class_GraphEdit_theme_color_grid_major:
  770. .. rst-class:: classref-themeproperty
  771. :ref:`Color<class_Color>` **grid_major** = ``Color(1, 1, 1, 0.2)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_grid_major>`
  772. Color of major grid lines/dots.
  773. .. rst-class:: classref-item-separator
  774. ----
  775. .. _class_GraphEdit_theme_color_grid_minor:
  776. .. rst-class:: classref-themeproperty
  777. :ref:`Color<class_Color>` **grid_minor** = ``Color(1, 1, 1, 0.05)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_grid_minor>`
  778. Color of minor grid lines/dots.
  779. .. rst-class:: classref-item-separator
  780. ----
  781. .. _class_GraphEdit_theme_color_selection_fill:
  782. .. rst-class:: classref-themeproperty
  783. :ref:`Color<class_Color>` **selection_fill** = ``Color(1, 1, 1, 0.3)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_selection_fill>`
  784. The fill color of the selection rectangle.
  785. .. rst-class:: classref-item-separator
  786. ----
  787. .. _class_GraphEdit_theme_color_selection_stroke:
  788. .. rst-class:: classref-themeproperty
  789. :ref:`Color<class_Color>` **selection_stroke** = ``Color(1, 1, 1, 0.8)`` :ref:`๐Ÿ”—<class_GraphEdit_theme_color_selection_stroke>`
  790. The outline color of the selection rectangle.
  791. .. rst-class:: classref-item-separator
  792. ----
  793. .. _class_GraphEdit_theme_constant_port_hotzone_inner_extent:
  794. .. rst-class:: classref-themeproperty
  795. :ref:`int<class_int>` **port_hotzone_inner_extent** = ``22`` :ref:`๐Ÿ”—<class_GraphEdit_theme_constant_port_hotzone_inner_extent>`
  796. The horizontal range within which a port can be grabbed (inner side).
  797. .. rst-class:: classref-item-separator
  798. ----
  799. .. _class_GraphEdit_theme_constant_port_hotzone_outer_extent:
  800. .. rst-class:: classref-themeproperty
  801. :ref:`int<class_int>` **port_hotzone_outer_extent** = ``26`` :ref:`๐Ÿ”—<class_GraphEdit_theme_constant_port_hotzone_outer_extent>`
  802. The horizontal range within which a port can be grabbed (outer side).
  803. .. rst-class:: classref-item-separator
  804. ----
  805. .. _class_GraphEdit_theme_icon_grid_toggle:
  806. .. rst-class:: classref-themeproperty
  807. :ref:`Texture2D<class_Texture2D>` **grid_toggle** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_grid_toggle>`
  808. The icon for the grid toggle button.
  809. .. rst-class:: classref-item-separator
  810. ----
  811. .. _class_GraphEdit_theme_icon_layout:
  812. .. rst-class:: classref-themeproperty
  813. :ref:`Texture2D<class_Texture2D>` **layout** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_layout>`
  814. The icon for the layout button for auto-arranging the graph.
  815. .. rst-class:: classref-item-separator
  816. ----
  817. .. _class_GraphEdit_theme_icon_minimap_toggle:
  818. .. rst-class:: classref-themeproperty
  819. :ref:`Texture2D<class_Texture2D>` **minimap_toggle** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_minimap_toggle>`
  820. The icon for the minimap toggle button.
  821. .. rst-class:: classref-item-separator
  822. ----
  823. .. _class_GraphEdit_theme_icon_snapping_toggle:
  824. .. rst-class:: classref-themeproperty
  825. :ref:`Texture2D<class_Texture2D>` **snapping_toggle** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_snapping_toggle>`
  826. The icon for the snapping toggle button.
  827. .. rst-class:: classref-item-separator
  828. ----
  829. .. _class_GraphEdit_theme_icon_zoom_in:
  830. .. rst-class:: classref-themeproperty
  831. :ref:`Texture2D<class_Texture2D>` **zoom_in** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_zoom_in>`
  832. The icon for the zoom in button.
  833. .. rst-class:: classref-item-separator
  834. ----
  835. .. _class_GraphEdit_theme_icon_zoom_out:
  836. .. rst-class:: classref-themeproperty
  837. :ref:`Texture2D<class_Texture2D>` **zoom_out** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_zoom_out>`
  838. The icon for the zoom out button.
  839. .. rst-class:: classref-item-separator
  840. ----
  841. .. _class_GraphEdit_theme_icon_zoom_reset:
  842. .. rst-class:: classref-themeproperty
  843. :ref:`Texture2D<class_Texture2D>` **zoom_reset** :ref:`๐Ÿ”—<class_GraphEdit_theme_icon_zoom_reset>`
  844. The icon for the zoom reset button.
  845. .. rst-class:: classref-item-separator
  846. ----
  847. .. _class_GraphEdit_theme_style_menu_panel:
  848. .. rst-class:: classref-themeproperty
  849. :ref:`StyleBox<class_StyleBox>` **menu_panel** :ref:`๐Ÿ”—<class_GraphEdit_theme_style_menu_panel>`
  850. .. container:: contribute
  851. There is currently no description for this theme property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  852. .. rst-class:: classref-item-separator
  853. ----
  854. .. _class_GraphEdit_theme_style_panel:
  855. .. rst-class:: classref-themeproperty
  856. :ref:`StyleBox<class_StyleBox>` **panel** :ref:`๐Ÿ”—<class_GraphEdit_theme_style_panel>`
  857. The background drawn under the grid.
  858. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  859. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  860. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  861. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  862. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  863. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  864. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  865. .. |void| replace:: :abbr:`void (No return value.)`