summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/@GlobalScope.xml2
-rw-r--r--doc/classes/AStar2D.xml2
-rw-r--r--doc/classes/AStar3D.xml2
-rw-r--r--doc/classes/AStarGrid2D.xml2
-rw-r--r--doc/classes/Array.xml41
-rw-r--r--doc/classes/BaseButton.xml2
-rw-r--r--doc/classes/ClassDB.xml24
-rw-r--r--doc/classes/CompositorEffect.xml2
-rw-r--r--doc/classes/EditorPlugin.xml2
-rw-r--r--doc/classes/EditorSettings.xml6
-rw-r--r--doc/classes/Engine.xml4
-rw-r--r--doc/classes/EngineDebugger.xml2
-rw-r--r--doc/classes/ExternalTexture.xml36
-rw-r--r--doc/classes/FileDialog.xml1
-rw-r--r--doc/classes/FontFile.xml2
-rw-r--r--doc/classes/InputEvent.xml1
-rw-r--r--doc/classes/JavaScriptBridge.xml14
-rw-r--r--doc/classes/Label.xml2
-rw-r--r--doc/classes/LineEdit.xml12
-rw-r--r--doc/classes/Node.xml13
-rw-r--r--doc/classes/Object.xml23
-rw-r--r--doc/classes/PCKPacker.xml4
-rw-r--r--doc/classes/ProjectSettings.xml16
-rw-r--r--doc/classes/RDPipelineDepthStencilState.xml2
-rw-r--r--doc/classes/RenderingDevice.xml2
-rw-r--r--doc/classes/RenderingServer.xml35
-rw-r--r--doc/classes/Resource.xml49
-rw-r--r--doc/classes/ResourceSaver.xml8
-rw-r--r--doc/classes/Script.xml6
-rw-r--r--doc/classes/ScrollContainer.xml3
-rw-r--r--doc/classes/Shortcut.xml2
-rw-r--r--doc/classes/Signal.xml6
-rw-r--r--doc/classes/Skeleton3D.xml32
-rw-r--r--doc/classes/SoftBody3D.xml1
-rw-r--r--doc/classes/SplitContainer.xml57
-rw-r--r--doc/classes/String.xml2
-rw-r--r--doc/classes/StringName.xml2
-rw-r--r--doc/classes/SurfaceTool.xml2
-rw-r--r--doc/classes/TextEdit.xml6
-rw-r--r--doc/classes/TextServer.xml2
-rw-r--r--doc/classes/TranslationDomain.xml60
-rw-r--r--doc/classes/TranslationServer.xml40
-rw-r--r--doc/classes/VehicleWheel3D.xml6
-rw-r--r--doc/classes/Viewport.xml14
-rw-r--r--doc/classes/XRPose.xml10
45 files changed, 510 insertions, 52 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index f222cbc969..a86f41cd9c 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -856,7 +856,7 @@
GD.Print("a", "b", a); // Prints ab[1, 2, 3]
[/csharp]
[/codeblocks]
- [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
+ [b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also [member Engine.print_to_stdout] and [member ProjectSettings.application/run/disable_stdout].
</description>
</method>
<method name="print_rich" qualifiers="vararg">
diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml
index f3a1f6b985..a41da4c318 100644
--- a/doc/classes/AStar2D.xml
+++ b/doc/classes/AStar2D.xml
@@ -143,6 +143,7 @@
<description>
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
+ [b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
[codeblocks]
[gdscript]
var astar = AStar2D.new()
@@ -235,6 +236,7 @@
Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message.
+ Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
</description>
</method>
<method name="get_point_position" qualifiers="const">
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index dad77cc7a8..2e8ae37a20 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -172,6 +172,7 @@
<description>
Returns an array with the IDs of the points that form the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
+ [b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
[codeblocks]
[gdscript]
var astar = AStar3D.new()
@@ -262,6 +263,7 @@
Returns an array with the points that are in the path found by AStar3D between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message.
+ Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is disabled the search may take an unusually long time to finish.
</description>
</method>
<method name="get_point_position" qualifiers="const">
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml
index 2ee61bd939..8e1972af11 100644
--- a/doc/classes/AStarGrid2D.xml
+++ b/doc/classes/AStarGrid2D.xml
@@ -79,6 +79,7 @@
<description>
Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
+ [b]Note:[/b] When [param allow_partial_path] is [code]true[/code] and [param to_id] is solid the search may take an unusually long time to finish.
</description>
</method>
<method name="get_point_data_in_region" qualifiers="const">
@@ -97,6 +98,7 @@
Returns an array with the points that are in the path found by [AStarGrid2D] between the given points. The array is ordered from the starting point to the ending point of the path.
If there is no valid path to the target, and [param allow_partial_path] is [code]true[/code], returns a path to the point closest to the target that can be reached.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty array and will print an error message.
+ Additionally, when [param allow_partial_path] is [code]true[/code] and [param to_id] is solid the search may take an unusually long time to finish.
</description>
</method>
<method name="get_point_position" qualifiers="const">
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index f4dcc9bf68..adb6be1070 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -324,6 +324,7 @@
<param index="0" name="value" type="Variant" />
<description>
Returns the number of times an element is in the array.
+ To count how many elements in an array satisfy a condition, see [method reduce].
</description>
</method>
<method name="duplicate" qualifiers="const">
@@ -395,6 +396,25 @@
[b]Note:[/b] For performance reasons, the search is affected by [param what]'s [enum Variant.Type]. For example, [code]7[/code] ([int]) and [code]7.0[/code] ([float]) are not considered equal for this method.
</description>
</method>
+ <method name="find_custom" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="method" type="Callable" />
+ <param index="1" name="from" type="int" default="0" />
+ <description>
+ Returns the index of the [b]first[/b] element in the array that causes [param method] to return [code]true[/code], or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the end of the array.
+ [param method] is a callable that takes an element of the array, and returns a [bool].
+ [b]Note:[/b] If you just want to know whether the array contains [i]anything[/i] that satisfies [param method], use [method any].
+ [codeblocks]
+ [gdscript]
+ func is_even(number):
+ return number % 2 == 0
+
+ func _ready():
+ print([1, 3, 4, 7].find_custom(is_even.bind())) # prints 2
+ [/gdscript]
+ [/codeblocks]
+ </description>
+ </method>
<method name="front" qualifiers="const">
<return type="Variant" />
<description>
@@ -618,6 +638,17 @@
func is_length_greater(a, b):
return a.length() &gt; b.length()
[/codeblock]
+ This method can also be used to count how many elements in an array satisfy a certain condition, similar to [method count]:
+ [codeblock]
+ func is_even(number):
+ return number % 2 == 0
+
+ func _ready():
+ var arr = [1, 2, 3, 4, 5]
+ # Increment count if it's even, else leaves count the same.
+ var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0)
+ print(even_count) # Prints 2
+ [/codeblock]
See also [method map], [method filter], [method any] and [method all].
</description>
</method>
@@ -654,6 +685,14 @@
Returns the index of the [b]last[/b] occurrence of [param what] in this array, or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the beginning of the array. This method is the reverse of [method find].
</description>
</method>
+ <method name="rfind_custom" qualifiers="const">
+ <return type="int" />
+ <param index="0" name="method" type="Callable" />
+ <param index="1" name="from" type="int" default="-1" />
+ <description>
+ Returns the index of the [b]last[/b] element of the array that causes [param method] to return [code]true[/code], or [code]-1[/code] if there are none. The search's start can be specified with [param from], continuing to the beginning of the array. This method is the reverse of [method find_custom].
+ </description>
+ </method>
<method name="shuffle">
<return type="void" />
<description>
@@ -714,7 +753,7 @@
<param index="0" name="func" type="Callable" />
<description>
Sorts the array using a custom [Callable].
- [param func] is called as many times as necessary, receiving two array elements as arguments. The function should return [code]true[/code] if the first element should be moved [i]behind[/i] the second one, otherwise it should return [code]false[/code].
+ [param func] is called as many times as necessary, receiving two array elements as arguments. The function should return [code]true[/code] if the first element should be moved [i]before[/i] the second one, otherwise it should return [code]false[/code].
[codeblock]
func sort_ascending(a, b):
if a[1] &lt; b[1]:
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 764f4a65b5..18dccfa5a9 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -57,7 +57,7 @@
</member>
<member name="button_pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false">
If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code].
- [b]Note:[/b] Setting [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
+ [b]Note:[/b] Changing the value of [member button_pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal].
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false" keywords="enabled">
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml
index 99d0c9be84..d1b666097c 100644
--- a/doc/classes/ClassDB.xml
+++ b/doc/classes/ClassDB.xml
@@ -31,6 +31,13 @@
Returns whether the specified [param class] is available or not.
</description>
</method>
+ <method name="class_get_api_type" qualifiers="const">
+ <return type="int" enum="ClassDB.APIType" />
+ <param index="0" name="class" type="StringName" />
+ <description>
+ Returns the API type of [param class]. See [enum APIType].
+ </description>
+ </method>
<method name="class_get_enum_constants" qualifiers="const">
<return type="PackedStringArray" />
<param index="0" name="class" type="StringName" />
@@ -242,4 +249,21 @@
</description>
</method>
</methods>
+ <constants>
+ <constant name="API_CORE" value="0" enum="APIType">
+ Native Core class type.
+ </constant>
+ <constant name="API_EDITOR" value="1" enum="APIType">
+ Native Editor class type.
+ </constant>
+ <constant name="API_EXTENSION" value="2" enum="APIType">
+ GDExtension class type.
+ </constant>
+ <constant name="API_EDITOR_EXTENSION" value="3" enum="APIType">
+ GDExtension Editor class type.
+ </constant>
+ <constant name="API_NONE" value="4" enum="APIType">
+ Unknown class type.
+ </constant>
+ </constants>
</class>
diff --git a/doc/classes/CompositorEffect.xml b/doc/classes/CompositorEffect.xml
index 9ac54edb11..8961e10f91 100644
--- a/doc/classes/CompositorEffect.xml
+++ b/doc/classes/CompositorEffect.xml
@@ -87,7 +87,7 @@
The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
</constant>
<constant name="EFFECT_CALLBACK_TYPE_POST_TRANSPARENT" value="4" enum="EffectCallbackType">
- The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target.
+ The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
</constant>
<constant name="EFFECT_CALLBACK_TYPE_MAX" value="5" enum="EffectCallbackType">
Represents the size of the [enum EffectCallbackType] enum.
diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml
index de49764f0d..8189f253fb 100644
--- a/doc/classes/EditorPlugin.xml
+++ b/doc/classes/EditorPlugin.xml
@@ -701,7 +701,7 @@
<return type="void" />
<param index="0" name="plugin" type="EditorInspectorPlugin" />
<description>
- Removes an inspector plugin registered by [method add_import_plugin]
+ Removes an inspector plugin registered by [method add_inspector_plugin].
</description>
</method>
<method name="remove_node_3d_gizmo_plugin">
diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml
index 389d65e05a..5eb8ac6199 100644
--- a/doc/classes/EditorSettings.xml
+++ b/doc/classes/EditorSettings.xml
@@ -186,6 +186,7 @@
</member>
<member name="debugger/auto_switch_to_remote_scene_tree" type="bool" setter="" getter="">
If [code]true[/code], automatically switches to the [b]Remote[/b] scene tree when running the project from the editor. If [code]false[/code], stays on the [b]Local[/b] scene tree when running the project from the editor.
+ [b]Warning:[/b] Enabling this setting can cause stuttering when running a project with a large amount of nodes (typically a few thousands of nodes or more), even if the editor window isn't focused. This is due to the remote scene tree being updated every second regardless of whether the editor is focused.
</member>
<member name="debugger/profile_native_calls" type="bool" setter="" getter="">
If [code]true[/code], enables collection of profiling data from non-GDScript Godot functions, such as engine class methods. Enabling this slows execution while profiling further.
@@ -903,7 +904,7 @@
</member>
<member name="interface/inspector/delimitate_all_container_and_resources" type="bool" setter="" getter="">
If [code]true[/code], add a margin around Array, Dictionary, and Resource Editors that are not already colored.
- [b]Note:[/b] If [member interface/inspector/nested_color_mode] is set to [b]Containers &amp; Resources[/b] this parameter will have no effect since those editors will already be colored
+ [b]Note:[/b] If [member interface/inspector/nested_color_mode] is set to [b]Containers &amp; Resources[/b] this parameter will have no effect since those editors will already be colored.
</member>
<member name="interface/inspector/disable_folding" type="bool" setter="" getter="">
If [code]true[/code], forces all property groups to be expanded in the Inspector dock and prevents collapsing them.
@@ -1199,6 +1200,9 @@
<member name="text_editor/behavior/files/trim_trailing_whitespace_on_save" type="bool" setter="" getter="">
If [code]true[/code], trims trailing whitespace when saving a script. Trailing whitespace refers to tab and space characters placed at the end of lines. Since these serve no practical purpose, they can and should be removed to make version control diffs less noisy.
</member>
+ <member name="text_editor/behavior/general/empty_selection_clipboard" type="bool" setter="" getter="">
+ If [code]true[/code], copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection.
+ </member>
<member name="text_editor/behavior/indent/auto_indent" type="bool" setter="" getter="">
If [code]true[/code], automatically indents code when pressing the [kbd]Enter[/kbd] key based on blocks above the new line.
</member>
diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml
index ca78054875..bba5157053 100644
--- a/doc/classes/Engine.xml
+++ b/doc/classes/Engine.xml
@@ -337,6 +337,10 @@
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
[b]Warning:[/b] If set to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. In a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default).
</member>
+ <member name="print_to_stdout" type="bool" setter="set_print_to_stdout" getter="is_printing_to_stdout" default="true">
+ If [code]false[/code], stops printing messages (for example using [method @GlobalScope.print]) to the console, log files, and editor Output log. This property is equivalent to the [member ProjectSettings.application/run/disable_stdout] project setting.
+ [b]Note:[/b] This does not stop printing errors or warnings produced by scripts to the console or log files, for more details see [member print_error_messages].
+ </member>
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
The speed multiplier at which the in-game clock updates, compared to real time. For example, if set to [code]2.0[/code] the game runs twice as fast, and if set to [code]0.5[/code] the game runs half as fast.
This value affects [Timer], [SceneTreeTimer], and all other simulations that make use of [code]delta[/code] time (such as [method Node._process] and [method Node._physics_process]).
diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml
index 7583520da0..bcc1ac5299 100644
--- a/doc/classes/EngineDebugger.xml
+++ b/doc/classes/EngineDebugger.xml
@@ -87,7 +87,7 @@
<method name="line_poll">
<return type="void" />
<description>
- Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught
+ Forces a processing loop of debugger events. The purpose of this method is just processing events every now and then when the script might get too busy, so that bugs like infinite loops can be caught.
</description>
</method>
<method name="profiler_add_frame_data">
diff --git a/doc/classes/ExternalTexture.xml b/doc/classes/ExternalTexture.xml
new file mode 100644
index 0000000000..6f27b62f24
--- /dev/null
+++ b/doc/classes/ExternalTexture.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="ExternalTexture" inherits="Texture2D" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ Texture which displays the content of an external buffer.
+ </brief_description>
+ <description>
+ Displays the content of an external buffer provided by the platform.
+ Requires the [url=https://registry.khronos.org/OpenGL/extensions/OES/OES_EGL_image_external.txt]OES_EGL_image_external[/url] extension (OpenGL) or [url=https://registry.khronos.org/vulkan/specs/1.1-extensions/html/vkspec.html#VK_ANDROID_external_memory_android_hardware_buffer]VK_ANDROID_external_memory_android_hardware_buffer[/url] extension (Vulkan).
+ [b]Note:[/b] This is currently only supported in Android builds.
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="get_external_texture_id" qualifiers="const">
+ <return type="int" />
+ <description>
+ Returns the external texture ID.
+ Depending on your use case, you may need to pass this to platform APIs, for example, when creating an [code]android.graphics.SurfaceTexture[/code] on Android.
+ </description>
+ </method>
+ <method name="set_external_buffer_id">
+ <return type="void" />
+ <param index="0" name="external_buffer_id" type="int" />
+ <description>
+ Sets the external buffer ID.
+ Depending on your use case, you may need to call this with data received from a platform API, for example, [code]SurfaceTexture.getHardwareBuffer()[/code] on Android.
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
+ <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(256, 256)">
+ External texture size.
+ </member>
+ </members>
+</class>
diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml
index 38985e99ae..1ae889adc1 100644
--- a/doc/classes/FileDialog.xml
+++ b/doc/classes/FileDialog.xml
@@ -151,6 +151,7 @@
If [code]true[/code], the dialog will show hidden files.
[b]Note:[/b] This property is ignored by native file dialogs on Linux.
</member>
+ <member name="size" type="Vector2i" setter="set_size" getter="get_size" overrides="Window" default="Vector2i(640, 360)" />
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
<member name="use_native_dialog" type="bool" setter="set_use_native_dialog" getter="get_use_native_dialog" default="false">
If [code]true[/code], [member access] is set to [constant ACCESS_FILESYSTEM], and it is supported by the current [DisplayServer], OS native dialog will be used instead of custom one.
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index 1b8fa00772..c230bf5ad2 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -58,7 +58,7 @@
<return type="void" />
<param index="0" name="cache_index" type="int" />
<description>
- Removes all font sizes from the cache entry
+ Removes all font sizes from the cache entry.
</description>
</method>
<method name="clear_textures">
diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml
index a970f63c6e..6cf490accb 100644
--- a/doc/classes/InputEvent.xml
+++ b/doc/classes/InputEvent.xml
@@ -91,6 +91,7 @@
<description>
Returns [code]true[/code] if the specified [param event] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events.
If [param exact_match] is [code]false[/code], it ignores additional input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events.
+ [b]Note:[/b] Only considers the event configuration (such as the keyboard key or joypad axis), not state information like [method is_pressed], [method is_released], [method is_echo], or [method is_canceled].
</description>
</method>
<method name="is_pressed" qualifiers="const">
diff --git a/doc/classes/JavaScriptBridge.xml b/doc/classes/JavaScriptBridge.xml
index faf5424c47..ea3ede8857 100644
--- a/doc/classes/JavaScriptBridge.xml
+++ b/doc/classes/JavaScriptBridge.xml
@@ -60,6 +60,20 @@
Returns an interface to a JavaScript object that can be used by scripts. The [param interface] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage.
</description>
</method>
+ <method name="is_js_buffer">
+ <return type="bool" />
+ <param index="0" name="javascript_object" type="JavaScriptObject" />
+ <description>
+ Returns [code]true[/code] if the given [param javascript_object] is of type [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer][code]ArrayBuffer[/code][/url], [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView][code]DataView[/code][/url], or one of the many [url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray]typed array objects[/url].
+ </description>
+ </method>
+ <method name="js_buffer_to_packed_byte_array">
+ <return type="PackedByteArray" />
+ <param index="0" name="javascript_buffer" type="JavaScriptObject" />
+ <description>
+ Returns a copy of [param javascript_buffer]'s contents as a [PackedByteArray]. See also [method is_js_buffer].
+ </description>
+ </method>
<method name="pwa_needs_update" qualifiers="const">
<return type="bool" />
<description>
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index e6eba30ab7..f91006f69a 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -14,7 +14,7 @@
<return type="Rect2" />
<param index="0" name="pos" type="int" />
<description>
- Returns the bounding rectangle of the character at position [param pos]. If the character is a non-visual character or [param pos] is outside the valid range, an empty [Rect2] is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.
+ Returns the bounding rectangle of the character at position [param pos] in the label's local coordinate system. If the character is a non-visual character or [param pos] is outside the valid range, an empty [Rect2] is returned. If the character is a part of a composite grapheme, the bounding rectangle of the whole grapheme is returned.
</description>
</method>
<method name="get_line_count" qualifiers="const">
diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml
index d218f720a3..9c460e6d62 100644
--- a/doc/classes/LineEdit.xml
+++ b/doc/classes/LineEdit.xml
@@ -151,12 +151,24 @@
Returns [code]true[/code] if the user has text in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] (IME).
</description>
</method>
+ <method name="has_redo" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if a "redo" action is available.
+ </description>
+ </method>
<method name="has_selection" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the user has selected text.
</description>
</method>
+ <method name="has_undo" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if an "undo" action is available.
+ </description>
+ </method>
<method name="insert_text_at_caret">
<return type="void" />
<param index="0" name="text" type="String" />
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index ae1eff4220..42753f7071 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -498,6 +498,12 @@
Returns the time elapsed (in seconds) since the last process callback. This value is identical to [method _process]'s [code]delta[/code] parameter, and may vary from frame to frame. See also [constant NOTIFICATION_PROCESS].
</description>
</method>
+ <method name="get_rpc_config" qualifiers="const">
+ <return type="Variant" />
+ <description>
+ Returns a [Dictionary] mapping method names to their RPC configuration defined for this node using [method rpc_config].
+ </description>
+ </method>
<method name="get_scene_instance_load_placeholder" qualifiers="const">
<return type="bool" />
<description>
@@ -967,6 +973,13 @@
Similar to [method call_thread_safe], but for setting properties.
</description>
</method>
+ <method name="set_translation_domain_inherited">
+ <return type="void" />
+ <description>
+ Makes this node inherit the translation domain from its parent node. If this node has no parent, the main translation domain will be used.
+ This is the default behavior for all nodes. Calling [method Object.set_translation_domain] disables this behavior.
+ </description>
+ </method>
<method name="update_configuration_warnings">
<return type="void" />
<description>
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index a331c05e47..2767a11e80 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -818,6 +818,20 @@
[b]Note:[/b] Due of the implementation, each [Dictionary] is formatted very similarly to the returned values of [method get_method_list].
</description>
</method>
+ <method name="get_translation_domain" qualifiers="const">
+ <return type="StringName" />
+ <description>
+ Returns the name of the translation domain used by [method tr] and [method tr_n]. See also [TranslationServer].
+ </description>
+ </method>
+ <method name="has_connections" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="signal" type="StringName" />
+ <description>
+ Returns [code]true[/code] if any connection exists on the given [param signal] name.
+ [b]Note:[/b] In C#, [param signal] must be in snake_case when referring to built-in Godot methods. Prefer using the names exposed in the [code]SignalName[/code] class to avoid allocating a new [StringName] on each call.
+ </description>
+ </method>
<method name="has_meta" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
@@ -1070,6 +1084,13 @@
If a script already exists, its instance is detached, and its property values and state are lost. Built-in property values are still kept.
</description>
</method>
+ <method name="set_translation_domain">
+ <return type="void" />
+ <param index="0" name="domain" type="StringName" />
+ <description>
+ Sets the name of the translation domain used by [method tr] and [method tr_n]. See also [TranslationServer].
+ </description>
+ </method>
<method name="to_string">
<return type="String" />
<description>
@@ -1121,7 +1142,7 @@
Notification received when the object is initialized, before its script is attached. Used internally.
</constant>
<constant name="NOTIFICATION_PREDELETE" value="1">
- Notification received when the object is about to be deleted. Can act as the deconstructor of some programming languages.
+ Notification received when the object is about to be deleted. Can be used like destructors in object-oriented programming languages.
</constant>
<constant name="NOTIFICATION_EXTENSION_RELOADED" value="2">
Notification received when the object finishes hot reloading. This notification is only sent for extensions classes and derived.
diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml
index 494e9966ac..ec0300c068 100644
--- a/doc/classes/PCKPacker.xml
+++ b/doc/classes/PCKPacker.xml
@@ -42,12 +42,12 @@
</method>
<method name="pck_start">
<return type="int" enum="Error" />
- <param index="0" name="pck_name" type="String" />
+ <param index="0" name="pck_path" type="String" />
<param index="1" name="alignment" type="int" default="32" />
<param index="2" name="key" type="String" default="&quot;0000000000000000000000000000000000000000000000000000000000000000&quot;" />
<param index="3" name="encrypt_directory" type="bool" default="false" />
<description>
- Creates a new PCK file with the name [param pck_name]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_name] (even though it's not required).
+ Creates a new PCK file at the file path [param pck_path]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [param pck_path] (even though it's not required).
</description>
</method>
</methods>
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index b205b862a3..0e5097b7b2 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -314,11 +314,11 @@
</member>
<member name="application/run/disable_stderr" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables printing to standard error. If [code]true[/code], this also hides error and warning messages printed by [method @GlobalScope.push_error] and [method @GlobalScope.push_warning]. See also [member application/run/disable_stdout].
- Changes to this setting will only be applied upon restarting the application.
+ Changes to this setting will only be applied upon restarting the application. To control this at runtime, use [member Engine.print_error_messages].
</member>
<member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false">
If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr].
- Changes to this setting will only be applied upon restarting the application.
+ Changes to this setting will only be applied upon restarting the application. To control this at runtime, use [member Engine.print_to_stdout].
</member>
<member name="application/run/enable_alt_space_menu" type="bool" setter="" getter="" default="false">
If [code]true[/code], allows the [kbd]Alt + Space[/kbd] keys to display the window menu. This menu allows the user to perform various window management operations such as moving, resizing, or minimizing the window.
@@ -2293,6 +2293,7 @@
<member name="physics/3d/physics_engine" type="String" setter="" getter="" default="&quot;DEFAULT&quot;">
Sets which physics engine to use for 3D physics.
"DEFAULT" and "GodotPhysics3D" are the same, as there is currently no alternative 3D physics server implemented.
+ "Dummy" is a 3D physics server that does nothing and returns only dummy values, effectively disabling all 3D physics functionality.
</member>
<member name="physics/3d/run_on_separate_thread" type="bool" setter="" getter="" default="false">
If [code]true[/code], the 3D physics server runs on a separate thread, making better use of multi-core CPUs. If [code]false[/code], the 3D physics server runs on the main thread. Running the physics server on a separate thread can increase performance, but restricts API access to only physics process.
@@ -2795,6 +2796,10 @@
If [code]true[/code], the forward renderer will fall back to Direct3D 12 if Vulkan is not supported.
[b]Note:[/b] This setting is implemented only on Windows.
</member>
+ <member name="rendering/rendering_device/fallback_to_opengl3" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the forward renderer will fall back to OpenGL 3 if both Direct3D 12, Metal and Vulkan are not supported.
+ [b]Note:[/b] This setting is implemented only on Windows, Android, macOS, iOS, and Linux/X11.
+ </member>
<member name="rendering/rendering_device/fallback_to_vulkan" type="bool" setter="" getter="" default="true">
If [code]true[/code], the forward renderer will fall back to Vulkan if Direct3D 12 is not supported.
[b]Note:[/b] This setting is implemented only on Windows.
@@ -2894,10 +2899,13 @@
<member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP.
</member>
+ <member name="rendering/textures/vram_compression/cache_gpu_compressor" type="bool" setter="" getter="" default="true">
+ If [code]true[/code], the GPU texture compressor will cache the local RenderingDevice and its resources (shaders and pipelines), allowing for faster subsequent imports at a memory cost.
+ </member>
<member name="rendering/textures/vram_compression/compress_with_gpu" type="bool" setter="" getter="" default="true">
- If [code]true[/code], the texture importer will utilize the GPU for compressing textures, which makes large textures import significantly faster.
+ If [code]true[/code], the texture importer will utilize the GPU for compressing textures, improving the import time of large images.
[b]Note:[/b] This setting requires either Vulkan or D3D12 available as a rendering backend.
- [b]Note:[/b] Currently this only affects BC6H compression, which is used on Desktop and Console for HDR images.
+ [b]Note:[/b] Currently this only affects BC1 and BC6H compression, which are used on Desktop and Console for fully opaque and HDR images respectively.
</member>
<member name="rendering/textures/vram_compression/import_etc2_astc" type="bool" setter="" getter="" default="false">
If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm for lower quality textures and normal maps and Adaptable Scalable Texture Compression algorithm for high quality textures (in 4×4 block size).
diff --git a/doc/classes/RDPipelineDepthStencilState.xml b/doc/classes/RDPipelineDepthStencilState.xml
index b8245f97af..dc1e70eb55 100644
--- a/doc/classes/RDPipelineDepthStencilState.xml
+++ b/doc/classes/RDPipelineDepthStencilState.xml
@@ -19,7 +19,7 @@
The operation to perform on the stencil buffer for back pixels that pass the stencil test but fail the depth test.
</member>
<member name="back_op_fail" type="int" setter="set_back_op_fail" getter="get_back_op_fail" enum="RenderingDevice.StencilOperation" default="1">
- The operation to perform on the stencil buffer for back pixels that fail the stencil test
+ The operation to perform on the stencil buffer for back pixels that fail the stencil test.
</member>
<member name="back_op_pass" type="int" setter="set_back_op_pass" getter="get_back_op_pass" enum="RenderingDevice.StencilOperation" default="1">
The operation to perform on the stencil buffer for back pixels that pass the stencil test.
diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml
index ddd52c6835..2ff7e934e9 100644
--- a/doc/classes/RenderingDevice.xml
+++ b/doc/classes/RenderingDevice.xml
@@ -905,7 +905,7 @@
<param index="4" name="mipmaps" type="int" default="1" />
<param index="5" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" />
<description>
- Creates a shared texture using the specified [param view] and the texture information from [param with_texture]'s [param layer] and [param mipmap]. The number of included mipmaps from the original texture can be controlled using the [param mipmaps] parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use [method texture_create_shared]
+ Creates a shared texture using the specified [param view] and the texture information from [param with_texture]'s [param layer] and [param mipmap]. The number of included mipmaps from the original texture can be controlled using the [param mipmaps] parameter. Only relevant for textures with multiple layers, such as 3D textures, texture arrays and cubemaps. For single-layer textures, use [method texture_create_shared].
For 2D textures (which only have one layer), [param layer] must be [code]0[/code].
[b]Note:[/b] Layer slicing is only supported for 2D texture arrays, not 3D textures or cubemaps.
</description>
diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml
index cea9a4cec4..144f78349f 100644
--- a/doc/classes/RenderingServer.xml
+++ b/doc/classes/RenderingServer.xml
@@ -3532,7 +3532,7 @@
<method name="texture_2d_placeholder_create">
<return type="RID" />
<description>
- Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_2d_layered_*[/code] RenderingServer functions, although it does nothing when used. See also [method texture_2d_layered_placeholder_create]
+ Creates a placeholder for a 2-dimensional layered texture and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_2d_layered_*[/code] RenderingServer functions, although it does nothing when used. See also [method texture_2d_layered_placeholder_create].
Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] method.
[b]Note:[/b] The equivalent resource is [PlaceholderTexture2D].
</description>
@@ -3583,6 +3583,21 @@
[b]Note:[/b] The [param texture] must have the same width, height, depth and format as the current texture data. Otherwise, an error will be printed and the original texture won't be modified. If you need to use different width, height, depth or format, use [method texture_replace] instead.
</description>
</method>
+ <method name="texture_create_from_native_handle">
+ <return type="RID" />
+ <param index="0" name="type" type="int" enum="RenderingServer.TextureType" />
+ <param index="1" name="format" type="int" enum="Image.Format" />
+ <param index="2" name="native_handle" type="int" />
+ <param index="3" name="width" type="int" />
+ <param index="4" name="height" type="int" />
+ <param index="5" name="depth" type="int" />
+ <param index="6" name="layers" type="int" default="1" />
+ <param index="7" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" default="0" />
+ <description>
+ Creates a texture based on a native handle that was created outside of Godot's renderer.
+ [b]Note:[/b] If using the rendering device renderer, using [method RenderingDevice.texture_create_from_extension] rather than this method is recommended. It will give you much more control over the texture's format and usage.
+ </description>
+ </method>
<method name="texture_get_format" qualifiers="const">
<return type="int" enum="Image.Format" />
<param index="0" name="texture" type="RID" />
@@ -3721,7 +3736,7 @@
<return type="float" />
<param index="0" name="viewport" type="RID" />
<description>
- Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike [method Engine.get_frames_per_second], this method accurately reflects GPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_gpu].
+ Returns the GPU time taken to render the last frame in milliseconds. To get a complete readout of GPU time spent to render the scene, sum the render times of all viewports that are drawn every frame. Unlike [method Engine.get_frames_per_second], this method accurately reflects GPU utilization even if framerate is capped via V-Sync or [member Engine.max_fps]. See also [method viewport_get_measured_render_time_cpu].
[b]Note:[/b] Requires measurements to be enabled on the specified [param viewport] using [method viewport_set_measure_render_time]. Otherwise, this method returns [code]0.0[/code].
[b]Note:[/b] When GPU utilization is low enough during a certain period of time, GPUs will decrease their power state (which in turn decreases core and memory clock speeds). This can cause the reported GPU time to increase if GPU utilization is kept low enough by a framerate cap (compared to what it would be at the GPU's highest power state). Keep this in mind when benchmarking using [method viewport_get_measured_render_time_gpu]. This behavior can be overridden in the graphics driver settings at the cost of higher power usage.
</description>
@@ -4311,6 +4326,15 @@
<constant name="MAX_MESH_SURFACES" value="256">
The maximum number of surfaces a mesh can have.
</constant>
+ <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType">
+ 2D texture.
+ </constant>
+ <constant name="TEXTURE_TYPE_LAYERED" value="1" enum="TextureType">
+ Layered texture.
+ </constant>
+ <constant name="TEXTURE_TYPE_3D" value="2" enum="TextureType">
+ 3D texture.
+ </constant>
<constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType">
Array of 2-dimensional textures (see [Texture2DArray]).
</constant>
@@ -5124,7 +5148,7 @@
The callback is called before our transparent rendering pass, but after our sky is rendered and we've created our back buffers.
</constant>
<constant name="COMPOSITOR_EFFECT_CALLBACK_TYPE_POST_TRANSPARENT" value="4" enum="CompositorEffectCallbackType">
- The callback is called after our transparent rendering pass, but before any build in post effects and output to our render target.
+ The callback is called after our transparent rendering pass, but before any built-in post-processing effects and output to our render target.
</constant>
<constant name="COMPOSITOR_EFFECT_CALLBACK_TYPE_ANY" value="-1" enum="CompositorEffectCallbackType">
</constant>
@@ -5636,7 +5660,10 @@
<constant name="GLOBAL_VAR_TYPE_SAMPLERCUBE" value="27" enum="GlobalShaderParameterType">
Cubemap sampler global shader parameter ([code]global uniform samplerCube ...[/code]). Exposed as a [Cubemap] in the editor UI.
</constant>
- <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalShaderParameterType">
+ <constant name="GLOBAL_VAR_TYPE_SAMPLEREXT" value="28" enum="GlobalShaderParameterType">
+ External sampler global shader parameter ([code]global uniform samplerExternalOES ...[/code]). Exposed as a [ExternalTexture] in the editor UI.
+ </constant>
+ <constant name="GLOBAL_VAR_TYPE_MAX" value="29" enum="GlobalShaderParameterType">
Represents the size of the [enum GlobalShaderParameterType] enum.
</constant>
<constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo">
diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml
index fe09472c14..18d4047339 100644
--- a/doc/classes/Resource.xml
+++ b/doc/classes/Resource.xml
@@ -20,6 +20,19 @@
Override this method to return a custom [RID] when [method get_rid] is called.
</description>
</method>
+ <method name="_reset_state" qualifiers="virtual">
+ <return type="void" />
+ <description>
+ For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], this method should be implemented to correctly clear the resource's state.
+ </description>
+ </method>
+ <method name="_set_path_cache" qualifiers="virtual const">
+ <return type="void" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Sets the resource's path to [param path] without involving the resource cache.
+ </description>
+ </method>
<method name="_setup_local_to_scene" qualifiers="virtual">
<return type="void" />
<description>
@@ -68,6 +81,14 @@
Generates a unique identifier for a resource to be contained inside a [PackedScene], based on the current date, time, and a random value. The returned string is only composed of letters ([code]a[/code] to [code]y[/code]) and numbers ([code]0[/code] to [code]8[/code]). See also [member resource_scene_unique_id].
</description>
</method>
+ <method name="get_id_for_path" qualifiers="const">
+ <return type="String" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Returns the unique identifier for the resource with the given [param path] from the resource cache. If the resource is not loaded and cached, an empty string is returned.
+ [b]Note:[/b] This method is only implemented when running in an editor context. At runtime, it returns an empty string.
+ </description>
+ </method>
<method name="get_local_scene" qualifiers="const">
<return type="Node" />
<description>
@@ -80,6 +101,34 @@
Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID].
</description>
</method>
+ <method name="is_built_in" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if the resource is built-in (from the engine) or [code]false[/code] if it is user-defined.
+ </description>
+ </method>
+ <method name="reset_state">
+ <return type="void" />
+ <description>
+ For resources that use a variable number of properties, either via [method Object._validate_property] or [method Object._get_property_list], override [method _reset_state] to correctly clear the resource's state.
+ </description>
+ </method>
+ <method name="set_id_for_path">
+ <return type="void" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="id" type="String" />
+ <description>
+ Sets the unique identifier to [param id] for the resource with the given [param path] in the resource cache. If the unique identifier is empty, the cache entry using [param path] is removed if it exists.
+ [b]Note:[/b] This method is only implemented when running in an editor context.
+ </description>
+ </method>
+ <method name="set_path_cache">
+ <return type="void" />
+ <param index="0" name="path" type="String" />
+ <description>
+ Sets the resource's path to [param path] without involving the resource cache.
+ </description>
+ </method>
<method name="setup_local_to_scene" deprecated="This method should only be called internally.">
<return type="void" />
<description>
diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml
index 42c9bd7a3c..05c749bc24 100644
--- a/doc/classes/ResourceSaver.xml
+++ b/doc/classes/ResourceSaver.xml
@@ -26,6 +26,14 @@
Returns the list of extensions available for saving a resource of a given type.
</description>
</method>
+ <method name="get_resource_id_for_path">
+ <return type="int" />
+ <param index="0" name="path" type="String" />
+ <param index="1" name="generate" type="bool" default="false" />
+ <description>
+ Returns the resource ID for the given path. If [param generate] is [code]true[/code], a new resource ID will be generated if one for the path is not found. If [param generate] is [code]false[/code] and the path is not found, [constant ResourceUID.INVALID_ID] is returned.
+ </description>
+ </method>
<method name="remove_resource_format_saver">
<return type="void" />
<param index="0" name="format_saver" type="ResourceFormatSaver" />
diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml
index 45f0bbb8aa..80aad9d30d 100644
--- a/doc/classes/Script.xml
+++ b/doc/classes/Script.xml
@@ -58,6 +58,12 @@
Returns the default value of the specified property.
</description>
</method>
+ <method name="get_rpc_config" qualifiers="const">
+ <return type="Variant" />
+ <description>
+ Returns a [Dictionary] mapping method names to their RPC configuration defined by this script.
+ </description>
+ </method>
<method name="get_script_constant_map">
<return type="Dictionary" />
<description>
diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml
index 2181194fd4..405bba3564 100644
--- a/doc/classes/ScrollContainer.xml
+++ b/doc/classes/ScrollContainer.xml
@@ -102,6 +102,9 @@
<constant name="SCROLL_MODE_SHOW_NEVER" value="3" enum="ScrollMode">
Scrolling enabled, scrollbar will be hidden.
</constant>
+ <constant name="SCROLL_MODE_RESERVE" value="4" enum="ScrollMode">
+ Combines [constant SCROLL_MODE_AUTO] and [constant SCROLL_MODE_SHOW_ALWAYS]. The scrollbar is only visible if necessary, but the content size is adjusted as if it was always visible. It's useful for ensuring that content size stays the same regardless if the scrollbar is visible.
+ </constant>
</constants>
<theme_items>
<theme_item name="panel" data_type="style" type="StyleBox">
diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml
index 4343a789fd..b1e931aef8 100644
--- a/doc/classes/Shortcut.xml
+++ b/doc/classes/Shortcut.xml
@@ -26,7 +26,7 @@
<return type="bool" />
<param index="0" name="event" type="InputEvent" />
<description>
- Returns whether any [InputEvent] in [member events] equals [param event].
+ Returns whether any [InputEvent] in [member events] equals [param event]. This uses [method InputEvent.is_match] to compare events.
</description>
</method>
</methods>
diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml
index 7d6ff1e9b0..65168d6980 100644
--- a/doc/classes/Signal.xml
+++ b/doc/classes/Signal.xml
@@ -109,6 +109,12 @@
Returns the ID of the object emitting this signal (see [method Object.get_instance_id]).
</description>
</method>
+ <method name="has_connections" qualifiers="const">
+ <return type="bool" />
+ <description>
+ Returns [code]true[/code] if any [Callable] is connected to this signal.
+ </description>
+ </method>
<method name="is_connected" qualifiers="const">
<return type="bool" />
<param index="0" name="callable" type="Callable" />
diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml
index cc3f61e1b2..f5b808be8e 100644
--- a/doc/classes/Skeleton3D.xml
+++ b/doc/classes/Skeleton3D.xml
@@ -99,6 +99,21 @@
Returns the global rest transform for [param bone_idx].
</description>
</method>
+ <method name="get_bone_meta" qualifiers="const">
+ <return type="Variant" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="key" type="StringName" />
+ <description>
+ Returns bone metadata for [param bone_idx] with [param key].
+ </description>
+ </method>
+ <method name="get_bone_meta_list" qualifiers="const">
+ <return type="StringName[]" />
+ <param index="0" name="bone_idx" type="int" />
+ <description>
+ Returns a list of all metadata keys for [param bone_idx].
+ </description>
+ </method>
<method name="get_bone_name" qualifiers="const">
<return type="String" />
<param index="0" name="bone_idx" type="int" />
@@ -171,6 +186,14 @@
Use for invalidating caches in IK solvers and other nodes which process bones.
</description>
</method>
+ <method name="has_bone_meta" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="key" type="StringName" />
+ <description>
+ Returns whether there exists any bone metadata for [param bone_idx] with key [param key].
+ </description>
+ </method>
<method name="is_bone_enabled" qualifiers="const">
<return type="bool" />
<param index="0" name="bone_idx" type="int" />
@@ -263,6 +286,15 @@
[b]Note:[/b] The pose transform needs to be a global pose! To convert a world transform from a [Node3D] to a global bone pose, multiply the [method Transform3D.affine_inverse] of the node's [member Node3D.global_transform] by the desired world transform.
</description>
</method>
+ <method name="set_bone_meta">
+ <return type="void" />
+ <param index="0" name="bone_idx" type="int" />
+ <param index="1" name="key" type="StringName" />
+ <param index="2" name="value" type="Variant" />
+ <description>
+ Sets bone metadata for [param bone_idx], will set the [param key] meta to [param value].
+ </description>
+ </method>
<method name="set_bone_name">
<return type="void" />
<param index="0" name="bone_idx" type="int" />
diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml
index 195196b78c..4d8791d8c1 100644
--- a/doc/classes/SoftBody3D.xml
+++ b/doc/classes/SoftBody3D.xml
@@ -87,6 +87,7 @@
<param index="0" name="point_index" type="int" />
<param index="1" name="pinned" type="bool" />
<param index="2" name="attachment_path" type="NodePath" default="NodePath(&quot;&quot;)" />
+ <param index="3" name="insert_at" type="int" default="-1" />
<description>
Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [param attachment_path] can define a [Node3D] the pinned vertex will be attached to.
</description>
diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml
index 454a542cc8..650c396190 100644
--- a/doc/classes/SplitContainer.xml
+++ b/doc/classes/SplitContainer.xml
@@ -16,13 +16,39 @@
Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values.
</description>
</method>
+ <method name="get_drag_area_control">
+ <return type="Control" />
+ <description>
+ Returns the drag area [Control]. For example, you can move a pre-configured button into the drag area [Control] so that it rides along with the split bar. Try setting the [Button] anchors to [code]center[/code] prior to the [code]reparent()[/code] call.
+ [codeblock]
+ $BarnacleButton.reparent($SplitContainer.get_drag_area_control())
+ [/codeblock]
+ [b]Note:[/b] The drag area [Control] is drawn over the [SplitContainer]'s children, so [CanvasItem] draw objects called from the [Control] and children added to the [Control] will also appear over the [SplitContainer]'s children. Try setting [member Control.mouse_filter] of custom children to [constant Control.MOUSE_FILTER_IGNORE] to prevent blocking the mouse from dragging if desired.
+ [b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash.
+ </description>
+ </method>
</methods>
<members>
<member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false">
If [code]true[/code], the area of the first [Control] will be collapsed and the dragger will be disabled.
</member>
+ <member name="drag_area_highlight_in_editor" type="bool" setter="set_drag_area_highlight_in_editor" getter="is_drag_area_highlight_in_editor_enabled" default="false">
+ Highlights the drag area [Rect2] so you can see where it is during development. The drag area is gold if [member dragging_enabled] is [code]true[/code], and red if [code]false[/code].
+ </member>
+ <member name="drag_area_margin_begin" type="int" setter="set_drag_area_margin_begin" getter="get_drag_area_margin_begin" default="0">
+ Reduces the size of the drag area and split bar [theme_item split_bar_background] at the beginning of the container.
+ </member>
+ <member name="drag_area_margin_end" type="int" setter="set_drag_area_margin_end" getter="get_drag_area_margin_end" default="0">
+ Reduces the size of the drag area and split bar [theme_item split_bar_background] at the end of the container.
+ </member>
+ <member name="drag_area_offset" type="int" setter="set_drag_area_offset" getter="get_drag_area_offset" default="0">
+ Shifts the drag area in the axis of the container to prevent the drag area from overlapping the [ScrollBar] or other selectable [Control] of a child node.
+ </member>
<member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0">
- Determines the dragger's visibility. See [enum DraggerVisibility] for details.
+ Determines the dragger's visibility. See [enum DraggerVisibility] for details. This property does not determine whether dragging is enabled or not. Use [member dragging_enabled] for that.
+ </member>
+ <member name="dragging_enabled" type="bool" setter="set_dragging_enabled" getter="is_dragging_enabled" default="true">
+ Enables or disables split dragging.
</member>
<member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0">
The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control].
@@ -33,6 +59,16 @@
</member>
</members>
<signals>
+ <signal name="drag_ended">
+ <description>
+ Emitted when the user ends dragging.
+ </description>
+ </signal>
+ <signal name="drag_started">
+ <description>
+ Emitted when the user starts dragging.
+ </description>
+ </signal>
<signal name="dragged">
<param index="0" name="offset" type="int" />
<description>
@@ -42,24 +78,28 @@
</signals>
<constants>
<constant name="DRAGGER_VISIBLE" value="0" enum="DraggerVisibility">
- The split dragger is visible when the cursor hovers it.
+ The split dragger icon is always visible when [theme_item autohide] is [code]false[/code], otherwise visible only when the cursor hovers it.
+ The size of the grabber icon determines the minimum [theme_item separation].
+ The dragger icon is automatically hidden if the length of the grabber icon is longer than the split bar.
</constant>
<constant name="DRAGGER_HIDDEN" value="1" enum="DraggerVisibility">
- The split dragger is never visible.
+ The split dragger icon is never visible regardless of the value of [theme_item autohide].
+ The size of the grabber icon determines the minimum [theme_item separation].
</constant>
<constant name="DRAGGER_HIDDEN_COLLAPSED" value="2" enum="DraggerVisibility">
- The split dragger is never visible and its space collapsed.
+ The split dragger icon is not visible, and the split bar is collapsed to zero thickness.
</constant>
</constants>
<theme_items>
<theme_item name="autohide" data_type="constant" type="int" default="1">
- Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible.
+ Boolean value. If [code]1[/code] ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If [code]0[/code] ([code]false[/code]), it's always visible. The [member dragger_visibility] must be [constant DRAGGER_VISIBLE].
</theme_item>
<theme_item name="minimum_grab_thickness" data_type="constant" type="int" default="6">
- The minimum thickness of the area users can click on to grab the splitting line. If [theme_item separation] or [theme_item h_grabber] / [theme_item v_grabber]'s thickness are too small, this ensure that the splitting line can still be dragged.
+ The minimum thickness of the area users can click on to grab the split bar. This ensures that the split bar can still be dragged if [theme_item separation] or [theme_item h_grabber] / [theme_item v_grabber]'s size is too narrow to easily select.
</theme_item>
<theme_item name="separation" data_type="constant" type="int" default="12">
- The space between sides of the container.
+ The split bar thickness, i.e., the gap between the two children of the container. This is overridden by the size of the grabber icon if [member dragger_visibility] is set to [constant DRAGGER_VISIBLE], or [constant DRAGGER_HIDDEN], and [theme_item separation] is smaller than the size of the grabber icon in the same axis.
+ [b]Note:[/b] To obtain [theme_item separation] values less than the size of the grabber icon, for example a [code]1 px[/code] hairline, set [theme_item h_grabber] or [theme_item v_grabber] to a new [ImageTexture], which effectively sets the grabber icon size to [code]0 px[/code].
</theme_item>
<theme_item name="grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area.
@@ -70,5 +110,8 @@
<theme_item name="v_grabber" data_type="icon" type="Texture2D">
The icon used for the grabber drawn in the middle area when [member vertical] is [code]true[/code].
</theme_item>
+ <theme_item name="split_bar_background" data_type="style" type="StyleBox">
+ Determines the background of the split bar if its thickness is greater than zero.
+ </theme_item>
</theme_items>
</class>
diff --git a/doc/classes/String.xml b/doc/classes/String.xml
index d99eaa64a6..40f08dafe6 100644
--- a/doc/classes/String.xml
+++ b/doc/classes/String.xml
@@ -6,7 +6,7 @@
<description>
This is the built-in string Variant type (and the one used by GDScript). Strings may contain any number of Unicode characters, and expose methods useful for manipulating and generating strings. Strings are reference-counted and use a copy-on-write approach (every modification to a string returns a new [String]), so passing them around is cheap in resources.
Some string methods have corresponding variations. Variations suffixed with [code]n[/code] ([method countn], [method findn], [method replacen], etc.) are [b]case-insensitive[/b] (they make no distinction between uppercase and lowercase letters). Method variations prefixed with [code]r[/code] ([method rfind], [method rsplit], etc.) are reversed, and start from the end of the string, instead of the beginning.
- [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty strings.
+ [b]Note:[/b] In a boolean context, a string will evaluate to [code]false[/code] if it is empty ([code]""[/code]). Otherwise, a string will always evaluate to [code]true[/code].
</description>
<tutorials>
<link title="GDScript format strings">$DOCS_URL/tutorials/scripting/gdscript/gdscript_format_string.html</link>
diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml
index 1a891de05f..3a2b492496 100644
--- a/doc/classes/StringName.xml
+++ b/doc/classes/StringName.xml
@@ -9,7 +9,7 @@
See also [NodePath], which is a similar concept specifically designed to store pre-parsed scene tree paths.
All of [String]'s methods are available in this class too. They convert the [StringName] into a string, and they also return a string. This is highly inefficient and should only be used if the string is desired.
[b]Note:[/b] In C#, an explicit conversion to [code]System.String[/code] is required to use the methods listed on this page. Use the [code]ToString()[/code] method to cast a [StringName] to a string, and then use the equivalent methods in [code]System.String[/code] or [code]StringExtensions[/code].
- [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code]. The [code]not[/code] operator cannot be used. Instead, [method is_empty] should be used to check for empty [StringName]s.
+ [b]Note:[/b] In a boolean context, a [StringName] will evaluate to [code]false[/code] if it is empty ([code]StringName("")[/code]). Otherwise, a [StringName] will always evaluate to [code]true[/code].
</description>
<tutorials>
</tutorials>
diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml
index a8bd068b1c..9c1525d8f8 100644
--- a/doc/classes/SurfaceTool.xml
+++ b/doc/classes/SurfaceTool.xml
@@ -241,7 +241,7 @@
<param index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount" />
<description>
Set to [constant SKIN_8_WEIGHTS] to indicate that up to 8 bone influences per vertex may be used.
- By default, only 4 bone influences are used ([constant SKIN_4_WEIGHTS])
+ By default, only 4 bone influences are used ([constant SKIN_4_WEIGHTS]).
[b]Note:[/b] This function takes an enum, not the exact number of weights.
</description>
</method>
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index 6505e48fb9..42558bf992 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1299,6 +1299,9 @@
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true" keywords="readonly, disabled, enabled">
If [code]false[/code], existing text cannot be modified and new text cannot be added.
</member>
+ <member name="empty_selection_clipboard_enabled" type="bool" setter="set_empty_selection_clipboard_enabled" getter="is_empty_selection_clipboard_enabled" default="true">
+ If [code]true[/code], copying or cutting without a selection is performed on all lines with a caret. Otherwise, copy and cut require a selection.
+ </member>
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" overrides="Control" enum="Control.FocusMode" default="2" />
<member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false">
If [code]true[/code], all occurrences of the selected text will be highlighted.
@@ -1361,7 +1364,8 @@
Set additional options for BiDi override.
</member>
<member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter">
- Sets the [SyntaxHighlighter] to use.
+ The syntax highlighter to use.
+ [b]Note:[/b] A [SyntaxHighlighter] instance should not be used across multiple [TextEdit] nodes.
</member>
<member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
String value of the [TextEdit].
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 9d476691bf..aed041c5ad 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -1732,7 +1732,7 @@
Returns array of the composite character boundaries.
[codeblock]
var ts = TextServerManager.get_primary_interface()
- print(ts.string_get_word_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
+ print(ts.string_get_character_breaks("Test ❤️‍🔥 Test")) # Prints [1, 2, 3, 4, 5, 9, 10, 11, 12, 13, 14]
[/codeblock]
</description>
</method>
diff --git a/doc/classes/TranslationDomain.xml b/doc/classes/TranslationDomain.xml
new file mode 100644
index 0000000000..da6f2704bf
--- /dev/null
+++ b/doc/classes/TranslationDomain.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="TranslationDomain" inherits="RefCounted" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ A self-contained collection of [Translation] resources.
+ </brief_description>
+ <description>
+ [TranslationDomain] is a self-contained collection of [Translation] resources. Translations can be added to or removed from it.
+ If you're working with the main translation domain, it is more convenient to use the wrap methods on [TranslationServer].
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_translation">
+ <return type="void" />
+ <param index="0" name="translation" type="Translation" />
+ <description>
+ Adds a translation.
+ </description>
+ </method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Removes all translations.
+ </description>
+ </method>
+ <method name="get_translation_object" qualifiers="const">
+ <return type="Translation" />
+ <param index="0" name="locale" type="String" />
+ <description>
+ Returns the [Translation] instance that best matches [param locale]. Returns [code]null[/code] if there are no matches.
+ </description>
+ </method>
+ <method name="remove_translation">
+ <return type="void" />
+ <param index="0" name="translation" type="Translation" />
+ <description>
+ Removes the given translation.
+ </description>
+ </method>
+ <method name="translate" qualifiers="const">
+ <return type="StringName" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="context" type="StringName" default="&amp;&quot;&quot;" />
+ <description>
+ Returns the current locale's translation for the given message and context.
+ </description>
+ </method>
+ <method name="translate_plural" qualifiers="const">
+ <return type="StringName" />
+ <param index="0" name="message" type="StringName" />
+ <param index="1" name="message_plural" type="StringName" />
+ <param index="2" name="n" type="int" />
+ <param index="3" name="context" type="StringName" default="&amp;&quot;&quot;" />
+ <description>
+ Returns the current locale's translation for the given message, plural message and context.
+ The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ </description>
+ </method>
+ </methods>
+</class>
diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml
index db1a65278c..0a4965c36c 100644
--- a/doc/classes/TranslationServer.xml
+++ b/doc/classes/TranslationServer.xml
@@ -4,7 +4,8 @@
The server responsible for language translations.
</brief_description>
<description>
- The server that manages all language translations. Translations can be added to or removed from it.
+ The translation server is the API backend that manages all language translations.
+ Translations are stored in [TranslationDomain]s, which can be accessed by name. The most commonly used translation domain is the main translation domain. It always exists and can be accessed using an empty [StringName]. The translation server provides wrapper methods for accessing the main translation domain directly, without having to fetch the translation domain first. Custom translation domains are mainly for advanced usages like editor plugins. Names starting with [code]godot.[/code] are reserved for engine internals.
</description>
<tutorials>
<link title="Internationalizing games">$DOCS_URL/tutorials/i18n/internationalizing_games.html</link>
@@ -15,13 +16,13 @@
<return type="void" />
<param index="0" name="translation" type="Translation" />
<description>
- Adds a [Translation] resource.
+ Adds a translation to the main translation domain.
</description>
</method>
<method name="clear">
<return type="void" />
<description>
- Clears the server from all translations.
+ Removes all translations from the main translation domain.
</description>
</method>
<method name="compare_locales" qualifiers="const">
@@ -84,6 +85,13 @@
Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]).
</description>
</method>
+ <method name="get_or_add_domain">
+ <return type="TranslationDomain" />
+ <param index="0" name="domain" type="StringName" />
+ <description>
+ Returns the translation domain with the specified name. An empty translation domain will be created and added if it does not exist.
+ </description>
+ </method>
<method name="get_script_name" qualifiers="const">
<return type="String" />
<param index="0" name="script" type="String" />
@@ -102,8 +110,14 @@
<return type="Translation" />
<param index="0" name="locale" type="String" />
<description>
- Returns the [Translation] instance based on the [param locale] passed in.
- It will return [code]null[/code] if there is no [Translation] instance that matches the [param locale].
+ Returns the [Translation] instance that best matches [param locale] in the main translation domain. Returns [code]null[/code] if there are no matches.
+ </description>
+ </method>
+ <method name="has_domain" qualifiers="const">
+ <return type="bool" />
+ <param index="0" name="domain" type="StringName" />
+ <description>
+ Returns [code]true[/code] if a translation domain with the specified name exists.
</description>
</method>
<method name="pseudolocalize" qualifiers="const">
@@ -119,11 +133,19 @@
Reparses the pseudolocalization options and reloads the translation.
</description>
</method>
+ <method name="remove_domain">
+ <return type="void" />
+ <param index="0" name="domain" type="StringName" />
+ <description>
+ Removes the translation domain with the specified name.
+ [b]Note:[/b] Trying to remove the main translation domain is an error.
+ </description>
+ </method>
<method name="remove_translation">
<return type="void" />
<param index="0" name="translation" type="Translation" />
<description>
- Removes the given translation from the server.
+ Removes the given translation from the main translation domain.
</description>
</method>
<method name="set_locale">
@@ -146,7 +168,8 @@
<param index="0" name="message" type="StringName" />
<param index="1" name="context" type="StringName" default="&amp;&quot;&quot;" />
<description>
- Returns the current locale's translation for the given message (key) and context.
+ Returns the current locale's translation for the given message and context.
+ [b]Note:[/b] This method always uses the main translation domain.
</description>
</method>
<method name="translate_plural" qualifiers="const">
@@ -156,8 +179,9 @@
<param index="2" name="n" type="int" />
<param index="3" name="context" type="StringName" default="&amp;&quot;&quot;" />
<description>
- Returns the current locale's translation for the given message (key), plural message and context.
+ Returns the current locale's translation for the given message, plural message and context.
The number [param n] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language.
+ [b]Note:[/b] This method always uses the main translation domain.
</description>
</method>
</methods>
diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml
index 7b4952580c..621f32de6d 100644
--- a/doc/classes/VehicleWheel3D.xml
+++ b/doc/classes/VehicleWheel3D.xml
@@ -54,10 +54,10 @@
Slows down the wheel by applying a braking force. The wheel is only slowed down if it is in contact with a surface. The force you need to apply to adequately slow down your vehicle depends on the [member RigidBody3D.mass] of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 30 range for hard braking.
</member>
<member name="damping_compression" type="float" setter="set_damping_compression" getter="get_damping_compression" default="0.83">
- The damping applied to the spring when the spring is being compressed. This value should be between 0.0 (no damping) and 1.0. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car.
+ The damping applied to the suspension spring when being compressed, meaning when the wheel is moving up relative to the vehicle. It is measured in Newton-seconds per millimeter (N⋅s/mm), or megagrams per second (Mg/s). This value should be between 0.0 (no damping) and 1.0, but may be more. A value of 0.0 means the car will keep bouncing as the spring keeps its energy. A good value for this is around 0.3 for a normal car, 0.5 for a race car.
</member>
<member name="damping_relaxation" type="float" setter="set_damping_relaxation" getter="get_damping_relaxation" default="0.88">
- The damping applied to the spring when relaxing. This value should be between 0.0 (no damping) and 1.0. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
+ The damping applied to the suspension spring when rebounding or extending, meaning when the wheel is moving down relative to the vehicle. It is measured in Newton-seconds per millimeter (N⋅s/mm), or megagrams per second (Mg/s). This value should be between 0.0 (no damping) and 1.0, but may be more. This value should always be slightly higher than the [member damping_compression] property. For a [member damping_compression] value of 0.3, try a relaxation value of 0.5.
</member>
<member name="engine_force" type="float" setter="set_engine_force" getter="get_engine_force" default="0.0">
Accelerates the wheel by applying an engine force. The wheel is only sped up if it is in contact with a surface. The [member RigidBody3D.mass] of the vehicle has an effect on the acceleration of the vehicle. For a vehicle with a mass set to 1000, try a value in the 25 - 50 range for acceleration.
@@ -71,7 +71,7 @@
The maximum force the spring can resist. This value should be higher than a quarter of the [member RigidBody3D.mass] of the [VehicleBody3D] or the spring will not carry the weight of the vehicle. Good results are often obtained by a value that is about 3× to 4× this number.
</member>
<member name="suspension_stiffness" type="float" setter="set_suspension_stiffness" getter="get_suspension_stiffness" default="5.88">
- This value defines the stiffness of the suspension. Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
+ The stiffness of the suspension, measured in Newtons per millimeter (N/mm), or megagrams per second squared (Mg/s²). Use a value lower than 50 for an off-road car, a value between 50 and 100 for a race car and try something around 200 for something like a Formula 1 car.
</member>
<member name="suspension_travel" type="float" setter="set_suspension_travel" getter="get_suspension_travel" default="0.2">
This is the distance the suspension can travel. As Godot units are equivalent to meters, keep this setting relatively low. Try a value between 0.1 and 0.3 depending on the type of car.
diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml
index 350fd65197..95a1d0f77e 100644
--- a/doc/classes/Viewport.xml
+++ b/doc/classes/Viewport.xml
@@ -33,6 +33,18 @@
Returns the first valid [World3D] for this viewport, searching the [member world_3d] property of itself and any Viewport ancestor.
</description>
</method>
+ <method name="get_audio_listener_2d" qualifiers="const">
+ <return type="AudioListener2D" />
+ <description>
+ Returns the currently active 2D audio listener. Returns [code]null[/code] if there are no active 2D audio listeners, in which case the active 2D camera will be treated as listener.
+ </description>
+ </method>
+ <method name="get_audio_listener_3d" qualifiers="const">
+ <return type="AudioListener3D" />
+ <description>
+ Returns the currently active 3D audio listener. Returns [code]null[/code] if there are no active 3D audio listeners, in which case the active 3D camera will be treated as listener.
+ </description>
+ </method>
<method name="get_camera_2d" qualifiers="const">
<return type="Camera2D" />
<description>
@@ -151,7 +163,7 @@
<method name="gui_is_dragging" qualifiers="const">
<return type="bool" />
<description>
- Returns [code]true[/code] if the viewport is currently performing a drag operation.
+ Returns [code]true[/code] if a drag operation is currently ongoing and where the drop action could happen in this viewport.
Alternative to [constant Node.NOTIFICATION_DRAG_BEGIN] and [constant Node.NOTIFICATION_DRAG_END] when you prefer polling the value.
</description>
</method>
diff --git a/doc/classes/XRPose.xml b/doc/classes/XRPose.xml
index 60a2226a60..76c1ced352 100644
--- a/doc/classes/XRPose.xml
+++ b/doc/classes/XRPose.xml
@@ -29,11 +29,11 @@
The linear velocity of this pose.
</member>
<member name="name" type="StringName" setter="set_name" getter="get_name" default="&amp;&quot;&quot;">
- The name of this pose. Pose names are often driven by an action map setup by the user. Godot does suggest a number of pose names that it expects [XRInterface]s to implement:
- - [code]root[/code] defines a root location, often used for tracked objects that do not have further nodes.
- - [code]aim[/code] defines the tip of a controller with the orientation pointing outwards, for example: add your raycasts to this.
- - [code]grip[/code] defines the location where the user grips the controller
- - [code]skeleton[/code] defines the root location a hand mesh should be placed when using hand tracking and the animated skeleton supplied by the XR runtime.
+ The name of this pose. Usually, this name is derived from an action map set up by the user. Godot also suggests some pose names that [XRInterface] objects are expected to implement:
+ - [code]root[/code] is the root location, often used for tracked objects that do not have further nodes.
+ - [code]aim[/code] is the tip of a controller with its orientation pointing outwards, often used for raycasts.
+ - [code]grip[/code] is the location where the user grips the controller.
+ - [code]skeleton[/code] is the root location for a hand mesh, when using hand tracking and an animated skeleton is supplied by the XR runtime.
</member>
<member name="tracking_confidence" type="int" setter="set_tracking_confidence" getter="get_tracking_confidence" enum="XRPose.TrackingConfidence" default="0">
The tracking confidence for this pose, provides insight on how accurate the spatial positioning of this record is.