Add warnings to methods that give access to internal nodes

This commit is contained in:
Yuri Sizov 2021-10-10 22:28:56 +03:00
parent 2a28df82d4
commit 07725b611b
17 changed files with 27 additions and 2 deletions

View file

@ -32,12 +32,14 @@
<return type="Label" /> <return type="Label" />
<description> <description>
Returns the label used for built-in text. Returns the label used for built-in text.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="get_ok_button"> <method name="get_ok_button">
<return type="Button" /> <return type="Button" />
<description> <description>
Returns the OK [Button] instance. Returns the OK [Button] instance.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="register_text_enter"> <method name="register_text_enter">

View file

@ -17,12 +17,14 @@
<return type="ColorPicker" /> <return type="ColorPicker" />
<description> <description>
Returns the [ColorPicker] that this node toggles. Returns the [ColorPicker] that this node toggles.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="get_popup"> <method name="get_popup">
<return type="PopupPanel" /> <return type="PopupPanel" />
<description> <description>
Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden.
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
</methods> </methods>

View file

@ -22,6 +22,7 @@
<return type="Button" /> <return type="Button" />
<description> <description>
Returns the cancel button. Returns the cancel button.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
</methods> </methods>

View file

@ -26,6 +26,7 @@
<return type="VBoxContainer" /> <return type="VBoxContainer" />
<description> <description>
Returns the [code]VBoxContainer[/code] used to display the file system. Returns the [code]VBoxContainer[/code] used to display the file system.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="invalidate"> <method name="invalidate">

View file

@ -28,12 +28,14 @@
<return type="Control" /> <return type="Control" />
<description> <description>
Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly.
[b]Warning:[/b] Removing and freeing this node will render the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_command_palette" qualifiers="const"> <method name="get_command_palette" qualifiers="const">
<return type="EditorCommandPalette" /> <return type="EditorCommandPalette" />
<description> <description>
Returns the editor's [EditorCommandPalette] instance. Returns the editor's [EditorCommandPalette] instance.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_current_path" qualifiers="const"> <method name="get_current_path" qualifiers="const">
@ -53,6 +55,7 @@
<description> <description>
Returns the main editor control. Use this as a parent for main screens. Returns the main editor control. Use this as a parent for main screens.
[b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically. [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_editor_paths"> <method name="get_editor_paths">
@ -77,12 +80,14 @@
<return type="FileSystemDock" /> <return type="FileSystemDock" />
<description> <description>
Returns the editor's [FileSystemDock] instance. Returns the editor's [FileSystemDock] instance.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_inspector" qualifiers="const"> <method name="get_inspector" qualifiers="const">
<return type="EditorInspector" /> <return type="EditorInspector" />
<description> <description>
Returns the editor's [EditorInspector] instance. Returns the editor's [EditorInspector] instance.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_open_scenes" qualifiers="const"> <method name="get_open_scenes" qualifiers="const">
@ -113,6 +118,7 @@
<return type="ScriptEditor" /> <return type="ScriptEditor" />
<description> <description>
Returns the editor's [ScriptEditor] instance. Returns the editor's [ScriptEditor] instance.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_selected_path" qualifiers="const"> <method name="get_selected_path" qualifiers="const">

View file

@ -462,6 +462,7 @@
<description> <description>
Gets the Editor's dialogue used for making scripts. Gets the Editor's dialogue used for making scripts.
[b]Note:[/b] Users can configure it before use. [b]Note:[/b] Users can configure it before use.
[b]Warning:[/b] Removing and freeing this node will render a part of the editor useless and may cause a crash.
</description> </description>
</method> </method>
<method name="get_undo_redo"> <method name="get_undo_redo">

View file

@ -32,12 +32,14 @@
<return type="LineEdit" /> <return type="LineEdit" />
<description> <description>
Returns the LineEdit for the selected file. Returns the LineEdit for the selected file.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="get_vbox"> <method name="get_vbox">
<return type="VBoxContainer" /> <return type="VBoxContainer" />
<description> <description>
Returns the vertical box container of the dialog, custom controls can be added to it. Returns the vertical box container of the dialog, custom controls can be added to it.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="invalidate"> <method name="invalidate">

View file

@ -89,8 +89,8 @@
<method name="get_zoom_hbox"> <method name="get_zoom_hbox">
<return type="HBoxContainer" /> <return type="HBoxContainer" />
<description> <description>
Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. Gets the [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.
Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their [member CanvasItem.visible] property instead. [b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="is_node_connected"> <method name="is_node_connected">

View file

@ -165,6 +165,7 @@
<return type="VScrollBar" /> <return type="VScrollBar" />
<description> <description>
Returns the [Object] ID associated with the list. Returns the [Object] ID associated with the list.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="is_anything_selected"> <method name="is_anything_selected">

View file

@ -67,6 +67,7 @@
<return type="PopupMenu" /> <return type="PopupMenu" />
<description> <description>
Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]. Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit].
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
<method name="get_opentype_feature" qualifiers="const"> <method name="get_opentype_feature" qualifiers="const">

View file

@ -15,6 +15,7 @@
<return type="PopupMenu" /> <return type="PopupMenu" />
<description> <description>
Returns the [PopupMenu] contained in this button. Returns the [PopupMenu] contained in this button.
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
<method name="set_disable_shortcuts"> <method name="set_disable_shortcuts">

View file

@ -84,6 +84,7 @@
<return type="PopupMenu" /> <return type="PopupMenu" />
<description> <description>
Returns the [PopupMenu] contained in this button. Returns the [PopupMenu] contained in this button.
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
<method name="get_selected_id" qualifiers="const"> <method name="get_selected_id" qualifiers="const">

View file

@ -101,6 +101,7 @@
<return type="VScrollBar" /> <return type="VScrollBar" />
<description> <description>
Returns the vertical scrollbar. Returns the vertical scrollbar.
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
<method name="get_visible_line_count" qualifiers="const"> <method name="get_visible_line_count" qualifiers="const">

View file

@ -22,12 +22,14 @@
<return type="HScrollBar" /> <return type="HScrollBar" />
<description> <description>
Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]. Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer].
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the horizontal scrollbar, use [member scroll_horizontal_enabled]. If you want to only hide it instead, use [member scroll_horizontal_visible].
</description> </description>
</method> </method>
<method name="get_v_scrollbar"> <method name="get_v_scrollbar">
<return type="VScrollBar" /> <return type="VScrollBar" />
<description> <description>
Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]. Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer].
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to disable the vertical scrollbar, use [member scroll_vertical_enabled]. If you want to only hide it instead, use [member scroll_vertical_visible].
</description> </description>
</method> </method>
</methods> </methods>

View file

@ -39,6 +39,7 @@
<return type="LineEdit" /> <return type="LineEdit" />
<description> <description>
Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]. Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit].
[b]Warning:[/b] 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 [member CanvasItem.visible] property.
</description> </description>
</method> </method>
</methods> </methods>

View file

@ -20,6 +20,7 @@
<return type="Popup" /> <return type="Popup" />
<description> <description>
Returns the [Popup] node instance if one has been set already with [method set_popup]. Returns the [Popup] node instance if one has been set already with [method set_popup].
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
<method name="get_previous_tab" qualifiers="const"> <method name="get_previous_tab" qualifiers="const">

View file

@ -314,6 +314,7 @@
<return type="PopupMenu" /> <return type="PopupMenu" />
<description> <description>
Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit].
[b]Warning:[/b] 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 [member Window.visible] property.
</description> </description>
</method> </method>
<method name="get_minimap_line_at_pos" qualifiers="const"> <method name="get_minimap_line_at_pos" qualifiers="const">