Skip to content

Commit b6fb965

Browse files
authored
Merge branch 'master' into dragging-docks
2 parents b86e0dc + 5dd7696 commit b6fb965

File tree

759 files changed

+22163
-10927
lines changed

Some content is hidden

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

759 files changed

+22163
-10927
lines changed

.github/workflows/linux_builds.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
SCONS_FLAGS: >-
88
dev_mode=yes
99
module_text_server_fb_enabled=yes
10-
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
10+
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.16.0/"
1111
GODOT_CPP_BRANCH: 4.4
1212
DOTNET_NOLOGO: true
1313
DOTNET_CLI_TELEMETRY_OPTOUT: true
@@ -162,12 +162,12 @@ jobs:
162162
uses: dsaltares/fetch-gh-release-asset@1.1.2
163163
with:
164164
repo: AccessKit/accesskit-c
165-
version: tags/0.15.1
166-
file: accesskit-c-0.15.1.zip
167-
target: accesskit-c-0.15.1/accesskit_c.zip
165+
version: tags/0.16.0
166+
file: accesskit-c-0.16.0.zip
167+
target: accesskit-c-0.16.0/accesskit_c.zip
168168

169169
- name: Extract pre-built AccessKit
170-
run: unzip -o accesskit-c-0.15.1/accesskit_c.zip
170+
run: unzip -o accesskit-c-0.16.0/accesskit_c.zip
171171

172172
- name: Install mold linker
173173
if: matrix.proj-test

.github/workflows/macos_builds.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ env:
77
SCONS_FLAGS: >-
88
dev_mode=yes
99
module_text_server_fb_enabled=yes
10-
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
10+
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.16.0/"
1111
1212
jobs:
1313
build-macos:
@@ -48,12 +48,12 @@ jobs:
4848
uses: dsaltares/fetch-gh-release-asset@1.1.2
4949
with:
5050
repo: AccessKit/accesskit-c
51-
version: tags/0.15.1
52-
file: accesskit-c-0.15.1.zip
53-
target: accesskit-c-0.15.1/accesskit_c.zip
51+
version: tags/0.16.0
52+
file: accesskit-c-0.16.0.zip
53+
target: accesskit-c-0.16.0/accesskit_c.zip
5454

5555
- name: Extract pre-built AccessKit
56-
run: unzip -o accesskit-c-0.15.1/accesskit_c.zip
56+
run: unzip -o accesskit-c-0.16.0/accesskit_c.zip
5757

5858
- name: Setup Vulkan SDK
5959
id: vulkan-sdk

.github/workflows/windows_builds.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
debug_symbols=no
1111
d3d12=yes
1212
"angle_libs=${{ github.workspace }}/"
13-
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.15.1/"
13+
"accesskit_sdk_path=${{ github.workspace }}/accesskit-c-0.16.0/"
1414
SCONS_CACHE_MSVC_CONFIG: true
1515
PYTHONIOENCODING: utf8
1616

@@ -90,12 +90,12 @@ jobs:
9090
uses: dsaltares/fetch-gh-release-asset@1.1.2
9191
with:
9292
repo: AccessKit/accesskit-c
93-
version: tags/0.15.1
94-
file: accesskit-c-0.15.1.zip
95-
target: accesskit-c-0.15.1/accesskit_c.zip
93+
version: tags/0.16.0
94+
file: accesskit-c-0.16.0.zip
95+
target: accesskit-c-0.16.0/accesskit_c.zip
9696

9797
- name: Extract pre-built AccessKit
98-
run: unzip -o accesskit-c-0.15.1/accesskit_c.zip
98+
run: unzip -o accesskit-c-0.16.0/accesskit_c.zip
9999

100100
- name: Compilation
101101
uses: ./.github/actions/godot-build

COPYRIGHT.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ License: BSD-3-clause
391391

