Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from Godot #52

Merged
merged 57 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
48a54cb
Adjusted listings of parameters displayed in inspector to be consiste…
LeonStansfield Aug 4, 2024
4aead96
Revent DRAW_ORDER_INDEX to DRAW_ORDER_LIFETIME default particle param…
LeonStansfield Aug 4, 2024
8ca7f0e
Prevent crash after removing GraphEdit's connection layer and add add…
Geometror Aug 30, 2024
27b7b43
Fix Inspector may scrolls away when editing a property that adds or r…
Maran23 Sep 3, 2024
5848d72
Prevent selecting the hovered node if the mouse is not inside the ins…
AeioMuch Aug 18, 2024
8a485ff
Fix BaseMaterial3D refracting objects located in front of the material
Calinou Jun 22, 2024
6516ca6
Parse fragment from URL
timothyqiu May 22, 2024
71ac6b7
Optimize StyleBoxFlat.draw()
MewPurPur Jul 11, 2024
38579a1
Unify editor version buttons
timothyqiu Sep 27, 2024
8a41b1d
GDExtension: Use loader to check if the library exists.
kisg Jul 14, 2024
529897c
Update bcdec to latest version
BlueCube3310 Sep 29, 2024
ed13a84
Add markers to animation
chocola-mint Aug 31, 2024
d720eb8
Clamp UV-coordinates to centers of outermost texels when configured t…
patowen Sep 28, 2024
146ba41
Move Vulkan includes to a central godot_vulkan.h header
kisg Sep 26, 2024
07cae26
Remove the restriction on supported types for Godot Android plugins
m4gr3d Sep 26, 2024
5e0805a
Provide access to the Android runtime to GDScript
m4gr3d Sep 26, 2024
4587d14
Add logic to automatically pick up jar/aar library dependencies in th…
m4gr3d Sep 26, 2024
7a90989
Expose `get_export_option_visibility` to editor plugins
m4gr3d Sep 13, 2024
e376c4f
Add unit tests for `SceneMultiplayer`
pafuent Sep 28, 2024
03c3c5f
Set position to zero when saving a positioned branch as scene
HolonProduction Aug 12, 2023
a6997d3
Docs: remove duplicate words
mhilbrunner Sep 30, 2024
c4b7d6f
Fix ICU support data loading
twrightsman Sep 30, 2024
3c365a7
Add auto translate mode for cells in Tree
timothyqiu Sep 23, 2024
1a2e0b2
Add Ukrainian translation for Linux .desktop file
Oct 1, 2024
645abdb
Add expression evaluater to debugger (REPL)
KoBeWi Sep 30, 2024
136e4d5
Add Unit Test cases for `Sky`
matthewestopinal Sep 26, 2024
d222daa
[TextServer] Silently skip invalid system fallback fonts.
bruvzg Oct 1, 2024
e0957c2
Consolidate remembering window settings into single config
bits-by-brandon Sep 22, 2024
0a41a71
Add unit tests for PacketPeer
pafuent Aug 22, 2024
ff10dee
Add unit tests for StreamPeer and StreamPeerBuffer
pafuent Aug 17, 2024
0628af4
Merge pull request #80561 from HolonProduction/i-have-made-my-positio…
akien-mga Oct 1, 2024
8c16e67
Merge pull request #91765 from chocola-mint/feat-markers
akien-mga Oct 1, 2024
cf1d910
Merge pull request #92237 from timothyqiu/url-fragment
akien-mga Oct 1, 2024
41ffc69
Merge pull request #93449 from Calinou/basematerial3d-refraction-use-…
akien-mga Oct 1, 2024
eaac033
Merge pull request #94240 from MewPurPur/optimize-styleboxflat
akien-mga Oct 1, 2024
53f30bf
Merge pull request #95132 from LeonStansfield/gpu_particles_ui_consis…
akien-mga Oct 1, 2024
d71d954
Merge pull request #95784 from pafuent/adding_stream_peer_buffer_tests
akien-mga Oct 1, 2024
a7d0464
Merge pull request #95931 from pafuent/adding_packet_peer_tests
akien-mga Oct 1, 2024
0fd62f7
Merge pull request #96124 from AeioMuch/check_mouse_pos_inside_inspector
akien-mga Oct 1, 2024
60708cc
Merge pull request #96542 from Maran23/inspector-scrolls-away
akien-mga Oct 1, 2024
70ac89e
Merge pull request #96980 from m4gr3d/enable_legacy_build_customizati…
akien-mga Oct 1, 2024
7d4e06e
Merge pull request #97333 from bits-by-brandon/consolidate-window-rem…
akien-mga Oct 1, 2024
97fa718
Merge pull request #97353 from timothyqiu/tree-at
akien-mga Oct 1, 2024
06a7cf7
Merge pull request #97500 from m4gr3d/update_godot_plugin_to_use_java…
akien-mga Oct 1, 2024
d66d056
Merge pull request #97510 from kisg/vulkan_build_fix
akien-mga Oct 1, 2024
9c71640
Merge pull request #97512 from matthewestopinal/mestopinal-sky-tests
akien-mga Oct 1, 2024
8aabdc4
Merge pull request #97527 from timothyqiu/version-button
akien-mga Oct 1, 2024
3b17e34
Merge pull request #97532 from kisg/use_loader_library_check
akien-mga Oct 1, 2024
6c13305
Merge pull request #97602 from patowen/fix-region-filter-clip-enabled
akien-mga Oct 1, 2024
49700c3
Merge pull request #97607 from pafuent/firsts_multiplayer_unit_tests
akien-mga Oct 1, 2024
dec83d5
Merge pull request #97611 from BlueCube3310/bcdec-update
akien-mga Oct 1, 2024
cbff250
Merge pull request #97638 from mhilbrunner/fix-duplicate-words
akien-mga Oct 1, 2024
79804a8
Merge pull request #97647 from KoBeWi/yearly_REPL_pull_request
akien-mga Oct 1, 2024
c73a18a
Merge pull request #97648 from twrightsman/fix-icu-load
akien-mga Oct 1, 2024
d21a8a8
Merge pull request #97686 from Vovkiv/master
akien-mga Oct 1, 2024
24b4607
Merge pull request #97693 from bruvzg/ts_fb_silent
akien-mga Oct 1, 2024
f4af820
Merge pull request #96309 from Geometror/fix-ge-cs-crash
akien-mga Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions core/debugger/remote_debugger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
#include "core/debugger/script_debugger.h"
#include "core/input/input.h"
#include "core/io/resource_loader.h"
#include "core/math/expression.h"
#include "core/object/script_language.h"
#include "core/os/os.h"
#include "servers/display_server.h"
Expand Down Expand Up @@ -529,6 +530,41 @@ void RemoteDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
} else if (command == "set_skip_breakpoints") {
ERR_FAIL_COND(data.is_empty());
script_debugger->set_skip_breakpoints(data[0]);
} else if (command == "evaluate") {
String expression_str = data[0];
int frame = data[1];

ScriptInstance *breaked_instance = script_debugger->get_break_language()->debug_get_stack_level_instance(frame);
if (!breaked_instance) {
break;
}

List<String> locals;
List<Variant> local_vals;

script_debugger->get_break_language()->debug_get_stack_level_locals(frame, &locals, &local_vals);
ERR_FAIL_COND(locals.size() != local_vals.size());

PackedStringArray locals_vector;
for (const String &S : locals) {
locals_vector.append(S);
}

Array local_vals_array;
for (const Variant &V : local_vals) {
local_vals_array.append(V);
}

Expression expression;
expression.parse(expression_str, locals_vector);
const Variant return_val = expression.execute(local_vals_array, breaked_instance->get_owner());

DebuggerMarshalls::ScriptStackVariable stvar;
stvar.name = expression_str;
stvar.value = return_val;
stvar.type = 3;

send_message("evaluation_return", stvar.serialize());
} else {
bool captured = false;
ERR_CONTINUE(_try_capture(command, data, captured) != OK);
Expand Down
4 changes: 4 additions & 0 deletions core/extension/gdextension_library_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ bool GDExtensionLibraryLoader::has_library_changed() const {
return false;
}

bool GDExtensionLibraryLoader::library_exists() const {
return FileAccess::exists(resource_path);
}

Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
resource_path = p_path;

Expand Down
1 change: 1 addition & 0 deletions core/extension/gdextension_library_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class GDExtensionLibraryLoader : public GDExtensionLoader {
virtual void close_library() override;
virtual bool is_library_open() const override;
virtual bool has_library_changed() const override;
virtual bool library_exists() const override;

Error parse_gdextension_file(const String &p_path);
};
Expand Down
1 change: 1 addition & 0 deletions core/extension/gdextension_loader.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class GDExtensionLoader : public RefCounted {
virtual void close_library() = 0;
virtual bool is_library_open() const = 0;
virtual bool has_library_changed() const = 0;
virtual bool library_exists() const = 0;
};

#endif // GDEXTENSION_LOADER_H
3 changes: 2 additions & 1 deletion core/extension/gdextension_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ bool GDExtensionManager::ensure_extensions_loaded(const HashSet<String> &p_exten
for (const String &loaded_extension : loaded_extensions) {
if (!p_extensions.has(loaded_extension)) {
// The extension may not have a .gdextension file.
if (!FileAccess::exists(loaded_extension)) {
const Ref<GDExtension> extension = GDExtensionManager::get_singleton()->get_extension(loaded_extension);
if (!extension->get_loader()->library_exists()) {
extensions_removed.push_back(loaded_extension);
}
}
Expand Down
25 changes: 21 additions & 4 deletions core/string/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,35 @@ void CharString::copy_from(const char *p_cstr) {
/* String */
/*************************************************************************/

Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const {
// Splits the URL into scheme, host, port, path. Strip credentials when present.
Error String::parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path, String &r_fragment) const {
// Splits the URL into scheme, host, port, path, fragment. Strip credentials when present.
String base = *this;
r_scheme = "";
r_host = "";
r_port = 0;
r_path = "";
r_fragment = "";

int pos = base.find("://");
// Scheme
if (pos != -1) {
r_scheme = base.substr(0, pos + 3).to_lower();
base = base.substr(pos + 3, base.length() - pos - 3);
bool is_scheme_valid = true;
for (int i = 0; i < pos; i++) {
if (!is_ascii_alphanumeric_char(base[i]) && base[i] != '+' && base[i] != '-' && base[i] != '.') {
is_scheme_valid = false;
break;
}
}
if (is_scheme_valid) {
r_scheme = base.substr(0, pos + 3).to_lower();
base = base.substr(pos + 3, base.length() - pos - 3);
}
}
pos = base.find("#");
// Fragment
if (pos != -1) {
r_fragment = base.substr(pos + 1);
base = base.substr(0, pos);
}
pos = base.find("/");
// Path
Expand Down
2 changes: 1 addition & 1 deletion core/string/ustring.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ class String {
String c_escape_multiline() const;
String c_unescape() const;
String json_escape() const;
Error parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path) const;
Error parse_url(String &r_scheme, String &r_host, int &r_port, String &r_path, String &r_fragment) const;

String property_name_encode() const;

Expand Down
2 changes: 1 addition & 1 deletion doc/classes/@GlobalScope.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@
<return type="int" />
<param index="0" name="x" type="int" />
<description>
Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if if [param x] is zero.
Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if [param x] is zero.
[codeblock]
signi(-6) # Returns -1
signi(0) # Returns 0
Expand Down
71 changes: 71 additions & 0 deletions doc/classes/Animation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@
<link title="Animation documentation index">$DOCS_URL/tutorials/animation/index.html</link>
</tutorials>
<methods>
<method name="add_marker">
<return type="void" />
<param index="0" name="name" type="StringName" />
<param index="1" name="time" type="float" />
<description>
Adds a marker to this Animation.
</description>
</method>
<method name="add_track">
<return type="int" />
<param index="0" name="type" type="int" enum="Animation.TrackType" />
Expand Down Expand Up @@ -271,12 +279,60 @@
Returns the index of the specified track. If the track is not found, return -1.
</description>
</method>
<method name="get_marker_at_time" qualifiers="const">
<return type="StringName" />
<param index="0" name="time" type="float" />
<description>
Returns the name of the marker located at the given time.
</description>
</method>
<method name="get_marker_color" qualifiers="const">
<return type="Color" />
<param index="0" name="name" type="StringName" />
<description>
Returns the given marker's color.
</description>
</method>
<method name="get_marker_names" qualifiers="const">
<return type="PackedStringArray" />
<description>
Returns every marker in this Animation, sorted ascending by time.
</description>
</method>
<method name="get_marker_time" qualifiers="const">
<return type="float" />
<param index="0" name="name" type="StringName" />
<description>
Returns the given marker's time.
</description>
</method>
<method name="get_next_marker" qualifiers="const">
<return type="StringName" />
<param index="0" name="time" type="float" />
<description>
Returns the closest marker that comes after the given time. If no such marker exists, an empty string is returned.
</description>
</method>
<method name="get_prev_marker" qualifiers="const">
<return type="StringName" />
<param index="0" name="time" type="float" />
<description>
Returns the closest marker that comes before the given time. If no such marker exists, an empty string is returned.
</description>
</method>
<method name="get_track_count" qualifiers="const">
<return type="int" />
<description>
Returns the amount of tracks in the animation.
</description>
</method>
<method name="has_marker" qualifiers="const">
<return type="bool" />
<param index="0" name="name" type="StringName" />
<description>
Returns [code]true[/code] if this Animation contains a marker with the given name.
</description>
</method>
<method name="method_track_get_name" qualifiers="const">
<return type="StringName" />
<param index="0" name="track_idx" type="int" />
Expand Down Expand Up @@ -320,6 +376,13 @@
Returns the interpolated position value at the given time (in seconds). The [param track_idx] must be the index of a 3D position track.
</description>
</method>
<method name="remove_marker">
<return type="void" />
<param index="0" name="name" type="StringName" />
<description>
Removes the marker with the given name from this Animation.
</description>
</method>
<method name="remove_track">
<return type="void" />
<param index="0" name="track_idx" type="int" />
Expand Down Expand Up @@ -363,6 +426,14 @@
Returns the interpolated scale value at the given time (in seconds). The [param track_idx] must be the index of a 3D scale track.
</description>
</method>
<method name="set_marker_color">
<return type="void" />
<param index="0" name="name" type="StringName" />
<param index="1" name="color" type="Color" />
<description>
Sets the given marker's color.
</description>
</method>
<method name="track_find_key" qualifiers="const">
<return type="int" />
<param index="0" name="track_idx" type="int" />
Expand Down
89 changes: 89 additions & 0 deletions doc/classes/AnimationPlayer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@
Returns the node which node path references will travel from.
</description>
</method>
<method name="get_section_end_time" qualifiers="const">
<return type="float" />
<description>
Returns the end time of the section currently being played.
</description>
</method>
<method name="get_section_start_time" qualifiers="const">
<return type="float" />
<description>
Returns the start time of the section currently being played.
</description>
</method>
<method name="has_section" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if an animation is currently playing with section.
</description>
</method>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
Expand Down Expand Up @@ -110,6 +128,54 @@
This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information.
</description>
</method>
<method name="play_section">
<return type="void" />
<param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="start_time" type="float" default="-1" />
<param index="2" name="end_time" type="float" default="-1" />
<param index="3" name="custom_blend" type="float" default="-1" />
<param index="4" name="custom_speed" type="float" default="1.0" />
<param index="5" name="from_end" type="bool" default="false" />
<description>
Plays the animation with key [param name] and the section starting from [param start_time] and ending on [param end_time]. See also [method play].
Setting [param start_time] to a value outside the range of the animation means the start of the animation will be used instead, and setting [param end_time] to a value outside the range of the animation means the end of the animation will be used instead. [param start_time] cannot be equal to [param end_time].
</description>
</method>
<method name="play_section_backwards">
<return type="void" />
<param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="start_time" type="float" default="-1" />
<param index="2" name="end_time" type="float" default="-1" />
<param index="3" name="custom_blend" type="float" default="-1" />
<description>
Plays the animation with key [param name] and the section starting from [param start_time] and ending on [param end_time] in reverse.
This method is a shorthand for [method play_section] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], see its description for more information.
</description>
</method>
<method name="play_section_with_markers">
<return type="void" />
<param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="start_marker" type="StringName" default="&amp;&quot;&quot;" />
<param index="2" name="end_marker" type="StringName" default="&amp;&quot;&quot;" />
<param index="3" name="custom_blend" type="float" default="-1" />
<param index="4" name="custom_speed" type="float" default="1.0" />
<param index="5" name="from_end" type="bool" default="false" />
<description>
Plays the animation with key [param name] and the section starting from [param start_marker] and ending on [param end_marker].
If the start marker is empty, the section starts from the beginning of the animation. If the end marker is empty, the section ends on the end of the animation. See also [method play].
</description>
</method>
<method name="play_section_with_markers_backwards">
<return type="void" />
<param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="start_marker" type="StringName" default="&amp;&quot;&quot;" />
<param index="2" name="end_marker" type="StringName" default="&amp;&quot;&quot;" />
<param index="3" name="custom_blend" type="float" default="-1" />
<description>
Plays the animation with key [param name] and the section starting from [param start_marker] and ending on [param end_marker] in reverse.
This method is a shorthand for [method play_section_with_markers] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], see its description for more information.
</description>
</method>
<method name="play_with_capture">
<return type="void" />
<param index="0" name="name" type="StringName" default="&amp;&quot;&quot;" />
Expand Down Expand Up @@ -139,6 +205,12 @@
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
</description>
</method>
<method name="reset_section">
<return type="void" />
<description>
Resets the current section if section is set.
</description>
</method>
<method name="seek">
<return type="void" />
<param index="0" name="seconds" type="float" />
Expand Down Expand Up @@ -180,6 +252,23 @@
Sets the node which node path references will travel from.
</description>
</method>
<method name="set_section">
<return type="void" />
<param index="0" name="start_time" type="float" default="-1" />
<param index="1" name="end_time" type="float" default="-1" />
<description>
Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also [method play_section].
</description>
</method>
<method name="set_section_with_markers">
<return type="void" />
<param index="0" name="start_marker" type="StringName" default="&amp;&quot;&quot;" />
<param index="1" name="end_marker" type="StringName" default="&amp;&quot;&quot;" />
<description>
Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also [method play_section_with_markers].
If the argument is empty, the section uses the beginning or end of the animation. If both are empty, it means that the section is not set.
</description>
</method>
<method name="stop">
<return type="void" />
<param index="0" name="keep_state" type="bool" default="false" />
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/CameraAttributesPhysical.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
The maximum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing below a certain brightness, resulting in a cut off point where the scene will remain bright.
</member>
<member name="auto_exposure_min_exposure_value" type="float" setter="set_auto_exposure_min_exposure_value" getter="get_auto_exposure_min_exposure_value" default="-8.0">
The minimum luminance luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
The minimum luminance (in EV100) used when calculating auto exposure. When calculating scene average luminance, color values will be clamped to at least this value. This limits the auto-exposure from exposing above a certain brightness, resulting in a cut off point where the scene will remain dark.
</member>
<member name="exposure_aperture" type="float" setter="set_aperture" getter="get_aperture" default="16.0">
Size of the aperture of the camera, measured in f-stops. An f-stop is a unitless ratio between the focal length of the camera and the diameter of the aperture. A high aperture setting will result in a smaller aperture which leads to a dimmer image and sharper focus. A low aperture results in a wide aperture which lets in more light resulting in a brighter, less-focused image. Default is appropriate for outdoors at daytime (i.e. for use with a default [DirectionalLight3D]), for indoor lighting, a value between 2 and 4 is more appropriate.
Expand Down
9 changes: 9 additions & 0 deletions doc/classes/EditorExportPlugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@
Return a [PackedStringArray] of additional features this preset, for the given [param platform], should have.
</description>
</method>
<method name="_get_export_option_visibility" qualifiers="virtual const">
<return type="bool" />
<param index="0" name="platform" type="EditorExportPlatform" />
<param index="1" name="option" type="String" />
<description>
[b]Optional.[/b]
Validates [param option] and returns the visibility for the specified [param platform]. The default implementation returns [code]true[/code] for all options.
</description>
</method>
<method name="_get_export_option_warning" qualifiers="virtual const">
<return type="String" />
<param index="0" name="platform" type="EditorExportPlatform" />
Expand Down
1 change: 1 addition & 0 deletions doc/classes/EditorInspector.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
</method>
</methods>
<members>
<member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" overrides="ScrollContainer" default="true" />
<member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" />
</members>
<signals>
Expand Down
Loading
Loading