Skip to content

Commit 9bbd803

Browse files
authored
Merge pull request #828 from Spartan322/4.3-cherry-picks
[4.3] Cherry-picks for the 4.3 branch - 1st batch
2 parents 4322d36 + f908f19 commit 9bbd803

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+696
-116
lines changed

core/math/basis.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ struct [[nodiscard]] Basis {
4343
Vector3(0, 0, 1)
4444
};
4545

46-
_FORCE_INLINE_ const Vector3 &operator[](int p_axis) const {
47-
return rows[p_axis];
46+
_FORCE_INLINE_ const Vector3 &operator[](int p_row) const {
47+
return rows[p_row];
4848
}
49-
_FORCE_INLINE_ Vector3 &operator[](int p_axis) {
50-
return rows[p_axis];
49+
_FORCE_INLINE_ Vector3 &operator[](int p_row) {
50+
return rows[p_row];
5151
}
5252

5353
void invert();

doc/classes/BackBufferCopy.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
[b]Note:[/b] Since this node inherits from [Node2D] (and not [Control]), anchors and margins won't apply to child [Control]-derived nodes. This can be problematic when resizing the window. To avoid this, add [Control]-derived nodes as [i]siblings[/i] to the [BackBufferCopy] node instead of adding them as children.
99
</description>
1010
<tutorials>
11+
<link title="Screen-reading shaders">$DOCS_URL/tutorials/shaders/screen-reading_shaders.html</link>
1112
</tutorials>
1213
<members>
1314
<member name="copy_mode" type="int" setter="set_copy_mode" getter="get_copy_mode" enum="BackBufferCopy.CopyMode" default="1">

doc/classes/EditorDebuggerPlugin.xml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,20 @@
1515

1616
class ExampleEditorDebugger extends EditorDebuggerPlugin:
1717

18-
func _has_capture(prefix):
19-
# Return true if you wish to handle message with this prefix.
20-
return prefix == "my_plugin"
18+
func _has_capture(capture):
19+
# Return true if you wish to handle messages with the prefix "my_plugin:".
20+
return capture == "my_plugin"
2121

2222
func _capture(message, data, session_id):
2323
if message == "my_plugin:ping":
2424
get_session(session_id).send_message("my_plugin:echo", data)
25+
return true
26+
return false
2527

2628
func _setup_session(session_id):
2729
# Add a new tab in the debugger session UI containing a label.
2830
var label = Label.new()
29-
label.name = "Example plugin"
31+
label.name = "Example plugin" # Will be used as the tab title.
3032
label.text = "Example plugin"
3133
var session = get_session(session_id)
3234
# Listens to the session started and stopped signals.
@@ -43,6 +45,24 @@
4345
remove_debugger_plugin(debugger)
4446
[/gdscript]
4547
[/codeblocks]
48+
To connect on the running game side, use the [EngineDebugger] singleton:
49+
[codeblocks]
50+
[gdscript]
51+
extends Node
52+
53+
func _ready():
54+
EngineDebugger.register_message_capture("my_plugin", _capture)
55+
EngineDebugger.send_message("my_plugin:ping", ["test"])
56+
57+
func _capture(message, data):
58+
# Note that the "my_plugin:" prefix is not used here.
59+
if message == "echo":
60+
prints("Echo received:", data)
61+
return true
62+
return false
63+
[/gdscript]
64+
[/codeblocks]
65+
[b]Note:[/b] While the game is running, [method @GlobalScope.print] and similar functions [i]called in the editor[/i] do not print anything, the Output Log prints only game messages.
4666
</description>
4767
<tutorials>
4868
</tutorials>
@@ -68,7 +88,7 @@
6888
<param index="1" name="data" type="Array" />
6989
<param index="2" name="session_id" type="int" />
7090
<description>
71-
Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the message (which you can retrieve via [method get_session]).
91+
Override this method to process incoming messages. The [param session_id] is the ID of the [EditorDebuggerSession] that received the [param message]. Use [method get_session] to retrieve the session. This method should return [code]true[/code] if the message is recognized.
7292
</description>
7393
</method>
7494
<method name="_goto_script_line" qualifiers="virtual">
@@ -90,7 +110,7 @@
90110
<return type="void" />
91111
<param index="0" name="session_id" type="int" />
92112
<description>
93-
Override this method to be notified whenever a new [EditorDebuggerSession] is created (the session may be inactive during this stage).
113+
Override this method to be notified whenever a new [EditorDebuggerSession] is created. Note that the session may be inactive during this stage.
94114
</description>
95115
</method>
96116
<method name="get_session">

doc/classes/EditorDebuggerSession.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<return type="void" />
1515
<param index="0" name="control" type="Control" />
1616
<description>
17-
Adds the given [param control] to the debug session UI in the debugger bottom panel.
17+
Adds the given [param control] to the debug session UI in the debugger bottom panel. The [param control]'s node name will be used as the tab title.
1818
</description>
1919
</method>
2020
<method name="is_active">

doc/classes/EditorSettings.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,17 @@
956956
If [code]true[/code], on Linux/BSD, the editor will check for Wayland first instead of X11 (if available).
957957
</member>
958958
<member name="run/window_placement/android_window" type="int" setter="" getter="">
959-
The Android window to display the project on when starting the project from the editor.
959+
Specifies how the Play window is launched relative to the Android editor.
960+
- [b]Auto (based on screen size)[/b] (default) will automatically choose how to launch the Play window based on the device and screen metrics. Defaults to [b]Same as Editor[/b] on phones and [b]Side-by-side with Editor[/b] on tablets.
961+
- [b]Same as Editor[/b] will launch the Play window in the same window as the Editor.
962+
- [b]Side-by-side with Editor[/b] will launch the Play window side-by-side with the Editor window.
963+
[b]Note:[/b] Only available in the Android editor.
964+
</member>
965+
<member name="run/window_placement/play_window_pip_mode" type="int" setter="" getter="">
966+
Specifies the picture-in-picture (PiP) mode for the Play window.
967+
- [b]Disabled:[/b] PiP is disabled for the Play window.
968+
- [b]Enabled:[/b] If the device supports it, PiP is always enabled for the Play window. The Play window will contain a button to enter PiP mode.
969+
- [b]Enabled when Play window is same as Editor[/b] (default for Android editor): If the device supports it, PiP is enabled when the Play window is the same as the Editor. The Play window will contain a button to enter PiP mode.
960970
[b]Note:[/b] Only available in the Android editor.
961971
</member>
962972
<member name="run/window_placement/rect" type="int" setter="" getter="">

doc/classes/EngineDebugger.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113
<param index="1" name="callable" type="Callable" />
114114
<description>
115115
Registers a message capture with given [param name]. If [param name] is "my_message" then messages starting with "my_message:" will be called with the given callable.
116-
Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code].
116+
The callable must accept a message string and a data array as argument. The callable should return [code]true[/code] if the message is recognized.
117+
[b]Note:[/b] The callable will receive the message with the prefix stripped, unlike [method EditorDebuggerPlugin._capture]. See the [EditorDebuggerPlugin] description for an example.
117118
</description>
118119
</method>
119120
<method name="register_profiler">

doc/classes/FileDialog.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
</member>
154154
<member name="title" type="String" setter="set_title" getter="get_title" overrides="Window" default="&quot;Save a File&quot;" />
155155
<member name="use_native_dialog" type="bool" setter="set_use_native_dialog" getter="get_use_native_dialog" default="false">
156-
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.
156+
If [code]true[/code], and if supported by the current [DisplayServer], OS native dialog will be used instead of custom one.
157157
[b]Note:[/b] On Linux and macOS, sandboxed apps always use native dialogs to access the host file system.
158158
[b]Note:[/b] On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use [method OS.get_granted_permissions] to get a list of saved bookmarks.
159159
[b]Note:[/b] Native dialogs are isolated from the base process, file dialog properties can't be modified once the dialog is shown.

doc/classes/HTTPRequest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@
275275
Request successful.
276276
</constant>
277277
<constant name="RESULT_CHUNKED_BODY_SIZE_MISMATCH" value="1" enum="Result">
278+
Request failed due to a mismatch between the expected and actual chunked body size during transfer. Possible causes include network errors, server misconfiguration, or issues with chunked encoding.
278279
</constant>
279280
<constant name="RESULT_CANT_CONNECT" value="2" enum="Result">
280281
Request failed while connecting.
@@ -295,6 +296,7 @@
295296
Request exceeded its maximum size limit, see [member body_size_limit].
296297
</constant>
297298
<constant name="RESULT_BODY_DECOMPRESS_FAILED" value="8" enum="Result">
299+
Request failed due to an error while decompressing the response body. Possible causes include unsupported or incorrect compression format, corrupted data, or incomplete transfer.
298300
</constant>
299301
<constant name="RESULT_REQUEST_FAILED" value="9" enum="Result">
300302
Request failed (currently unused).

doc/classes/Node.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
<description>
7474
Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [param delta] variable should be constant. [param delta] is in seconds.
7575
It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process].
76+
Processing happens in order of [member process_physics_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).
7677
Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification].
7778
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
7879
</description>
@@ -83,6 +84,7 @@
8384
<description>
8485
Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [param delta] time since the previous frame is not constant. [param delta] is in seconds.
8586
It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process].
87+
Processing happens in order of [member process_priority], lower priority values are called first. Nodes with the same priority are processed in tree order, or top to bottom as seen in the editor (also known as pre-order traversal).
8688
Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification].
8789
[b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not an orphan).
8890
</description>
@@ -1026,10 +1028,10 @@
10261028
The node's processing behavior (see [enum ProcessMode]). To check if the node can process in its current mode, use [method can_process].
10271029
</member>
10281030
<member name="process_physics_priority" type="int" setter="set_physics_process_priority" getter="get_physics_process_priority" default="0">
1029-
Similar to [member process_priority] but for [constant NOTIFICATION_PHYSICS_PROCESS], [method _physics_process] or the internal version.
1031+
Similar to [member process_priority] but for [constant NOTIFICATION_PHYSICS_PROCESS], [method _physics_process], or [constant NOTIFICATION_INTERNAL_PHYSICS_PROCESS].
10301032
</member>
10311033
<member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0">
1032-
The node's execution order of the process callbacks ([method _process], [method _physics_process], and internal processing). Nodes whose priority value is [i]lower[/i] call their process callbacks first, regardless of tree order.
1034+
The node's execution order of the process callbacks ([method _process], [constant NOTIFICATION_PROCESS], and [constant NOTIFICATION_INTERNAL_PROCESS]). Nodes whose priority value is [i]lower[/i] call their process callbacks first, regardless of tree order.
10331035
</member>
10341036
<member name="process_thread_group" type="int" setter="set_process_thread_group" getter="get_process_thread_group" enum="Node.ProcessThreadGroup" default="0">
10351037
Set the process thread group for this node (basically, whether it receives [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS], [method _process] or [method _physics_process] (and the internal versions) on the main thread or in a sub-thread.

doc/classes/ProjectSettings.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[b]Overriding:[/b] Any project setting can be overridden by creating a file named [code]override.cfg[/code] in the project's root directory. This can also be used in exported projects by placing this file in the same directory as the project binary. Overriding will still take the base project settings' [url=$DOCS_URL/tutorials/export/feature_tags.html]feature tags[/url] in account. Therefore, make sure to [i]also[/i] override the setting with the desired feature tags if you want them to override base project settings on all platforms and configurations.
1111
</description>
1212
<tutorials>
13+
<link title="Project Settings">$DOCS_URL/tutorials/editor/project_settings.html</link>
1314
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/2747</link>
1415
<link title="3D Platformer Demo">https://godotengine.org/asset-library/asset/2748</link>
1516
<link title="Operating System Testing Demo">https://godotengine.org/asset-library/asset/2789</link>

0 commit comments

Comments
 (0)