392392
Files: thirdparty/manifold/*
393393
Comment: Manifold
394-
Copyright: 2020-2024, The Manifold Authors
394+
Copyright: 2020-2025, The Manifold Authors
395395
License: Apache-2.0
396396

397397
Files: thirdparty/mbedtls/*
@@ -522,7 +522,7 @@ License: Expat
522522

523523
Files: thirdparty/openxr/*
524524
Comment: OpenXR Loader
525-
Copyright: 2020-2023, The Khronos Group Inc.
525+
Copyright: 2020-2025, The Khronos Group Inc.
526526
License: Apache-2.0
527527

528528
Files: thirdparty/pcre2/*

core/SCsub

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,7 @@ thirdparty_minizip_sources = ["ioapi.c", "unzip.c", "zip.c"]
111111
thirdparty_minizip_sources = [thirdparty_minizip_dir + file for file in thirdparty_minizip_sources]
112112
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_minizip_sources)
113113

114-
# Zstd library, can be unbundled in theory
115-
# though we currently use some private symbols
116-
# https://github.com/godotengine/godot/issues/17374
114+
# Zstd library, can be unbundled
117115
if env["builtin_zstd"]:
118116
thirdparty_zstd_dir = "#thirdparty/zstd/"
119117
thirdparty_zstd_sources = [
@@ -134,6 +132,7 @@ if env["builtin_zstd"]:
134132
"compress/zstd_lazy.c",
135133
"compress/zstd_ldm.c",
136134
"compress/zstd_opt.c",
135+
"compress/zstd_preSplit.c",
137136
"compress/zstdmt_compress.c",
138137
"compress/zstd_compress_literals.c",
139138
"compress/zstd_compress_sequences.c",
@@ -143,7 +142,11 @@ if env["builtin_zstd"]:
143142
"decompress/zstd_decompress_block.c",
144143
"decompress/zstd_decompress.c",
145144
]
146-
if env["platform"] in ["android", "ios", "linuxbsd", "macos"] and env["arch"] == "x86_64":
145+
if (
146+
env["platform"] in ["android", "ios", "linuxbsd", "macos", "windows"]
147+
and env["arch"] == "x86_64"
148+
and not env.msvc
149+
):
147150
# Match platforms with ZSTD_ASM_SUPPORTED in common/portability_macros.h
148151
thirdparty_zstd_sources.append("decompress/huf_decompress_amd64.S")
149152
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]

core/config/project_settings.cpp

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,18 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
482482
pi.name = base.name;
483483
pi.usage = base.flags;
484484
p_list->push_back(pi);
485+
#ifdef TOOLS_ENABLED
486+
} else if (base.name.begins_with(EDITOR_SETTING_OVERRIDE_PREFIX)) {
487+
PropertyInfo info(base.type, base.name, PROPERTY_HINT_NONE, "", base.flags);
488+
489+
const PropertyInfo *pi = editor_settings_info.getptr(base.name.trim_prefix(EDITOR_SETTING_OVERRIDE_PREFIX));
490+
if (pi) {
491+
info.usage = pi->usage;
492+
info.hint = pi->hint;
493+
info.hint_string = pi->hint_string;
494+
}
495+
p_list->push_back(info);
496+
#endif
485497
} else {
486498
p_list->push_back(PropertyInfo(base.type, base.name, PROPERTY_HINT_NONE, "", base.flags));
487499
}
@@ -1263,7 +1275,7 @@ bool ProjectSettings::is_project_loaded() const {
12631275
}
12641276

12651277
bool ProjectSettings::_property_can_revert(const StringName &p_name) const {
1266-
return props.has(p_name);
1278+
return props.has(p_name) && !String(p_name).begins_with(EDITOR_SETTING_OVERRIDE_PREFIX);
12671279
}
12681280

12691281
bool ProjectSettings::_property_get_revert(const StringName &p_name, Variant &r_property) const {
@@ -1449,6 +1461,18 @@ void ProjectSettings::get_argument_options(const StringName &p_function, int p_i
14491461
}
14501462
#endif
14511463

1464+
void ProjectSettings::set_editor_setting_override(const String &p_setting, const Variant &p_value) {
1465+
set_setting(EDITOR_SETTING_OVERRIDE_PREFIX + p_setting, p_value);
1466+
}
1467+
1468+
bool ProjectSettings::has_editor_setting_override(const String &p_setting) const {
1469+
return has_setting(EDITOR_SETTING_OVERRIDE_PREFIX + p_setting);
1470+
}
1471+
1472+
Variant ProjectSettings::get_editor_setting_override(const String &p_setting) const {
1473+
return get_setting(EDITOR_SETTING_OVERRIDE_PREFIX + p_setting);
1474+
}
1475+
14521476
void ProjectSettings::_bind_methods() {
14531477
ClassDB::bind_method(D_METHOD("has_setting", "name"), &ProjectSettings::has_setting);
14541478
ClassDB::bind_method(D_METHOD("set_setting", "name", "value"), &ProjectSettings::set_setting);

core/config/project_settings.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class ProjectSettings : public Object {
4949
public:
5050
typedef HashMap<String, Variant> CustomMap;
5151
static inline const String PROJECT_DATA_DIR_NAME_SUFFIX = "godot";
52+
static inline const String EDITOR_SETTING_OVERRIDE_PREFIX = "editor_overrides/";
5253

5354
// Properties that are not for built in values begin from this value, so builtin ones are displayed first.
5455
constexpr static const int32_t NO_BUILTIN_ORDER_BASE = 1 << 16;
@@ -153,6 +154,10 @@ class ProjectSettings : public Object {
153154
public:
154155
static const int CONFIG_VERSION = 5;
155156

157+
#ifdef TOOLS_ENABLED
158+
HashMap<String, PropertyInfo> editor_settings_info;
159+
#endif
160+
156161
void set_setting(const String &p_setting, const Variant &p_value);
157162
Variant get_setting(const String &p_setting, const Variant &p_default_value = Variant()) const;
158163
TypedArray<Dictionary> get_global_class_list();
@@ -229,6 +234,10 @@ class ProjectSettings : public Object {
229234
virtual void get_argument_options(const StringName &p_function, int p_idx, List<String> *r_options) const override;
230235
#endif
231236

237+
void set_editor_setting_override(const String &p_setting, const Variant &p_value);
238+
bool has_editor_setting_override(const String &p_setting) const;
239+
Variant get_editor_setting_override(const String &p_setting) const;
240+
232241
ProjectSettings();
233242
ProjectSettings(const String &p_path);
234243
~ProjectSettings();

core/core_bind.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,14 @@ int OS::create_instance(const Vector<String> &p_arguments) {
437437
return pid;
438438
}
439439

440+
Error OS::open_with_program(const String &p_program_path, const Vector<String> &p_paths) {
441+
List<String> paths;
442+
for (const String &path : p_paths) {
443+
paths.push_back(path);
444+
}
445+
return ::OS::get_singleton()->open_with_program(p_program_path, paths);
446+
}
447+
440448
int OS::create_process(const String &p_path, const Vector<String> &p_arguments, bool p_open_console) {
441449
List<String> args;
442450
for (const String &arg : p_arguments) {
@@ -755,6 +763,7 @@ void OS::_bind_methods() {
755763
ClassDB::bind_method(D_METHOD("execute_with_pipe", "path", "arguments", "blocking"), &OS::execute_with_pipe, DEFVAL(true));
756764
ClassDB::bind_method(D_METHOD("create_process", "path", "arguments", "open_console"), &OS::create_process, DEFVAL(false));
757765
ClassDB::bind_method(D_METHOD("create_instance", "arguments"), &OS::create_instance);
766+
ClassDB::bind_method(D_METHOD("open_with_program", "program_path", "paths"), &OS::open_with_program);
758767
ClassDB::bind_method(D_METHOD("kill", "pid"), &OS::kill);
759768
ClassDB::bind_method(D_METHOD("shell_open", "uri"), &OS::shell_open);
760769
ClassDB::bind_method(D_METHOD("shell_show_in_file_manager", "file_or_dir_path", "open_folder"), &OS::shell_show_in_file_manager, DEFVAL(true));

core/core_bind.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ class OS : public Object {
221221
Dictionary execute_with_pipe(const String &p_path, const Vector<String> &p_arguments, bool p_blocking = true);
222222
int create_process(const String &p_path, const Vector<String> &p_arguments, bool p_open_console = false);
223223
int create_instance(const Vector<String> &p_arguments);
224+
Error open_with_program(const String &p_program_path, const Vector<String> &p_paths);
224225
Error kill(int p_pid);
225226
Error shell_open(const String &p_uri);
226227
Error shell_show_in_file_manager(const String &p_path, bool p_open_folder = true);

core/doc_data.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ void DocData::method_doc_from_methodinfo(DocData::MethodDoc &p_method, const Met
127127
p_method.qualifiers = "virtual";
128128
}
129129

130+
if (p_methodinfo.flags & METHOD_FLAG_VIRTUAL_REQUIRED) {
131+
if (!p_method.qualifiers.is_empty()) {
132+
p_method.qualifiers += " ";
133+
}
134+
p_method.qualifiers += "required";
135+
}
136+
130137
if (p_methodinfo.flags & METHOD_FLAG_CONST) {
131138
if (!p_method.qualifiers.is_empty()) {
132139
p_method.qualifiers += " ";

core/error/error_macros.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,15 +92,7 @@ void _err_print_error(const char *p_function, const char *p_file, int p_line, co
9292
// Main error printing function.
9393
void _err_print_error(const char *p_function, const char *p_file, int p_line, const char *p_error, const char *p_message, bool p_editor_notify, ErrorHandlerType p_type) {
9494
if (OS::get_singleton()) {
95-
Vector<Ref<ScriptBacktrace>> script_backtraces;
96-
97-
// If script languages aren't initialized, we could be in the process of shutting down, in which case we don't want to allocate any objects, as we could be
98-
// logging ObjectDB leaks, where ObjectDB would be locked, thus causing a deadlock.
99-
if (ScriptServer::are_languages_initialized()) {
100-
script_backtraces = ScriptServer::capture_script_backtraces(false);
101-
}
102-
103-
OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, p_editor_notify, (Logger::ErrorType)p_type, script_backtraces);
95+
OS::get_singleton()->print_error(p_function, p_file, p_line, p_error, p_message, p_editor_notify, (Logger::ErrorType)p_type, ScriptServer::capture_script_backtraces(false));
10496
} else {
10597
// Fallback if errors happen before OS init or after it's destroyed.
10698
const char *err_details = (p_message && *p_message) ? p_message : p_error;

core/extension/gdextension.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,19 @@ String GDExtensionResourceLoader::get_resource_type(const String &p_path) const
862862
}
863863

864864
#ifdef TOOLS_ENABLED
865+
void GDExtensionResourceLoader::get_classes_used(const String &p_path, HashSet<StringName> *r_classes) {
866+
Ref<GDExtension> gdext = ResourceLoader::load(p_path);
867+
if (gdext.is_null()) {
868+
return;
869+
}
870+
871+
for (const StringName class_name : gdext->get_classes_used()) {
872+
if (ClassDB::class_exists(class_name)) {
873+
r_classes->insert(class_name);
874+
}
875+
}
876+
}
877+
865878
bool GDExtension::has_library_changed() const {
866879
return loader->has_library_changed();
867880
}

core/extension/gdextension.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ class GDExtensionResourceLoader : public ResourceFormatLoader {
184184
virtual void get_recognized_extensions(List<String> *p_extensions) const override;
185185
virtual bool handles_type(const String &p_type) const override;
186186
virtual String get_resource_type(const String &p_path) const override;
187+
#ifdef TOOLS_ENABLED
188+
virtual void get_classes_used(const String &p_path, HashSet<StringName> *r_classes) override;
189+
#endif // TOOLS_ENABLED
187190
};
188191

189192
#ifdef TOOLS_ENABLED

core/extension/gdextension_library_loader.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
313313
compatible = GODOT_VERSION_PATCH >= compatibility_minimum[2];
314314
}
315315
if (!compatible) {
316-
ERR_PRINT(vformat("GDExtension only compatible with Godot version %d.%d.%d or later: %s", compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path));
316+
ERR_PRINT(vformat("GDExtension only compatible with Godot version %d.%d.%d or later: %s, but your Godot version is %d.%d.%d",
317+
compatibility_minimum[0], compatibility_minimum[1], compatibility_minimum[2], p_path,
318+
GODOT_VERSION_MAJOR, GODOT_VERSION_MINOR, GODOT_VERSION_PATCH));
317319
return ERR_INVALID_DATA;
318320
}
319321

@@ -345,7 +347,8 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
345347
#endif
346348

347349
if (!compatible) {
348-
ERR_PRINT(vformat("GDExtension only compatible with Godot version %s or earlier: %s", compat_string, p_path));
350+
ERR_PRINT(vformat("GDExtension only compatible with Godot version %s or earlier: %s, but your Godot version is %d.%d.%d",
351+
compat_string, p_path, GODOT_VERSION_MAJOR, GODOT_VERSION_MINOR, GODOT_VERSION_PATCH));
349352
return ERR_INVALID_DATA;
350353
}
351354
}

core/input/input_map.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ String InputMap::get_builtin_display_name(const String &p_name) const {
419419

420420
for (int i = 0; i < len; i++) {
421421
if (_builtin_action_display_names[i].name == p_name) {
422-
return RTR(_builtin_action_display_names[i].display_name);
422+
return _builtin_action_display_names[i].display_name;
423423
}
424424
}
425425

0 commit comments

Comments
 (0)