summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2021-05-15 23:48:59 +0200
committerkobewi <kobewi4e@gmail.com>2021-06-12 00:55:52 +0200
commit7ff135b0158e0b5dd7a85d98aecd7ff0975e7e43 (patch)
tree377e3069a6ae11e438d6a4c716f307f95548068f /doc
parent530e069bc3efef4de535a1973aa016698ffbe334 (diff)
Consistently prefix bound virtual methods with _
Diffstat (limited to 'doc')
-rw-r--r--doc/classes/AnimationNode.xml118
-rw-r--r--doc/classes/Control.xml206
-rw-r--r--doc/classes/EditorImportPlugin.xml50
-rw-r--r--doc/classes/EditorInspectorPlugin.xml92
-rw-r--r--doc/classes/EditorNode3DGizmo.xml138
-rw-r--r--doc/classes/EditorNode3DGizmoPlugin.xml162
-rw-r--r--doc/classes/EditorPlugin.xml522
-rw-r--r--doc/classes/EditorProperty.xml18
-rw-r--r--doc/classes/EditorResourcePicker.xml34
-rw-r--r--doc/classes/EditorResourcePreviewGenerator.xml16
-rw-r--r--doc/classes/EditorScenePostImport.xml20
-rw-r--r--doc/classes/EditorSyntaxHighlighter.xml2
-rw-r--r--doc/classes/EditorTranslationParserPlugin.xml14
-rw-r--r--doc/classes/FileSystemDock.xml34
-rw-r--r--doc/classes/ResourceFormatLoader.xml12
-rw-r--r--doc/classes/ResourceFormatSaver.xml8
-rw-r--r--doc/classes/ScriptEditor.xml34
-rw-r--r--doc/classes/ScriptEditorBase.xml2
-rw-r--r--doc/classes/Tree.xml2
-rw-r--r--doc/classes/Viewport.xml2
20 files changed, 689 insertions, 797 deletions
diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml
index 8204b456d9..fddd8989ab 100644
--- a/doc/classes/AnimationNode.xml
+++ b/doc/classes/AnimationNode.xml
@@ -11,6 +11,65 @@
<link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
</tutorials>
<methods>
+ <method name="_get_caption" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <description>
+ Gets the text caption for this node (used by some editors).
+ </description>
+ </method>
+ <method name="_get_child_by_name" qualifiers="virtual">
+ <return type="Object">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <description>
+ Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
+ </description>
+ </method>
+ <method name="_get_child_nodes" qualifiers="virtual">
+ <return type="Dictionary">
+ </return>
+ <description>
+ Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
+ </description>
+ </method>
+ <method name="_get_parameter_default_value" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="name" type="StringName">
+ </argument>
+ <description>
+ Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
+ </description>
+ </method>
+ <method name="_get_parameter_list" qualifiers="virtual">
+ <return type="Array">
+ </return>
+ <description>
+ Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
+ </description>
+ </method>
+ <method name="_has_filter" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <description>
+ Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
+ </description>
+ </method>
+ <method name="_process" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="time" type="float">
+ </argument>
+ <argument index="1" name="seek" type="bool">
+ </argument>
+ <description>
+ User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
+ Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
+ This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
+ </description>
+ </method>
<method name="add_input">
<return type="void">
</return>
@@ -77,29 +136,6 @@
Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition.
</description>
</method>
- <method name="get_caption" qualifiers="virtual">
- <return type="String">
- </return>
- <description>
- Gets the text caption for this node (used by some editors).
- </description>
- </method>
- <method name="get_child_by_name" qualifiers="virtual">
- <return type="Object">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <description>
- Gets a child node by index (used by editors inheriting from [AnimationRootNode]).
- </description>
- </method>
- <method name="get_child_nodes" qualifiers="virtual">
- <return type="Dictionary">
- </return>
- <description>
- Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode].
- </description>
- </method>
<method name="get_input_count" qualifiers="const">
<return type="int">
</return>
@@ -125,29 +161,6 @@
Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
</description>
</method>
- <method name="get_parameter_default_value" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="name" type="StringName">
- </argument>
- <description>
- Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees.
- </description>
- </method>
- <method name="get_parameter_list" qualifiers="virtual">
- <return type="Array">
- </return>
- <description>
- Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list].
- </description>
- </method>
- <method name="has_filter" qualifiers="virtual">
- <return type="bool">
- </return>
- <description>
- Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node.
- </description>
- </method>
<method name="is_path_filtered" qualifiers="const">
<return type="bool">
</return>
@@ -157,19 +170,6 @@
Returns [code]true[/code] whether a given path is filtered.
</description>
</method>
- <method name="process" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="time" type="float">
- </argument>
- <argument index="1" name="seek" type="bool">
- </argument>
- <description>
- User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute.
- Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory.
- This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).
- </description>
- </method>
<method name="remove_input">
<return type="void">
</return>
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index 9c61fca598..33969cf4c3 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -22,6 +22,34 @@
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
+ <method name="_can_drop_data" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
+ This method should only be used to test the data. Process the data in [method _drop_data].
+ [codeblocks]
+ [gdscript]
+ func _can_drop_data(position, data):
+ # Check position if it is relevant to you
+ # Otherwise, just check data
+ return typeof(data) == TYPE_DICTIONARY and data.has("expected")
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ // Check position if it is relevant to you
+ // Otherwise, just check data
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("expected");
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="_clips_input" qualifiers="virtual">
<return type="bool">
</return>
@@ -30,6 +58,61 @@
If not overridden, defaults to [code]false[/code].
</description>
</method>
+ <method name="_drop_data" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <argument index="1" name="data" type="Variant">
+ </argument>
+ <description>
+ Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
+ [codeblocks]
+ [gdscript]
+ func _can_drop_data(position, data):
+ return typeof(data) == TYPE_DICTIONARY and data.has("color")
+ func _drop_data(position, data):
+ var color = data["color"]
+ [/gdscript]
+ [csharp]
+ public override bool CanDropData(Vector2 position, object data)
+ {
+ return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("color");
+ }
+ public override void DropData(Vector2 position, object data)
+ {
+ Color color = (Color)(data as Godot.Collections.Dictionary)["color"];
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="_get_drag_data" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="position" type="Vector2">
+ </argument>
+ <description>
+ Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
+ A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
+ [codeblocks]
+ [gdscript]
+ func _get_drag_data(position):
+ var mydata = make_data() # This is your custom method generating the drag data.
+ set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.
+ return mydata
+ [/gdscript]
+ [csharp]
+ public override object GetDragData(Vector2 position)
+ {
+ object mydata = MakeData(); // This is your custom method generating the drag data.
+ SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data.
+ return mydata;
+ }
+ [/csharp]
+ [/codeblocks]
+ </description>
+ </method>
<method name="_get_minimum_size" qualifiers="virtual">
<return type="Vector2">
</return>
@@ -68,13 +151,24 @@
[/csharp]
[/codeblocks]
The event won't trigger if:
- * clicking outside the control (see [method has_point]);
+ * clicking outside the control (see [method _has_point]);
* control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE];
* control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event;
* it happens outside parent's rectangle and the parent has either [member rect_clip_content] or [method _clips_input] enabled.
</description>
</method>
+ <method name="_has_point" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="point" type="Vector2">
+ </argument>
+ <description>
+ Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
+ If not overridden, default behavior is checking if the point is within control's Rect.
+ [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
+ </description>
+ </method>
<method name="_make_custom_tooltip" qualifiers="virtual">
<return type="Control">
</return>
@@ -249,63 +343,6 @@
[/codeblocks]
</description>
</method>
- <method name="can_drop_data" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- Godot calls this method to test if [code]data[/code] from a control's [method get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control.
- This method should only be used to test the data. Process the data in [method drop_data].
- [codeblocks]
- [gdscript]
- func can_drop_data(position, data):
- # Check position if it is relevant to you
- # Otherwise, just check data
- return typeof(data) == TYPE_DICTIONARY and data.has("expected")
- [/gdscript]
- [csharp]
- public override bool CanDropData(Vector2 position, object data)
- {
- // Check position if it is relevant to you
- // Otherwise, just check data
- return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("expected");
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
- <method name="drop_data" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <description>
- Godot calls this method to pass you the [code]data[/code] from a control's [method get_drag_data] result. Godot first calls [method can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control.
- [codeblocks]
- [gdscript]
- func can_drop_data(position, data):
- return typeof(data) == TYPE_DICTIONARY and data.has("color")
- func drop_data(position, data):
- var color = data["color"]
- [/gdscript]
- [csharp]
- public override bool CanDropData(Vector2 position, object data)
- {
- return data is Godot.Collections.Dictionary &amp;&amp; (data as Godot.Collections.Dictionary).Contains("color");
- }
- public override void DropData(Vector2 position, object data)
- {
- Color color = (Color)(data as Godot.Collections.Dictionary)["color"];
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
<method name="find_next_valid_focus" qualifiers="const">
<return type="Control">
</return>
@@ -328,8 +365,8 @@
<argument index="1" name="preview" type="Control">
</argument>
<description>
- Forces drag and bypasses [method get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control.
- The methods [method can_drop_data] and [method drop_data] must be implemented on controls that want to receive drop data.
+ Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control.
+ The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data.
</description>
</method>
<method name="get_anchor" qualifiers="const">
@@ -364,32 +401,6 @@
Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape].
</description>
</method>
- <method name="get_drag_data" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method can_drop_data] and [method drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag].
- A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method.
- [codeblocks]
- [gdscript]
- func get_drag_data(position):
- var mydata = make_data() # This is your custom method generating the drag data.
- set_drag_preview(make_preview(mydata)) # This is your custom method generating the preview of the drag data.
- return mydata
- [/gdscript]
- [csharp]
- public override object GetDragData(Vector2 position)
- {
- object mydata = MakeData(); // This is your custom method generating the drag data.
- SetDragPreview(MakePreview(mydata)); // This is your custom method generating the preview of the drag data.
- return mydata;
- }
- [/csharp]
- [/codeblocks]
- </description>
- </method>
<method name="get_end" qualifiers="const">
<return type="Vector2">
</return>
@@ -577,17 +588,6 @@
Returns [code]true[/code] if this is the current focused control. See [member focus_mode].
</description>
</method>
- <method name="has_point" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <description>
- Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control.
- If not overridden, default behavior is checking if the point is within control's Rect.
- [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code].
- </description>
- </method>
<method name="has_theme_color" qualifiers="const">
<return type="bool">
</return>
@@ -856,7 +856,7 @@
</argument>
<description>
Forwards the handling of this control's drag and drop to [code]target[/code] control.
- Forwarding can be implemented in the target control similar to the methods [method get_drag_data], [method can_drop_data], and [method drop_data] but with two differences:
+ Forwarding can be implemented in the target control similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences:
1. The function name must be suffixed with [b]_fw[/b]
2. The function must take an extra argument that is the control doing the forwarding
[codeblocks]
@@ -871,13 +871,13 @@
# TargetControl.gd
extends Control
- func can_drop_data_fw(position, data, from_control):
+ func _can_drop_data_fw(position, data, from_control):
return true
- func drop_data_fw(position, data, from_control):
+ func _drop_data_fw(position, data, from_control):
my_handle_data(data) # Your handler method.
- func get_drag_data_fw(position, from_control):
+ func _get_drag_data_fw(position, from_control):
set_drag_preview(my_preview)
return my_data()
[/gdscript]
@@ -922,12 +922,12 @@
<argument index="0" name="control" type="Control">
</argument>
<description>
- Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
+ Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended.
[codeblocks]
[gdscript]
export (Color, RGBA) var color = Color(1, 0, 0, 1)
- func get_drag_data(position):
+ func _get_drag_data(position):
# Use a control that is not in the tree
var cpb = ColorPickerButton.new()
cpb.color = color
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index 663eb0ff5c..a532e9bc2b 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -5,45 +5,45 @@
</brief_description>
<description>
EditorImportPlugins provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. Register your [EditorPlugin] with [method EditorPlugin.add_import_plugin].
- EditorImportPlugins work by associating with specific file extensions and a resource type. See [method get_recognized_extensions] and [method get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory.
+ EditorImportPlugins work by associating with specific file extensions and a resource type. See [method _get_recognized_extensions] and [method _get_resource_type]. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the [code].godot/imported[/code] directory.
Below is an example EditorImportPlugin that imports a [Mesh] from a file with the extension ".special" or ".spec":
[codeblocks]
[gdscript]
tool
extends EditorImportPlugin
- func get_importer_name():
+ func _get_importer_name():
return "my.special.plugin"
- func get_visible_name():
+ func _get_visible_name():
return "Special Mesh"
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["special", "spec"]
- func get_save_extension():
+ func _get_save_extension():
return "mesh"
- func get_resource_type():
+ func _get_resource_type():
return "Mesh"
- func get_preset_count():
+ func _get_preset_count():
return 1
- func get_preset_name(i):
+ func _get_preset_name(i):
return "Default"
- func get_import_options(i):
+ func _get_import_options(i):
return [{"name": "my_option", "default_value": false}]
- func import(source_file, save_path, options, platform_variants, gen_files):
+ func _import(source_file, save_path, options, platform_variants, gen_files):
var file = File.new()
if file.open(source_file, File.READ) != OK:
return FAILED
var mesh = ArrayMesh.new()
# Fill the Mesh with data read in "file", left as an exercise to the reader.
- var filename = save_path + "." + get_save_extension()
+ var filename = save_path + "." + _get_save_extension()
return ResourceSaver.save(filename, mesh)
[/gdscript]
[csharp]
@@ -113,7 +113,7 @@
<link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link>
</tutorials>
<methods>
- <method name="get_import_options" qualifiers="virtual">
+ <method name="_get_import_options" qualifiers="virtual">
<return type="Array">
</return>
<argument index="0" name="preset" type="int">
@@ -122,21 +122,21 @@
Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional).
</description>
</method>
- <method name="get_import_order" qualifiers="virtual">
+ <method name="_get_import_order" qualifiers="virtual">
<return type="int">
</return>
<description>
Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported.
</description>
</method>
- <method name="get_importer_name" qualifiers="virtual">
+ <method name="_get_importer_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the unique name of the importer.
</description>
</method>
- <method name="get_option_visibility" qualifiers="virtual">
+ <method name="_get_option_visibility" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="option" type="String">
@@ -147,7 +147,7 @@
This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example:
[codeblocks]
[gdscript]
- func get_option_visibility(option, options):
+ func _get_option_visibility(option, options):
# Only show the lossy quality setting if the compression mode is set to "Lossy".
if option == "compress/lossy_quality" and options.has("compress/mode"):
return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set
@@ -170,14 +170,14 @@
Return [code]true[/code] to make all options always visible.
</description>
</method>
- <method name="get_preset_count" qualifiers="virtual">
+ <method name="_get_preset_count" qualifiers="virtual">
<return type="int">
</return>
<description>
- Gets the number of initial presets defined by the plugin. Use [method get_import_options] to get the default options for the preset and [method get_preset_name] to get the name of the preset.
+ Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset.
</description>
</method>
- <method name="get_preset_name" qualifiers="virtual">
+ <method name="_get_preset_name" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="preset" type="int">
@@ -186,42 +186,42 @@
Gets the name of the options preset at this index.
</description>
</method>
- <method name="get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual">
<return type="float">
</return>
<description>
Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code].
</description>
</method>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="Array">
</return>
<description>
Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code].
</description>
</method>
- <method name="get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code].
</description>
</method>
- <method name="get_save_extension" qualifiers="virtual">
+ <method name="_get_save_extension" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the extension used to save this resource in the [code].godot/imported[/code] directory.
</description>
</method>
- <method name="get_visible_name" qualifiers="virtual">
+ <method name="_get_visible_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".
</description>
</method>
- <method name="import" qualifiers="virtual">
+ <method name="_import" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="source_file" type="String">
diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml
index b092a53676..c992d0fbb4 100644
--- a/doc/classes/EditorInspectorPlugin.xml
+++ b/doc/classes/EditorInspectorPlugin.xml
@@ -6,101 +6,95 @@
<description>
These plugins allow adding custom property editors to [EditorInspector].
Plugins are registered via [method EditorPlugin.add_inspector_plugin].
- When an object is edited, the [method can_handle] function is called and must return [code]true[/code] if the object type is supported.
- If supported, the function [method parse_begin] will be called, allowing to place custom controls at the beginning of the class.
- Subsequently, the [method parse_category] and [method parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
- Finally, [method parse_end] will be called.
+ When an object is edited, the [method _can_handle] function is called and must return [code]true[/code] if the object type is supported.
+ If supported, the function [method _parse_begin] will be called, allowing to place custom controls at the beginning of the class.
+ Subsequently, the [method _parse_category] and [method _parse_property] are called for every category and property. They offer the ability to add custom controls to the inspector too.
+ Finally, [method _parse_end] will be called.
On each of these calls, the "add" functions can be called.
</description>
<tutorials>
</tutorials>
<methods>
- <method name="add_custom_control">
- <return type="void">
+ <method name="_can_handle" qualifiers="virtual">
+ <return type="bool">
</return>
- <argument index="0" name="control" type="Control">
+ <argument index="0" name="object" type="Object">
</argument>
<description>
- Adds a custom control, not necessarily a property editor.
+ Returns [code]true[/code] if this object can be handled by this plugin.
</description>
</method>
- <method name="add_property_editor">
+ <method name="_parse_begin" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="property" type="String">
- </argument>
- <argument index="1" name="editor" type="Control">
- </argument>
<description>
- Adds a property editor, this must inherit [EditorProperty].
+ Called to allow adding controls at the beginning of the list.
</description>
</method>
- <method name="add_property_editor_for_multiple_properties">
+ <method name="_parse_category" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="label" type="String">
- </argument>
- <argument index="1" name="properties" type="PackedStringArray">
- </argument>
- <argument index="2" name="editor" type="Control">
+ <argument index="0" name="category" type="String">
</argument>
<description>
- Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty].
+ Called to allow adding controls at the beginning of the category.
</description>
</method>
- <method name="can_handle" qualifiers="virtual">
- <return type="bool">
+ <method name="_parse_end" qualifiers="virtual">
+ <return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
<description>
- Returns [code]true[/code] if this object can be handled by this plugin.
+ Called to allow adding controls at the end of the list.
</description>
</method>
- <method name="parse_begin" qualifiers="virtual">
- <return type="void">
+ <method name="_parse_property" qualifiers="virtual">
+ <return type="bool">
</return>
- <argument index="0" name="object" type="Object">
+ <argument index="0" name="type" type="int">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <argument index="2" name="hint" type="int">
+ </argument>
+ <argument index="3" name="hint_text" type="String">
+ </argument>
+ <argument index="4" name="usage" type="int">
</argument>
<description>
- Called to allow adding controls at the beginning of the list.
+ Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
</description>
</method>
- <method name="parse_category" qualifiers="virtual">
+ <method name="add_custom_control">
<return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="category" type="String">
+ <argument index="0" name="control" type="Control">
</argument>
<description>
- Called to allow adding controls at the beginning of the category.
+ Adds a custom control, not necessarily a property editor.
</description>
</method>
- <method name="parse_end" qualifiers="virtual">
+ <method name="add_property_editor">
<return type="void">
</return>
+ <argument index="0" name="property" type="String">
+ </argument>
+ <argument index="1" name="editor" type="Control">
+ </argument>
<description>
- Called to allow adding controls at the end of the list.
+ Adds a property editor, this must inherit [EditorProperty].
</description>
</method>
- <method name="parse_property" qualifiers="virtual">
- <return type="bool">
+ <method name="add_property_editor_for_multiple_properties">
+ <return type="void">
</return>
- <argument index="0" name="object" type="Object">
- </argument>
- <argument index="1" name="type" type="int">
- </argument>
- <argument index="2" name="path" type="String">
- </argument>
- <argument index="3" name="hint" type="int">
+ <argument index="0" name="label" type="String">
</argument>
- <argument index="4" name="hint_text" type="String">
+ <argument index="1" name="properties" type="PackedStringArray">
</argument>
- <argument index="5" name="usage" type="int">
+ <argument index="2" name="editor" type="Control">
</argument>
<description>
- Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one.
+ Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty].
</description>
</method>
</methods>
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 45541b9263..dcc6d6ef12 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -9,13 +9,76 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_commit_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="restore" type="Variant">
+ </argument>
+ <argument index="2" name="cancel" type="bool" default="false">
+ </argument>
+ <description>
+ Commit a handle being edited (handles must have been previously added by [method add_handles]).
+ If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided.
+ </description>
+ </method>
+ <method name="_get_handle_name" qualifiers="virtual">
+ <return type="String">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Gets the name of an edited handle (handles must have been previously added by [method add_handles]).
+ Handles can be named for reference to the user when editing.
+ </description>
+ </method>
+ <method name="_get_handle_value" qualifiers="virtual">
+ <return type="Variant">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method _commit_handle].
+ </description>
+ </method>
+ <method name="_is_handle_highlighted" qualifiers="virtual">
+ <return type="bool">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <description>
+ Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse.
+ </description>
+ </method>
+ <method name="_redraw" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
+ </description>
+ </method>
+ <method name="_set_handle" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="index" type="int">
+ </argument>
+ <argument index="1" name="camera" type="Camera3D">
+ </argument>
+ <argument index="2" name="point" type="Vector2">
+ </argument>
+ <description>
+ This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
+ The [Camera3D] is also provided so screen coordinates can be converted to raycasts.
+ </description>
+ </method>
<method name="add_collision_segments">
<return type="void">
</return>
<argument index="0" name="segments" type="PackedVector3Array">
</argument>
<description>
- Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method redraw].
+ Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method _redraw].
</description>
</method>
<method name="add_collision_triangles">
@@ -24,7 +87,7 @@
<argument index="0" name="triangles" type="TriangleMesh">
</argument>
<description>
- Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method redraw].
+ Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method _redraw].
</description>
</method>
<method name="add_handles">
@@ -40,7 +103,7 @@
</argument>
<description>
Adds a list of handles (points) which can be used to deform the object being edited.
- There are virtual functions which will be called upon editing of these handles. Call this function during [method redraw].
+ There are virtual functions which will be called upon editing of these handles. Call this function during [method _redraw].
</description>
</method>
<method name="add_lines">
@@ -55,7 +118,7 @@
<argument index="3" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<description>
- Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method redraw].
+ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method _redraw].
</description>
</method>
<method name="add_mesh">
@@ -70,7 +133,7 @@
<argument index="3" name="material" type="Material" default="null">
</argument>
<description>
- Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method redraw].
+ Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method _redraw].
</description>
</method>
<method name="add_unscaled_billboard">
@@ -83,7 +146,7 @@
<argument index="2" name="modulate" type="Color" default="Color( 1, 1, 1, 1 )">
</argument>
<description>
- Adds an unscaled billboard for visualization. Call this function during [method redraw].
+ Adds an unscaled billboard for visualization. Call this function during [method _redraw].
</description>
</method>
<method name="clear">
@@ -93,39 +156,6 @@
Removes everything in the gizmo including meshes, collisions and handles.
</description>
</method>
- <method name="commit_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="restore" type="Variant">
- </argument>
- <argument index="2" name="cancel" type="bool" default="false">
- </argument>
- <description>
- Commit a handle being edited (handles must have been previously added by [method add_handles]).
- If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided.
- </description>
- </method>
- <method name="get_handle_name" qualifiers="virtual">
- <return type="String">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Gets the name of an edited handle (handles must have been previously added by [method add_handles]).
- Handles can be named for reference to the user when editing.
- </description>
- </method>
- <method name="get_handle_value" qualifiers="virtual">
- <return type="Variant">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method commit_handle].
- </description>
- </method>
<method name="get_plugin" qualifiers="const">
<return type="EditorNode3DGizmoPlugin">
</return>
@@ -140,36 +170,6 @@
Returns the Node3D node associated with this gizmo.
</description>
</method>
- <method name="is_handle_highlighted" qualifiers="virtual">
- <return type="bool">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <description>
- Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse.
- </description>
- </method>
- <method name="redraw" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called).
- </description>
- </method>
- <method name="set_handle" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="index" type="int">
- </argument>
- <argument index="1" name="camera" type="Camera3D">
- </argument>
- <argument index="2" name="point" type="Vector2">
- </argument>
- <description>
- This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates.
- The [Camera3D] is also provided so screen coordinates can be converted to raycasts.
- </description>
- </method>
<method name="set_hidden">
<return type="void">
</return>
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 34657a1c08..5551326533 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -10,25 +10,14 @@
<link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link>
</tutorials>
<methods>
- <method name="add_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="material" type="StandardMaterial3D">
- </argument>
- <description>
- Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
- </description>
- </method>
- <method name="can_be_hidden" qualifiers="virtual">
+ <method name="_can_be_hidden" qualifiers="virtual">
<return type="bool">
</return>
<description>
Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden.
</description>
</method>
- <method name="commit_handle" qualifiers="virtual">
+ <method name="_commit_handle" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -43,69 +32,23 @@
Override this method to commit gizmo handles. Called for this plugin's active gizmos.
</description>
</method>
- <method name="create_gizmo" qualifiers="virtual">
+ <method name="_create_gizmo" qualifiers="virtual">
<return type="EditorNode3DGizmo">
</return>
<argument index="0" name="spatial" type="Node3D">
</argument>
<description>
- Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method has_gizmo].
- </description>
- </method>
- <method name="create_handle_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="billboard" type="bool" default="false">
- </argument>
- <argument index="2" name="texture" type="Texture2D" default="null">
- </argument>
- <description>
- Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
- You can optionally provide a texture to use instead of the default icon.
- </description>
- </method>
- <method name="create_icon_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="texture" type="Texture2D">
- </argument>
- <argument index="2" name="on_top" type="bool" default="false">
- </argument>
- <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
- </argument>
- <description>
- Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.
- </description>
- </method>
- <method name="create_material">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="color" type="Color">
- </argument>
- <argument index="2" name="billboard" type="bool" default="false">
- </argument>
- <argument index="3" name="on_top" type="bool" default="false">
- </argument>
- <argument index="4" name="use_vertex_color" type="bool" default="false">
- </argument>
- <description>
- Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
+ Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo].
</description>
</method>
- <method name="get_gizmo_name" qualifiers="virtual">
+ <method name="_get_gizmo_name" qualifiers="virtual">
<return type="String">
</return>
<description>
Override this method to provide the name that will appear in the gizmo visibility menu.
</description>
</method>
- <method name="get_handle_name" qualifiers="virtual">
+ <method name="_get_handle_name" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -116,7 +59,7 @@
Override this method to provide gizmo's handle names. Called for this plugin's active gizmos.
</description>
</method>
- <method name="get_handle_value" qualifiers="virtual">
+ <method name="_get_handle_value" qualifiers="virtual">
<return type="Variant">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -127,18 +70,7 @@
Gets actual value of a handle from gizmo. Called for this plugin's active gizmos.
</description>
</method>
- <method name="get_material">
- <return type="StandardMaterial3D">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null">
- </argument>
- <description>
- Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
- </description>
- </method>
- <method name="get_priority" qualifiers="virtual">
+ <method name="_get_priority" qualifiers="virtual">
<return type="int">
</return>
<description>
@@ -146,7 +78,7 @@
All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos.
</description>
</method>
- <method name="has_gizmo" qualifiers="virtual">
+ <method name="_has_gizmo" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="spatial" type="Node3D">
@@ -155,7 +87,7 @@
Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos.
</description>
</method>
- <method name="is_handle_highlighted" qualifiers="virtual">
+ <method name="_is_handle_highlighted" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -166,14 +98,14 @@
Gets whether a handle is highlighted or not. Called for this plugin's active gizmos.
</description>
</method>
- <method name="is_selectable_when_hidden" qualifiers="virtual">
+ <method name="_is_selectable_when_hidden" qualifiers="virtual">
<return type="bool">
</return>
<description>
Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden.
</description>
</method>
- <method name="redraw" qualifiers="virtual">
+ <method name="_redraw" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -182,7 +114,7 @@
Callback to redraw the provided gizmo. Called for this plugin's active gizmos.
</description>
</method>
- <method name="set_handle" qualifiers="virtual">
+ <method name="_set_handle" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="gizmo" type="EditorNode3DGizmo">
@@ -197,6 +129,74 @@
Update the value of a handle after it has been updated. Called for this plugin's active gizmos.
</description>
</method>
+ <method name="add_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="material" type="StandardMaterial3D">
+ </argument>
+ <description>
+ Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden.
+ </description>
+ </method>
+ <method name="create_handle_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="2" name="texture" type="Texture2D" default="null">
+ </argument>
+ <description>
+ Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden.
+ You can optionally provide a texture to use instead of the default icon.
+ </description>
+ </method>
+ <method name="create_icon_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="texture" type="Texture2D">
+ </argument>
+ <argument index="2" name="on_top" type="bool" default="false">
+ </argument>
+ <argument index="3" name="color" type="Color" default="Color( 1, 1, 1, 1 )">
+ </argument>
+ <description>
+ Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden.
+ </description>
+ </method>
+ <method name="create_material">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="color" type="Color">
+ </argument>
+ <argument index="2" name="billboard" type="bool" default="false">
+ </argument>
+ <argument index="3" name="on_top" type="bool" default="false">
+ </argument>
+ <argument index="4" name="use_vertex_color" type="bool" default="false">
+ </argument>
+ <description>
+ Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden.
+ </description>
+ </method>
+ <method name="get_material">
+ <return type="StandardMaterial3D">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null">
+ </argument>
+ <description>
+ Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable).
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index 6c40b7aa9d..2736414cb1 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -10,185 +10,7 @@
<link title="Editor plugins tutorial index">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/index.html</link>
</tutorials>
<methods>
- <method name="add_autoload_singleton">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="path" type="String">
- </argument>
- <description>
- Adds a script at [code]path[/code] to the Autoload list as [code]name[/code].
- </description>
- </method>
- <method name="add_control_to_bottom_panel">
- <return type="Button">
- </return>
- <argument index="0" name="control" type="Control">
- </argument>
- <argument index="1" name="title" type="String">
- </argument>
- <description>
- Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_control_to_container">
- <return type="void">
- </return>
- <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
- Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_control_to_dock">
- <return type="void">
- </return>
- <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
- </argument>
- <argument index="1" name="control" type="Control">
- </argument>
- <description>
- Adds the control to a specific dock slot (see [enum DockSlot] for options).
- If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
- When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
- </description>
- </method>
- <method name="add_custom_type">
- <return type="void">
- </return>
- <argument index="0" name="type" type="String">
- </argument>
- <argument index="1" name="base" type="String">
- </argument>
- <argument index="2" name="script" type="Script">
- </argument>
- <argument index="3" name="icon" type="Texture2D">
- </argument>
- <description>
- Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
- When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
- You can use the virtual method [method handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
- During run-time, this will be a simple object with a script so this function does not need to be called then.
- </description>
- </method>
- <method name="add_debugger_plugin">
- <return type="void">
- </return>
- <argument index="0" name="script" type="Script">
- </argument>
- <description>
- Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
- </description>
- </method>
- <method name="add_export_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorExportPlugin">
- </argument>
- <description>
- Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
- See [method add_inspector_plugin] for an example of how to register a plugin.
- </description>
- </method>
- <method name="add_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="importer" type="EditorImportPlugin">
- </argument>
- <description>
- Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
- [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead.
- See [method add_inspector_plugin] for an example of how to register a plugin.
- </description>
- </method>
- <method name="add_inspector_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorInspectorPlugin">
- </argument>
- <description>
- Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
- [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
- [codeblocks]
- [gdscript]
- const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
- var inspector_plugin = MyInspectorPlugin.new()
-
- func _enter_tree():
- add_inspector_plugin(inspector_plugin)
-
- func _exit_tree():
- remove_inspector_plugin(inspector_plugin)
- [/gdscript]
- [/codeblocks]
- </description>
- </method>
- <method name="add_scene_import_plugin">
- <return type="void">
- </return>
- <argument index="0" name="scene_importer" type="EditorSceneImporter">
- </argument>
- <description>
- Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes.
- </description>
- </method>
- <method name="add_spatial_gizmo_plugin">
- <return type="void">
- </return>
- <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
- </argument>
- <description>
- Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D].
- See [method add_inspector_plugin] for an example of how to register a plugin.
- </description>
- </method>
- <method name="add_tool_menu_item">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="callable" type="Callable">
- </argument>
- <description>
- Adds a custom menu item to [b]Project &gt; Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called.
- </description>
- </method>
- <method name="add_tool_submenu_item">
- <return type="void">
- </return>
- <argument index="0" name="name" type="String">
- </argument>
- <argument index="1" name="submenu" type="Object">
- </argument>
- <description>
- Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
- </description>
- </method>
- <method name="add_translation_parser_plugin">
- <return type="void">
- </return>
- <argument index="0" name="parser" type="EditorTranslationParserPlugin">
- </argument>
- <description>
- Registers a custom translation parser plugin for extracting translatable strings from custom files.
- </description>
- </method>
- <method name="add_undo_redo_inspector_hook_callback">
- <return type="void">
- </return>
- <argument index="0" name="callable" type="Callable">
- </argument>
- <description>
- Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
- The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
- </description>
- </method>
- <method name="apply_changes" qualifiers="virtual">
+ <method name="_apply_changes" qualifiers="virtual">
<return type="void">
</return>
<description>
@@ -196,29 +18,29 @@
This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
</description>
</method>
- <method name="build" qualifiers="virtual">
+ <method name="_build" qualifiers="virtual">
<return type="bool">
</return>
<description>
This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
- This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method build] methods from running.
+ This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running.
</description>
</method>
- <method name="clear" qualifiers="virtual">
+ <method name="_clear" qualifiers="virtual">
<return type="void">
</return>
<description>
Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
</description>
</method>
- <method name="disable_plugin" qualifiers="virtual">
+ <method name="_disable_plugin" qualifiers="virtual">
<return type="void">
</return>
<description>
Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
- <method name="edit" qualifiers="virtual">
+ <method name="_edit" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="object" type="Object">
@@ -227,14 +49,14 @@
This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
</description>
</method>
- <method name="enable_plugin" qualifiers="virtual">
+ <method name="_enable_plugin" qualifiers="virtual">
<return type="void">
</return>
<description>
Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window.
</description>
</method>
- <method name="forward_canvas_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
@@ -243,11 +65,11 @@
Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func forward_canvas_draw_over_viewport(overlay):
+ func _forward_canvas_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white)
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -274,27 +96,27 @@
[/codeblocks]
</description>
</method>
- <method name="forward_canvas_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
</argument>
<description>
- This method is the same as [method forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="forward_canvas_gui_input" qualifiers="virtual">
+ <method name="_forward_canvas_gui_input" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
return true
[/gdscript]
[csharp]
@@ -309,7 +131,7 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func forward_canvas_gui_input(event):
+ func _forward_canvas_gui_input(event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
@@ -322,7 +144,7 @@
[/codeblocks]
</description>
</method>
- <method name="forward_spatial_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
@@ -331,11 +153,11 @@
Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays].
[codeblocks]
[gdscript]
- func forward_spatial_draw_over_viewport(overlay):
+ func _forward_spatial_draw_over_viewport(overlay):
# Draw a circle at cursor position.
overlay.draw_circle(overlay.get_local_mouse_position(), 64)
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
if event is InputEventMouseMotion:
# Redraw viewport when cursor is moved.
update_overlays()
@@ -362,17 +184,17 @@
[/codeblocks]
</description>
</method>
- <method name="forward_spatial_force_draw_over_viewport" qualifiers="virtual">
+ <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="overlay" type="Control">
</argument>
<description>
- This method is the same as [method forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
+ This method is the same as [method _forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled].
</description>
</method>
- <method name="forward_spatial_gui_input" qualifiers="virtual">
+ <method name="_forward_spatial_gui_input" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="camera" type="Camera3D">
@@ -380,11 +202,11 @@
<argument index="1" name="event" type="InputEvent">
</argument>
<description>
- Called when there is a root node in the current edited scene, [method handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
+ Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example:
[codeblocks]
[gdscript]
# Prevents the InputEvent to reach other Editor classes.
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
return true
[/gdscript]
[csharp]
@@ -399,7 +221,7 @@
[codeblocks]
[gdscript]
# Consumes InputEventMouseMotion and forwards other InputEvent types.
- func forward_spatial_gui_input(camera, event):
+ func _forward_spatial_gui_input(camera, event):
return event is InputEventMouseMotion
[/gdscript]
[csharp]
@@ -412,21 +234,14 @@
[/codeblocks]
</description>
</method>
- <method name="get_breakpoints" qualifiers="virtual">
+ <method name="_get_breakpoints" qualifiers="virtual">
<return type="PackedStringArray">
</return>
<description>
This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code].
</description>
</method>
- <method name="get_editor_interface">
- <return type="EditorInterface">
- </return>
- <description>
- Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities.
- </description>
- </method>
- <method name="get_plugin_icon" qualifiers="virtual">
+ <method name="_get_plugin_icon" qualifiers="virtual">
<return type="Texture2D">
</return>
<description>
@@ -435,7 +250,7 @@
Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
[codeblocks]
[gdscript]
- func get_plugin_icon():
+ func _get_plugin_icon():
# You can use a custom icon:
return preload("res://addons/my_plugin/my_plugin_icon.svg")
# Or use a built-in icon:
@@ -453,7 +268,7 @@
[/codeblocks]
</description>
</method>
- <method name="get_plugin_name" qualifiers="virtual">
+ <method name="_get_plugin_name" qualifiers="virtual">
<return type="String">
</return>
<description>
@@ -461,29 +276,14 @@
For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
</description>
</method>
- <method name="get_script_create_dialog">
- <return type="ScriptCreateDialog">
- </return>
- <description>
- Gets the Editor's dialogue used for making scripts.
- [b]Note:[/b] Users can configure it before use.
- </description>
- </method>
- <method name="get_state" qualifiers="virtual">
+ <method name="_get_state" qualifiers="virtual">
<return type="Dictionary">
</return>
<description>
Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns).
</description>
</method>
- <method name="get_undo_redo">
- <return type="UndoRedo">
- </return>
- <description>
- Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
- </description>
- </method>
- <method name="get_window_layout" qualifiers="virtual">
+ <method name="_get_window_layout" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="layout" type="ConfigFile">
@@ -492,44 +292,260 @@
Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock).
</description>
</method>
- <method name="handles" qualifiers="virtual">
+ <method name="_handles" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="object" type="Object">
</argument>
<description>
- Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method edit] and [method make_visible] called when the editor requests them. If you have declared the methods [method forward_canvas_gui_input] and [method forward_spatial_gui_input] these will be called too.
+ Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_spatial_gui_input] these will be called too.
</description>
</method>
- <method name="has_main_screen" qualifiers="virtual">
+ <method name="_has_main_screen" qualifiers="virtual">
<return type="bool">
</return>
<description>
Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]).
</description>
</method>
- <method name="hide_bottom_panel">
+ <method name="_make_visible" qualifiers="virtual">
<return type="void">
</return>
+ <argument index="0" name="visible" type="bool">
+ </argument>
<description>
+ This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
+ Remember that you have to manage the visibility of all your editor controls manually.
</description>
</method>
- <method name="make_bottom_panel_item_visible">
+ <method name="_save_external_data" qualifiers="virtual">
<return type="void">
</return>
- <argument index="0" name="item" type="Control">
+ <description>
+ This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
+ </description>
+ </method>
+ <method name="_set_state" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <argument index="0" name="state" type="Dictionary">
</argument>
<description>
+ Restore the state saved by [method _get_state].
</description>
</method>
- <method name="make_visible" qualifiers="virtual">
+ <method name="add_autoload_singleton">
<return type="void">
</return>
- <argument index="0" name="visible" type="bool">
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="path" type="String">
+ </argument>
+ <description>
+ Adds a script at [code]path[/code] to the Autoload list as [code]name[/code].
+ </description>
+ </method>
+ <method name="add_control_to_bottom_panel">
+ <return type="Button">
+ </return>
+ <argument index="0" name="control" type="Control">
+ </argument>
+ <argument index="1" name="title" type="String">
+ </argument>
+ <description>
+ Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free].
+ </description>
+ </method>
+ <method name="add_control_to_container">
+ <return type="void">
+ </return>
+ <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer">
+ </argument>
+ <argument index="1" name="control" type="Control">
+ </argument>
+ <description>
+ Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI.
+ Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_container] and free it with [method Node.queue_free].
+ </description>
+ </method>
+ <method name="add_control_to_dock">
+ <return type="void">
+ </return>
+ <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot">
+ </argument>
+ <argument index="1" name="control" type="Control">
+ </argument>
+ <description>
+ Adds the control to a specific dock slot (see [enum DockSlot] for options).
+ If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
+ When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_docks] and free it with [method Node.queue_free].
+ </description>
+ </method>
+ <method name="add_custom_type">
+ <return type="void">
+ </return>
+ <argument index="0" name="type" type="String">
+ </argument>
+ <argument index="1" name="base" type="String">
+ </argument>
+ <argument index="2" name="script" type="Script">
+ </argument>
+ <argument index="3" name="icon" type="Texture2D">
+ </argument>
+ <description>
+ Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
+ When given node or resource is selected, the base type will be instanced (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
+ You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword.
+ During run-time, this will be a simple object with a script so this function does not need to be called then.
+ </description>
+ </method>
+ <method name="add_debugger_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="script" type="Script">
+ </argument>
+ <description>
+ Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin].
+ </description>
+ </method>
+ <method name="add_export_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorExportPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported.
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="importer" type="EditorImportPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type.
+ [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead.
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_inspector_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorInspectorPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties.
+ [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior.
+ [codeblocks]
+ [gdscript]
+ const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
+ var inspector_plugin = MyInspectorPlugin.new()
+
+ func _enter_tree():
+ add_inspector_plugin(inspector_plugin)
+
+ func _exit_tree():
+ remove_inspector_plugin(inspector_plugin)
+ [/gdscript]
+ [/codeblocks]
+ </description>
+ </method>
+ <method name="add_scene_import_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="scene_importer" type="EditorSceneImporter">
+ </argument>
+ <description>
+ Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes.
+ </description>
+ </method>
+ <method name="add_spatial_gizmo_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin">
+ </argument>
+ <description>
+ Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D].
+ See [method add_inspector_plugin] for an example of how to register a plugin.
+ </description>
+ </method>
+ <method name="add_tool_menu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="callable" type="Callable">
+ </argument>
+ <description>
+ Adds a custom menu item to [b]Project &gt; Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called.
+ </description>
+ </method>
+ <method name="add_tool_submenu_item">
+ <return type="void">
+ </return>
+ <argument index="0" name="name" type="String">
+ </argument>
+ <argument index="1" name="submenu" type="Object">
+ </argument>
+ <description>
+ Adds a custom submenu under [b]Project &gt; Tools &gt;[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu.
+ </description>
+ </method>
+ <method name="add_translation_parser_plugin">
+ <return type="void">
+ </return>
+ <argument index="0" name="parser" type="EditorTranslationParserPlugin">
+ </argument>
+ <description>
+ Registers a custom translation parser plugin for extracting translatable strings from custom files.
+ </description>
+ </method>
+ <method name="add_undo_redo_inspector_hook_callback">
+ <return type="void">
+ </return>
+ <argument index="0" name="callable" type="Callable">
+ </argument>
+ <description>
+ Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
+ The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
+ </description>
+ </method>
+ <method name="get_editor_interface">
+ <return type="EditorInterface">
+ </return>
+ <description>
+ Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities.
+ </description>
+ </method>
+ <method name="get_script_create_dialog">
+ <return type="ScriptCreateDialog">
+ </return>
+ <description>
+ Gets the Editor's dialogue used for making scripts.
+ [b]Note:[/b] Users can configure it before use.
+ </description>
+ </method>
+ <method name="get_undo_redo">
+ <return type="UndoRedo">
+ </return>
+ <description>
+ Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
+ </description>
+ </method>
+ <method name="hide_bottom_panel">
+ <return type="void">
+ </return>
+ <description>
+ </description>
+ </method>
+ <method name="make_bottom_panel_item_visible">
+ <return type="void">
+ </return>
+ <argument index="0" name="item" type="Control">
</argument>
<description>
- This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
- Remember that you have to manage the visibility of all your editor controls manually.
</description>
</method>
<method name="queue_save_layout">
@@ -667,34 +683,18 @@
Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback].
</description>
</method>
- <method name="save_external_data" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
- </description>
- </method>
<method name="set_force_draw_over_forwarding_enabled">
<return type="void">
</return>
<description>
- Enables calling of [method forward_canvas_force_draw_over_viewport] for the 2D editor and [method forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
+ Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
</description>
</method>
<method name="set_input_event_forwarding_always_enabled">
<return type="void">
</return>
<description>
- Use this method if you always want to receive inputs from 3D view screen inside [method forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
- </description>
- </method>
- <method name="set_state" qualifiers="virtual">
- <return type="void">
- </return>
- <argument index="0" name="state" type="Dictionary">
- </argument>
- <description>
- Restore the state saved by [method get_state].
+ Use this method if you always want to receive inputs from 3D view screen inside [method _forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene.
</description>
</method>
<method name="set_window_layout" qualifiers="virtual">
@@ -703,14 +703,14 @@
<argument index="0" name="layout" type="ConfigFile">
</argument>
<description>
- Restore the plugin GUI layout saved by [method get_window_layout].
+ Restore the plugin GUI layout saved by [method _get_window_layout].
</description>
</method>
<method name="update_overlays" qualifiers="const">
<return type="int">
</return>
<description>
- Updates the overlays of the 2D and 3D editor viewport. Causes methods [method forward_canvas_draw_over_viewport], [method forward_canvas_force_draw_over_viewport], [method forward_spatial_draw_over_viewport] and [method forward_spatial_force_draw_over_viewport] to be called.
+ Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_spatial_draw_over_viewport] and [method _forward_spatial_force_draw_over_viewport] to be called.
</description>
</method>
</methods>
diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml
index fd9fae435b..549d2c1628 100644
--- a/doc/classes/EditorProperty.xml
+++ b/doc/classes/EditorProperty.xml
@@ -9,6 +9,13 @@
<tutorials>
</tutorials>
<methods>
+ <method name="_update_property" qualifiers="virtual">
+ <return type="void">
+ </return>
+ <description>
+ When this virtual function is called, you must update your editor.
+ </description>
+ </method>
<method name="add_focusable">
<return type="void">
</return>
@@ -44,7 +51,7 @@
<return type="StringName">
</return>
<description>
- Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin.parse_property]), then this will return the property.
+ Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property.
</description>
</method>
<method name="get_tooltip_text" qualifiers="const">
@@ -63,13 +70,6 @@
Adds controls with this function if you want them on the bottom (below the label).
</description>
</method>
- <method name="update_property" qualifiers="virtual">
- <return type="void">
- </return>
- <description>
- When this virtual function is called, you must update your editor.
- </description>
- </method>
</methods>
<members>
<member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false">
@@ -101,7 +101,7 @@
<argument index="1" name="value" type="Array">
</argument>
<description>
- Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin.parse_property].
+ Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property].
</description>
</signal>
<signal name="object_id_selected">
diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml
index 30c73daa77..508b546ef3 100644
--- a/doc/classes/EditorResourcePicker.xml
+++ b/doc/classes/EditorResourcePicker.xml
@@ -10,30 +10,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_drop_data_fw" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data_fw">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="get_allowed_types" qualifiers="const">
<return type="PackedStringArray">
</return>
@@ -41,16 +17,6 @@
Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned.
</description>
</method>
- <method name="get_drag_data_fw">
- <return type="Variant">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="handle_menu_selected" qualifiers="virtual">
<return type="void">
</return>
diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml
index c191c9db12..3594474e36 100644
--- a/doc/classes/EditorResourcePreviewGenerator.xml
+++ b/doc/classes/EditorResourcePreviewGenerator.xml
@@ -9,15 +9,15 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_generate_small_preview" qualifiers="virtual">
+ <method name="_can_generate_small_preview" qualifiers="virtual">
<return type="bool">
</return>
<description>
- If this function returns [code]true[/code], the generator will call [method generate] or [method generate_from_path] for small previews as well.
+ If this function returns [code]true[/code], the generator will call [method _generate] or [method _generate_from_path] for small previews as well.
By default, it returns [code]false[/code].
</description>
</method>
- <method name="generate" qualifiers="virtual">
+ <method name="_generate" qualifiers="virtual">
<return type="Texture2D">
</return>
<argument index="0" name="from" type="Resource">
@@ -30,7 +30,7 @@
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="generate_from_path" qualifiers="virtual">
+ <method name="_generate_from_path" qualifiers="virtual">
<return type="Texture2D">
</return>
<argument index="0" name="path" type="String">
@@ -38,20 +38,20 @@
<argument index="1" name="size" type="Vector2">
</argument>
<description>
- Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method generate].
+ Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate].
Returning an empty texture is an OK way to fail and let another generator take care.
Care must be taken because this function is always called from a thread (not the main thread).
</description>
</method>
- <method name="generate_small_preview_automatically" qualifiers="virtual">
+ <method name="_generate_small_preview_automatically" qualifiers="virtual">
<return type="bool">
</return>
<description>
- If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method generate] or [method generate_from_path].
+ If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path].
By default, it returns [code]false[/code].
</description>
</method>
- <method name="handles" qualifiers="virtual">
+ <method name="_handles" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="type" type="String">
diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml
index 789366c2a4..d2b5e84ff7 100644
--- a/doc/classes/EditorScenePostImport.xml
+++ b/doc/classes/EditorScenePostImport.xml
@@ -5,14 +5,14 @@
</brief_description>
<description>
Imported scenes can be automatically modified right after import by setting their [b]Custom Script[/b] Import property to a [code]tool[/code] script that inherits from this class.
- The [method post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
+ The [method _post_import] callback receives the imported scene's root node and returns the modified version of the scene. Usage example:
[codeblocks]
[gdscript]
tool # Needed so it runs in editor.
extends EditorScenePostImport
# This sample changes all node names.
# Called right after the scene is imported and gets the root node.
- func post_import(scene):
+ func _post_import(scene):
# Change all node names to "modified_[oldnodename]"
iterate(scene)
return scene # Remember to return the imported scene
@@ -55,14 +55,7 @@
<link title="Importing 3D scenes: Custom script">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_scenes.html#custom-script</link>
</tutorials>
<methods>
- <method name="get_source_file" qualifiers="const">
- <return type="String">
- </return>
- <description>
- Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
- </description>
- </method>
- <method name="post_import" qualifiers="virtual">
+ <method name="_post_import" qualifiers="virtual">
<return type="Object">
</return>
<argument index="0" name="scene" type="Object">
@@ -71,6 +64,13 @@
Called after the scene was imported. This method must return the modified version of the scene.
</description>
</method>
+ <method name="get_source_file" qualifiers="const">
+ <return type="String">
+ </return>
+ <description>
+ Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]).
+ </description>
+ </method>
</methods>
<constants>
</constants>
diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml
index b80e81928f..d81b25345f 100644
--- a/doc/classes/EditorSyntaxHighlighter.xml
+++ b/doc/classes/EditorSyntaxHighlighter.xml
@@ -5,7 +5,7 @@
</brief_description>
<description>
Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor].
- Add a syntax highlighter to an individual script by calling [method ScriptEditorBase.add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
+ Add a syntax highlighter to an individual script by calling [method ScriptEditorBase._add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter]
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml
index 349d2ec934..a9f4e90e72 100644
--- a/doc/classes/EditorTranslationParserPlugin.xml
+++ b/doc/classes/EditorTranslationParserPlugin.xml
@@ -4,7 +4,7 @@
Plugin for adding custom parsers to extract strings that are to be translated from custom files (.csv, .json etc.).
</brief_description>
<description>
- Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method parse_file] method in script.
+ Plugins are registered via [method EditorPlugin.add_translation_parser_plugin] method. To define the parsing and string extraction logic, override the [method _parse_file] method in script.
Add the extracted strings to argument [code]msgids[/code] or [code]msgids_context_plural[/code] if context or plural is used.
When adding to [code]msgids_context_plural[/code], you must add the data using the format [code]["A", "B", "C"][/code], where [code]A[/code] represents the extracted string, [code]B[/code] represents the context, and [code]C[/code] represents the plural version of the extracted string. If you want to add only context but not plural, put [code]""[/code] for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples.
The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu.
@@ -14,7 +14,7 @@
tool
extends EditorTranslationParserPlugin
- func parse_file(path, msgids, msgids_context_plural):
+ func _parse_file(path, msgids, msgids_context_plural):
var file = File.new()
file.open(path, File.READ)
var text = file.get_as_text()
@@ -23,7 +23,7 @@
msgids.append(s)
#print("Extracted string: " + s)
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["csv"]
[/gdscript]
[csharp]
@@ -76,12 +76,12 @@
For example:
[codeblocks]
[gdscript]
- func parse_file(path, msgids, msgids_context_plural):
+ func _parse_file(path, msgids, msgids_context_plural):
var res = ResourceLoader.load(path, "Script")
var text = res.source_code
# Parsing logic.
- func get_recognized_extensions():
+ func _get_recognized_extensions():
return ["gd"]
[/gdscript]
[csharp]
@@ -102,14 +102,14 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="Array">
</return>
<description>
Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code].
</description>
</method>
- <method name="parse_file" qualifiers="virtual">
+ <method name="_parse_file" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml
index c553f90e37..15f92e90e3 100644
--- a/doc/classes/FileSystemDock.xml
+++ b/doc/classes/FileSystemDock.xml
@@ -7,40 +7,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_drop_data_fw" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data_fw">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="get_drag_data_fw">
- <return type="Variant">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <argument index="1" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="navigate_to_path">
<return type="void">
</return>
diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml
index aed194095b..6abe5c813b 100644
--- a/doc/classes/ResourceFormatLoader.xml
+++ b/doc/classes/ResourceFormatLoader.xml
@@ -11,7 +11,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_dependencies" qualifiers="virtual">
+ <method name="_get_dependencies" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="path" type="String">
@@ -23,14 +23,14 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="PackedStringArray">
</return>
<description>
Gets the list of extensions for files this loader is able to read.
</description>
</method>
- <method name="get_resource_type" qualifiers="virtual">
+ <method name="_get_resource_type" qualifiers="virtual">
<return type="String">
</return>
<argument index="0" name="path" type="String">
@@ -40,7 +40,7 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them.
</description>
</method>
- <method name="handles_type" qualifiers="virtual">
+ <method name="_handles_type" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="typename" type="StringName">
@@ -50,7 +50,7 @@
[b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them.
</description>
</method>
- <method name="load" qualifiers="virtual">
+ <method name="_load" qualifiers="virtual">
<return type="Variant">
</return>
<argument index="0" name="path" type="String">
@@ -66,7 +66,7 @@
The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details.
</description>
</method>
- <method name="rename_dependencies" qualifiers="virtual">
+ <method name="_rename_dependencies" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml
index edbf8d73f8..df71e05d02 100644
--- a/doc/classes/ResourceFormatSaver.xml
+++ b/doc/classes/ResourceFormatSaver.xml
@@ -10,16 +10,16 @@
<tutorials>
</tutorials>
<methods>
- <method name="get_recognized_extensions" qualifiers="virtual">
+ <method name="_get_recognized_extensions" qualifiers="virtual">
<return type="PackedStringArray">
</return>
<argument index="0" name="resource" type="Resource">
</argument>
<description>
- Returns the list of extensions available for saving the resource object, provided it is recognized (see [method recognize]).
+ Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]).
</description>
</method>
- <method name="recognize" qualifiers="virtual">
+ <method name="_recognize" qualifiers="virtual">
<return type="bool">
</return>
<argument index="0" name="resource" type="Resource">
@@ -28,7 +28,7 @@
Returns whether the given resource object can be saved by this saver.
</description>
</method>
- <method name="save" qualifiers="virtual">
+ <method name="_save" qualifiers="virtual">
<return type="int">
</return>
<argument index="0" name="path" type="String">
diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml
index 28620bd29b..31dbf7453f 100644
--- a/doc/classes/ScriptEditor.xml
+++ b/doc/classes/ScriptEditor.xml
@@ -9,30 +9,6 @@
<tutorials>
</tutorials>
<methods>
- <method name="can_drop_data_fw" qualifiers="const">
- <return type="bool">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
- <method name="drop_data_fw">
- <return type="void">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="data" type="Variant">
- </argument>
- <argument index="2" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="get_current_editor" qualifiers="const">
<return type="ScriptEditorBase">
</return>
@@ -47,16 +23,6 @@
Returns a [Script] that is currently active in editor.
</description>
</method>
- <method name="get_drag_data_fw">
- <return type="Variant">
- </return>
- <argument index="0" name="point" type="Vector2">
- </argument>
- <argument index="1" name="from" type="Control">
- </argument>
- <description>
- </description>
- </method>
<method name="get_open_script_editors" qualifiers="const">
<return type="Array">
</return>
diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml
index e5c4c32450..a135062bd8 100644
--- a/doc/classes/ScriptEditorBase.xml
+++ b/doc/classes/ScriptEditorBase.xml
@@ -9,7 +9,7 @@
<tutorials>
</tutorials>
<methods>
- <method name="add_syntax_highlighter" qualifiers="virtual">
+ <method name="_add_syntax_highlighter" qualifiers="virtual">
<return type="void">
</return>
<argument index="0" name="highlighter" type="Object">
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index c31467c67e..fe83bf9c2d 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -361,7 +361,7 @@
The number of columns.
</member>
<member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0">
- The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended.
+ The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control._can_drop_data] is recommended.
This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position.
</member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 2f3782c517..96d63b27ad 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -111,7 +111,7 @@
<return type="Variant">
</return>
<description>
- Returns the drag data from the GUI, that was previously returned by [method Control.get_drag_data].
+ Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data].
</description>
</method>
<method name="gui_is_dragging" qualifiers="const">