diff options
Diffstat (limited to 'doc/classes')
27 files changed, 237 insertions, 217 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index d4680d1836..46b9bdd52d 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2458,6 +2458,8 @@ </constant> <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags"> </constant> + <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags"> + </constant> <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> Default method flags. </constant> diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index 63dd250dbc..3e91184a65 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -38,7 +38,7 @@ <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> + <method name="_compute_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -47,7 +47,7 @@ Note that this function is hidden in the default [code]AStar[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> + <method name="_estimate_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 31d695b051..453e8b6315 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -9,7 +9,7 @@ <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> + <method name="_compute_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> @@ -18,7 +18,7 @@ Note that this function is hidden in the default [code]AStar2D[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> + <method name="_estimate_cost" qualifiers="virtual const"> <return type="float" /> <argument index="0" name="from_id" type="int" /> <argument index="1" name="to_id" type="int" /> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index a9a08efcf1..173ff43d2a 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -11,46 +11,46 @@ <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> - <method name="_get_caption" qualifiers="virtual"> + <method name="_get_caption" qualifiers="virtual const"> <return type="String" /> <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" /> - <argument index="0" name="name" type="String" /> + <method name="_get_child_by_name" qualifiers="virtual const"> + <return type="AnimationNode" /> + <argument index="0" name="name" type="StringName" /> <description> Gets a child node by index (used by editors inheriting from [AnimationRootNode]). </description> </method> - <method name="_get_child_nodes" qualifiers="virtual"> + <method name="_get_child_nodes" qualifiers="virtual const"> <return type="Dictionary" /> <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"> + <method name="_get_parameter_default_value" qualifiers="virtual const"> <return type="Variant" /> - <argument index="0" name="name" type="StringName" /> + <argument index="0" name="parameter" type="StringName" /> <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"> + <method name="_get_parameter_list" qualifiers="virtual const"> <return type="Array" /> <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"> + <method name="_has_filter" qualifiers="virtual const"> <return type="bool" /> <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" /> + <method name="_process" qualifiers="virtual const"> + <return type="float" /> <argument index="0" name="time" type="float" /> <argument index="1" name="seek" type="bool" /> <description> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 47078330f3..93f72d45ae 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -17,9 +17,9 @@ Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. </description> </method> - <method name="_filter_code_completion_candidates" qualifiers="virtual"> + <method name="_filter_code_completion_candidates" qualifiers="virtual const"> <return type="Array" /> - <argument index="0" name="candidates" type="Array" /> + <argument index="0" name="candidates" type="Dictionary[]" /> <description> Override this method to define what items in [code]candidates[/code] should be displayed. Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 0834521c91..5392189f6a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -22,9 +22,9 @@ <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"> + <method name="_can_drop_data" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <argument index="1" name="data" type="Variant" /> <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. @@ -49,7 +49,7 @@ </method> <method name="_drop_data" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <argument index="1" name="data" type="Variant" /> <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. @@ -73,9 +73,9 @@ [/codeblocks] </description> </method> - <method name="_get_drag_data" qualifiers="virtual"> + <method name="_get_drag_data" qualifiers="virtual const"> <return type="Variant" /> - <argument index="0" name="position" type="Vector2" /> + <argument index="0" name="at_position" type="Vector2" /> <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. @@ -97,7 +97,7 @@ [/codeblocks] </description> </method> - <method name="_get_minimum_size" qualifiers="virtual"> + <method name="_get_minimum_size" qualifiers="virtual const"> <return type="Vector2" /> <description> Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). @@ -141,15 +141,15 @@ </method> <method name="_has_point" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="" type="Vector2" /> + <argument index="0" name="position" type="Vector2" /> <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" /> + <method name="_make_custom_tooltip" qualifiers="virtual const"> + <return type="Object" /> <argument index="0" name="for_text" type="String" /> <description> Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property. @@ -193,8 +193,8 @@ [/codeblocks] </description> </method> - <method name="_structured_text_parser" qualifiers="virtual"> - <return type="void" /> + <method name="_structured_text_parser" qualifiers="virtual const"> + <return type="Array" /> <argument index="0" name="args" type="Array" /> <argument index="1" name="text" type="String" /> <description> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index b379ccc8c6..da6738d6b7 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -113,28 +113,28 @@ <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 const"> <return type="Array" /> - <argument index="0" name="preset" type="int" /> + <argument index="0" name="preset_index" type="int" /> <description> 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 const"> <return type="int" /> <description> Gets the order of this importer to be run when importing resources. Importers with [i]lower[/i] import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is [code]0[/code] unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values. </description> </method> - <method name="_get_importer_name" qualifiers="virtual"> + <method name="_get_importer_name" qualifiers="virtual const"> <return type="String" /> <description> Gets the unique name of the importer. </description> </method> - <method name="_get_option_visibility" qualifiers="virtual"> + <method name="_get_option_visibility" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="option" type="String" /> + <argument index="0" name="option_name" type="StringName" /> <argument index="1" name="options" type="Dictionary" /> <description> 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: @@ -163,50 +163,50 @@ 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 const"> <return type="int" /> <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. </description> </method> - <method name="_get_preset_name" qualifiers="virtual"> + <method name="_get_preset_name" qualifiers="virtual const"> <return type="String" /> - <argument index="0" name="preset" type="int" /> + <argument index="0" name="preset_index" type="int" /> <description> Gets the name of the options preset at this index. </description> </method> - <method name="_get_priority" qualifiers="virtual"> + <method name="_get_priority" qualifiers="virtual const"> <return type="float" /> <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"> - <return type="Array" /> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <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 const"> <return type="String" /> <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 const"> <return type="String" /> <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 const"> <return type="String" /> <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 const"> <return type="int" /> <argument index="0" name="source_file" type="String" /> <argument index="1" name="save_path" type="String" /> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index 62fd7a1d6e..ee93379210 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -16,9 +16,9 @@ <link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link> </tutorials> <methods> - <method name="_can_handle" qualifiers="virtual"> + <method name="_can_handle" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <description> Returns [code]true[/code] if this object can be handled by this plugin. </description> @@ -31,9 +31,9 @@ </method> <method name="_parse_category" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="category" type="String" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="category" type="String" /> <description> - Called to allow adding controls at the beginning of the category. </description> </method> <method name="_parse_end" qualifiers="virtual"> @@ -44,11 +44,13 @@ </method> <method name="_parse_property" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="type" type="int" /> - <argument index="1" name="path" type="String" /> - <argument index="2" name="hint" type="int" /> - <argument index="3" name="hint_text" type="String" /> - <argument index="4" name="usage" type="int" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="name" type="String" /> + <argument index="3" name="hint_type" type="int" /> + <argument index="4" name="hint_string" type="String" /> + <argument index="5" name="usage_flags" type="int" /> + <argument index="6" name="wide" type="bool" /> <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. </description> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 39f6805254..91e024cc1c 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -13,7 +13,7 @@ <return type="void" /> <argument index="0" name="id" type="int" /> <argument index="1" name="restore" type="Variant" /> - <argument index="2" name="cancel" type="bool" default="false" /> + <argument index="2" name="cancel" type="bool" /> <description> Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. @@ -22,14 +22,14 @@ <method name="_commit_subgizmos" qualifiers="virtual"> <return type="void" /> <argument index="0" name="ids" type="PackedInt32Array" /> - <argument index="1" name="restore" type="Array" /> - <argument index="2" name="cancel" type="bool" default="false" /> + <argument index="1" name="restores" type="Transform3D[]" /> + <argument index="2" name="cancel" type="bool" /> <description> Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. </description> </method> - <method name="_get_handle_name" qualifiers="virtual"> + <method name="_get_handle_name" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="id" type="int" /> <description> @@ -37,21 +37,21 @@ Handles can be named for reference to the user when editing. </description> </method> - <method name="_get_handle_value" qualifiers="virtual"> + <method name="_get_handle_value" qualifiers="virtual const"> <return type="Variant" /> <argument index="0" name="id" type="int" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. </description> </method> - <method name="_get_subgizmo_transform" qualifiers="virtual"> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> <return type="Transform3D" /> <argument index="0" name="id" type="int" /> <description> Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_subgizmos]. </description> </method> - <method name="_is_handle_highlighted" qualifiers="virtual"> + <method name="_is_handle_highlighted" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="id" type="int" /> <description> @@ -81,15 +81,15 @@ Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. </description> </method> - <method name="_subgizmos_intersect_frustum" qualifiers="virtual"> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="camera" type="Camera3D" /> - <argument index="1" name="frustum" type="Array" /> + <argument index="1" name="frustum" type="Plane[]" /> <description> Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. </description> </method> - <method name="_subgizmos_intersect_ray" qualifiers="virtual"> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="camera" type="Camera3D" /> <argument index="1" name="point" type="Vector2" /> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index fb72427a7a..4ba455a336 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -10,7 +10,7 @@ <link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> <methods> - <method name="_can_be_hidden" qualifiers="virtual"> + <method name="_can_be_hidden" qualifiers="virtual const"> <return type="bool" /> <description> Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns [code]true[/code] if not overridden. @@ -19,9 +19,9 @@ <method name="_commit_handle" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <argument index="2" name="restore" type="Variant" /> - <argument index="3" name="cancel" type="bool" default="false" /> + <argument index="3" name="cancel" type="bool" /> <description> Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. Called for this plugin's active gizmos. @@ -31,73 +31,73 @@ <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="ids" type="PackedInt32Array" /> - <argument index="2" name="restore" type="Array" /> - <argument index="3" name="cancel" type="bool" default="false" /> + <argument index="2" name="restores" type="Transform3D[]" /> + <argument index="3" name="cancel" type="bool" /> <description> Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. </description> </method> - <method name="_create_gizmo" qualifiers="virtual"> + <method name="_create_gizmo" qualifiers="virtual const"> <return type="EditorNode3DGizmo" /> - <argument index="0" name="spatial" type="Node3D" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <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="_get_gizmo_name" qualifiers="virtual"> + <method name="_get_gizmo_name" qualifiers="virtual const"> <return type="String" /> <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 const"> <return type="String" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> 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 const"> <return type="Variant" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. Called for this plugin's active gizmos. </description> </method> - <method name="_get_priority" qualifiers="virtual"> + <method name="_get_priority" qualifiers="virtual const"> <return type="int" /> <description> Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. 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 get higher priority than built-in gizmos. </description> </method> - <method name="_get_subgizmo_transform" qualifiers="virtual"> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> <return type="Transform3D" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="subgizmo_id" type="int" /> <description> Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the [code]restore[/code] argument in [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> - <method name="_has_gizmo" qualifiers="virtual"> + <method name="_has_gizmo" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="spatial" type="Node3D" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <description> 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 const"> <return type="bool" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. 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 const"> <return type="bool" /> <description> Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. @@ -113,9 +113,9 @@ <method name="_set_handle" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="handle_id" type="int" /> <argument index="2" name="camera" type="Camera3D" /> - <argument index="3" name="point" type="Vector2" /> + <argument index="3" name="screen_pos" type="Vector2" /> <description> Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. Called for this plugin's active gizmos. </description> @@ -123,26 +123,26 @@ <method name="_set_subgizmo_transform" qualifiers="virtual"> <return type="void" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> - <argument index="1" name="id" type="int" /> + <argument index="1" name="subgizmo_id" type="int" /> <argument index="2" name="transform" type="Transform3D" /> <description> Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. </description> </method> - <method name="_subgizmos_intersect_frustum" qualifiers="virtual"> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> <return type="PackedInt32Array" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="camera" type="Camera3D" /> - <argument index="2" name="frustum" type="Array" /> + <argument index="2" name="frustum_planes" type="Plane[]" /> <description> Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> - <method name="_subgizmos_intersect_ray" qualifiers="virtual"> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <argument index="1" name="camera" type="Camera3D" /> - <argument index="2" name="point" type="Vector2" /> + <argument index="2" name="screen_pos" type="Vector2" /> <description> Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 37efca7f48..e564e8045c 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -38,7 +38,7 @@ </method> <method name="_edit" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <description> This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. </description> @@ -49,18 +49,18 @@ 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_3d_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - 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]. + 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_canvas_draw_over_viewport(overlay): + func _forward_spatial_3d_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) + overlay.draw_circle(overlay.get_local_mouse_position(), 64) - func _forward_canvas_gui_input(event): + func _forward_spatial_gui_input(camera, event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -68,13 +68,13 @@ return false [/gdscript] [csharp] - public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) + public override void ForwardSpatialDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -87,28 +87,29 @@ [/codeblocks] </description> </method> - <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_3d_force_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <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_3d_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_3d_gui_input" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="event" type="InputEvent" /> + <argument index="0" name="viewport_camera" type="Camera3D" /> + <argument index="1" name="event" type="InputEvent" /> <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 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_canvas_gui_input(event): + # Prevents the InputEvent to reach other Editor classes. + func _forward_spatial_gui_input(camera, event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes - public override bool ForwardCanvasGuiInput(InputEvent @event) + // Prevents the InputEvent to reach other Editor classes. + public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) { return true; } @@ -118,12 +119,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_canvas_gui_input(event): + func _forward_spatial_gui_input(camera, event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) { return @event is InputEventMouseMotion; } @@ -131,18 +132,18 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - 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]. + 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_spatial_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) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -150,13 +151,13 @@ return false [/gdscript] [csharp] - public override void ForwardSpatialDrawOverViewport(Godot.Control overlay) + public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -169,29 +170,28 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual"> + <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="overlay" type="Control" /> + <argument index="0" name="viewport_control" type="Control" /> <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_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_spatial_gui_input" qualifiers="virtual"> + <method name="_forward_canvas_gui_input" qualifiers="virtual"> <return type="bool" /> - <argument index="0" name="camera" type="Camera3D" /> - <argument index="1" name="event" type="InputEvent" /> + <argument index="0" name="event" type="InputEvent" /> <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 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_spatial_gui_input(camera, event): + # Prevents the InputEvent to reach other Editor classes + func _forward_canvas_gui_input(event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + // Prevents the InputEvent to reach other Editor classes + public override bool ForwardCanvasGuiInput(InputEvent @event) { return true; } @@ -201,12 +201,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { return @event is InputEventMouseMotion; } @@ -214,13 +214,13 @@ [/codeblocks] </description> </method> - <method name="_get_breakpoints" qualifiers="virtual"> + <method name="_get_breakpoints" qualifiers="virtual const"> <return type="PackedStringArray" /> <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_plugin_icon" qualifiers="virtual"> + <method name="_get_plugin_icon" qualifiers="virtual const"> <return type="Texture2D" /> <description> Override this method in your plugin to return a [Texture2D] in order to give it an icon. @@ -246,14 +246,14 @@ [/codeblocks] </description> </method> - <method name="_get_plugin_name" qualifiers="virtual"> + <method name="_get_plugin_name" qualifiers="virtual const"> <return type="String" /> <description> Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. 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_state" qualifiers="virtual"> + <method name="_get_state" qualifiers="virtual const"> <return type="Dictionary" /> <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). @@ -261,19 +261,19 @@ </method> <method name="_get_window_layout" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="layout" type="ConfigFile" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> 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 const"> <return type="bool" /> - <argument index="0" name="object" type="Object" /> + <argument index="0" name="object" type="Variant" /> <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_3d_gui_input] these will be called too. </description> </method> - <method name="_has_main_screen" qualifiers="virtual"> + <method name="_has_main_screen" qualifiers="virtual const"> <return type="bool" /> <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]). @@ -302,7 +302,7 @@ </method> <method name="_set_window_layout" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="layout" type="ConfigFile" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> Restore the plugin GUI layout saved by [method _get_window_layout]. </description> @@ -586,19 +586,19 @@ <method name="set_force_draw_over_forwarding_enabled"> <return type="void" /> <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_3d_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" /> <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. + Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. </description> </method> <method name="update_overlays" qualifiers="const"> <return type="int" /> <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_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called. </description> </method> </methods> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 725b0ba8ff..822bcfd255 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -57,6 +57,11 @@ Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child]. </description> </method> + <method name="update_property"> + <return type="void" /> + <description> + </description> + </method> </methods> <members> <member name="checkable" type="bool" setter="set_checkable" getter="is_checkable" default="false"> diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml index 3de508c88d..8543afa4ae 100644 --- a/doc/classes/EditorResourceConversionPlugin.xml +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -7,17 +7,23 @@ <tutorials> </tutorials> <methods> - <method name="_convert" qualifiers="virtual"> + <method name="_convert" qualifiers="virtual const"> <return type="Resource" /> <argument index="0" name="resource" type="Resource" /> <description> </description> </method> - <method name="_converts_to" qualifiers="virtual"> + <method name="_converts_to" qualifiers="virtual const"> <return type="String" /> <description> </description> </method> + <method name="_handles" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="resource" type="Resource" /> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 7054b1f4d0..033e03c5b5 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -9,41 +9,41 @@ <tutorials> </tutorials> <methods> - <method name="_can_generate_small_preview" qualifiers="virtual"> + <method name="_can_generate_small_preview" qualifiers="virtual const"> <return type="bool" /> <description> 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 const"> <return type="Texture2D" /> - <argument index="0" name="from" type="Resource" /> - <argument index="1" name="size" type="Vector2" /> + <argument index="0" name="resource" type="Resource" /> + <argument index="1" name="size" type="Vector2i" /> <description> Generate a preview from a given resource with the specified size. This must always be implemented. 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_from_path" qualifiers="virtual"> + <method name="_generate_from_path" qualifiers="virtual const"> <return type="Texture2D" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="size" type="Vector2" /> + <argument index="1" name="size" type="Vector2i" /> <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]. 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 const"> <return type="bool" /> <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]. By default, it returns [code]false[/code]. </description> </method> - <method name="_handles" qualifiers="virtual"> + <method name="_handles" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="type" type="String" /> <description> diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml index 2e9d6a43d8..a400db551f 100644 --- a/doc/classes/EditorSceneImporter.xml +++ b/doc/classes/EditorSceneImporter.xml @@ -8,12 +8,12 @@ <tutorials> </tutorials> <methods> - <method name="_get_extensions" qualifiers="virtual"> - <return type="Array" /> + <method name="_get_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> </description> </method> - <method name="_get_import_flags" qualifiers="virtual"> + <method name="_get_import_flags" qualifiers="virtual const"> <return type="int" /> <description> </description> @@ -27,7 +27,7 @@ </description> </method> <method name="_import_scene" qualifiers="virtual"> - <return type="Node" /> + <return type="Object" /> <argument index="0" name="path" type="String" /> <argument index="1" name="flags" type="int" /> <argument index="2" name="bake_fps" type="int" /> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index 95b0b42d9f..43ca3db5fa 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -57,7 +57,7 @@ <methods> <method name="_post_import" qualifiers="virtual"> <return type="Object" /> - <argument index="0" name="scene" type="Object" /> + <argument index="0" name="scene" type="Node" /> <description> Called after the scene was imported. This method must return the modified version of the scene. </description> diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml index 37644a8595..394a4ada46 100644 --- a/doc/classes/EditorSyntaxHighlighter.xml +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -5,24 +5,18 @@ </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 ScriptEditorBase._add_syntax_highlighter (currently not working). To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] </description> <tutorials> </tutorials> <methods> - <method name="_get_name" qualifiers="virtual"> + <method name="_get_name" qualifiers="virtual const"> <return type="String" /> <description> Virtual method which can be overridden to return the syntax highlighter name. </description> </method> - <method name="_get_supported_extentions" qualifiers="virtual"> - <return type="Array" /> - <description> - Virtual method which can be overridden to return the supported file extensions. - </description> - </method> - <method name="_get_supported_languages" qualifiers="virtual"> + <method name="_get_supported_languages" qualifiers="virtual const"> <return type="Array" /> <description> Virtual method which can be overridden to return the supported language names. diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml index 47da8ec37b..94e96e985f 100644 --- a/doc/classes/EditorTranslationParserPlugin.xml +++ b/doc/classes/EditorTranslationParserPlugin.xml @@ -102,8 +102,8 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="Array" /> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code]. </description> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 096fbbf2c0..97e6c71ef9 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -35,6 +35,14 @@ Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. </description> </method> + <method name="_get_configuration_warnings" qualifiers="virtual const"> + <return type="PackedStringArray" /> + <description> + The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. + Returning an empty array produces no warnings. + Call [method update_configuration_warnings] when the warnings need to be updated for this node. + </description> + </method> <method name="_get_configuration_warnings" qualifiers="virtual"> <return type="String[]" /> <description> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 701ecf815c..65dedf5280 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -12,12 +12,6 @@ <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> - <method name="_setup_local_to_scene" qualifiers="virtual"> - <return type="void" /> - <description> - Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene]. - </description> - </method> <method name="duplicate" qualifiers="const"> <return type="Resource" /> <argument index="0" name="subresources" type="bool" default="false" /> @@ -54,7 +48,7 @@ <method name="setup_local_to_scene"> <return type="void" /> <description> - This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script. + This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script. For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport. </description> </method> @@ -84,6 +78,10 @@ [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself. </description> </signal> + <signal name="setup_local_to_scene_requested"> + <description> + </description> + </signal> </signals> <constants> </constants> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index bce5785cc1..0c2bb26c02 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -11,22 +11,28 @@ <tutorials> </tutorials> <methods> - <method name="_get_dependencies" qualifiers="virtual"> - <return type="void" /> + <method name="_exists" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_get_dependencies" qualifiers="virtual const"> + <return type="PackedStringArray" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="add_types" type="String" /> + <argument index="1" name="add_types" type="bool" /> <description> If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. [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 const"> <return type="PackedStringArray" /> <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 const"> <return type="String" /> <argument index="0" name="path" type="String" /> <description> @@ -34,15 +40,21 @@ [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="_get_resource_uid" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_handles_type" qualifiers="virtual const"> <return type="bool" /> - <argument index="0" name="typename" type="StringName" /> + <argument index="0" name="type" type="StringName" /> <description> Tells which resource class this loader can load. [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 const"> <return type="Variant" /> <argument index="0" name="path" type="String" /> <argument index="1" name="original_path" type="String" /> @@ -53,10 +65,10 @@ 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 const"> <return type="int" /> <argument index="0" name="path" type="String" /> - <argument index="1" name="renames" type="String" /> + <argument index="1" name="renames" type="Dictionary" /> <description> If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [constant OK] on success, or an [enum Error] constant in case of failure. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index ef9eebc953..7ee8875321 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -10,14 +10,14 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> + <method name="_get_recognized_extensions" qualifiers="virtual const"> <return type="PackedStringArray" /> <argument index="0" name="resource" type="Resource" /> <description> 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 const"> <return type="bool" /> <argument index="0" name="resource" type="Resource" /> <description> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 142afbb860..fd93f6be56 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -23,7 +23,7 @@ <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="_process_custom_fx" qualifiers="virtual"> + <method name="_process_custom_fx" qualifiers="virtual const"> <return type="bool" /> <argument index="0" name="char_fx" type="CharFXTransform" /> <description> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index 0efcde5638..08baa705e8 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -9,13 +9,6 @@ <tutorials> </tutorials> <methods> - <method name="_add_syntax_highlighter" qualifiers="virtual"> - <return type="void" /> - <argument index="0" name="highlighter" type="Object" /> - <description> - Adds a [EditorSyntaxHighlighter] to the open script. - </description> - </method> <method name="get_base_editor" qualifiers="const"> <return type="Control" /> <description> diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml index ea0d1c27a3..c478cb0eb6 100644 --- a/doc/classes/SyntaxHighlighter.xml +++ b/doc/classes/SyntaxHighlighter.xml @@ -17,7 +17,7 @@ Virtual method which can be overridden to clear any local caches. </description> </method> - <method name="_get_line_syntax_highlighting" qualifiers="virtual"> + <method name="_get_line_syntax_highlighting" qualifiers="virtual const"> <return type="Dictionary" /> <argument index="0" name="line" type="int" /> <description> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 7aa627b7d0..abb4119584 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -30,7 +30,7 @@ </method> <method name="_handle_unicode_input" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="unicode" type="int" /> + <argument index="0" name="unicode_char" type="int" /> <description> Override this method to define what happens when the types in the provided key [code]unicode[/code]. </description> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index f6dbd2ad43..3a489419c1 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -16,17 +16,17 @@ <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> </tutorials> <methods> - <method name="_get_category" qualifiers="virtual"> + <method name="_get_category" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code]. Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> - <method name="_get_code" qualifiers="virtual"> + <method name="_get_code" qualifiers="virtual const"> <return type="String" /> - <argument index="0" name="input_vars" type="Array" /> - <argument index="1" name="output_vars" type="Array" /> + <argument index="0" name="input_vars" type="PackedStringArray" /> + <argument index="1" name="output_vars" type="String[]" /> <argument index="2" name="mode" type="int" /> <argument index="3" name="type" type="int" /> <description> @@ -37,14 +37,14 @@ Defining this method is [b]required[/b]. </description> </method> - <method name="_get_description" qualifiers="virtual"> + <method name="_get_description" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_global_code" qualifiers="virtual"> + <method name="_get_global_code" qualifiers="virtual const"> <return type="String" /> <argument index="0" name="mode" type="int" /> <description> @@ -54,22 +54,22 @@ Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_input_port_count" qualifiers="virtual"> + <method name="_get_input_port_count" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the amount of input ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no input ports. </description> </method> - <method name="_get_input_port_name" qualifiers="virtual"> - <return type="StringName" /> + <method name="_get_input_port_name" qualifiers="virtual const"> + <return type="String" /> <argument index="0" name="port" type="int" /> <description> Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the [code]input_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as [code]"in" + str(port)[/code]. </description> </method> - <method name="_get_input_port_type" qualifiers="virtual"> + <method name="_get_input_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="port" type="int" /> <description> @@ -77,29 +77,29 @@ Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_name" qualifiers="virtual"> + <method name="_get_name" qualifiers="virtual const"> <return type="String" /> <description> Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. Defining this method is [b]optional[/b], but recommended. If not overridden, the node will be named as "Unnamed". </description> </method> - <method name="_get_output_port_count" qualifiers="virtual"> + <method name="_get_output_port_count" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the amount of output ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no output ports. </description> </method> - <method name="_get_output_port_name" qualifiers="virtual"> - <return type="StringName" /> + <method name="_get_output_port_name" qualifiers="virtual const"> + <return type="String" /> <argument index="0" name="port" type="int" /> <description> Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the [code]output_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as [code]"out" + str(port)[/code]. </description> </method> - <method name="_get_output_port_type" qualifiers="virtual"> + <method name="_get_output_port_type" qualifiers="virtual const"> <return type="int" /> <argument index="0" name="port" type="int" /> <description> @@ -107,14 +107,14 @@ Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_return_icon_type" qualifiers="virtual"> + <method name="_get_return_icon_type" qualifiers="virtual const"> <return type="int" /> <description> Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. </description> </method> - <method name="_is_highend" qualifiers="virtual"> + <method name="_is_highend" qualifiers="virtual const"> <return type="bool" /> <description> Override this method to enable high-end mark in the Visual Shader Editor's members dialog. |