Mikael Hermansson
d160d71796
Stop `FileAccess::fix_path` from emitting errors for invalid UIDs
2025-06-12 17:21:44 +02:00
OsakiTsukiko
805ad87340
Add PackedByteArray conversion to PackedVector2Array, PackedVector3Array, PackedVector4Array and PackedColorArray
2025-06-12 17:05:57 +02:00
Rémi Verschelde
d1083c9722
Improve error messages for method calls expecting only 1 argument
2025-06-12 17:02:59 +02:00
Lukas Tenbrink
2d0ff9774d
Add a smoke test to `Span` in debug builds to recover from non-empty `nullptr` `Span`.
2025-06-12 12:19:21 +02:00
Rémi Verschelde
e9f5bd8e51
Merge pull request #107355 from beicause/fix-resource-script-property-save
...
Fix `script` property of custom resources inherited from scripts are not saved
2025-06-12 11:56:46 +02:00
Rémi Verschelde
d9cd011e2f
Merge pull request #107406 from Ivorforce/ip-to-string-explicit
...
Core: Remove implicit conversions from `IPAddress` to `String`, to avoid accidental conversions
2025-06-12 01:15:53 +02:00
Danil Alexeev
f864d0ce11
GDScript: Re-add `ord()` function
2025-06-11 21:01:13 +03:00
Lukas Tenbrink
b13a0e1834
Rename `String::resize` to `resize_uninitialized`, to better communicate to callers that new characters must be initialized.
2025-06-11 18:13:02 +02:00
Lukas Tenbrink
e2931a5c19
Make conversions from `NodePath` to `String` explicit.
2025-06-11 16:50:27 +02:00
Lukas Tenbrink
1498eb327f
Make `IPAddress` to `String` conversion explicit.
2025-06-11 15:44:16 +02:00
Thaddeus Crews
cb6c7c63de
Merge pull request #107379 from Ivorforce/callable-signal-explicit-string
...
Core: Remove implicit conversions from `Callable` and `Signal` to `String`, to avoid accidental conversions
2025-06-10 19:22:41 -05:00
Lukas Tenbrink
29f75ad5fa
Remove unused `StringName::search`.
2025-06-11 00:16:51 +02:00
Lukas Tenbrink
d2f9d31270
Make more types (`Callable`, `Signal`) conversion to `String` explicit.
2025-06-10 23:55:35 +02:00
LuoZhihao
784823ada1
Fix `script` property of custom resources inherited from scripts are not saved
2025-06-10 23:03:13 +08:00
smix8
877da269d8
Change navigation region and link updates to an async process
...
Changes navigation region and link updates to an async process.
2025-06-10 14:18:47 +02:00
Rémi Verschelde
b6668cf37c
Merge pull request #107309 from akien-mga/scons-encryption-key-info-message
...
SCons: Identify build clearly when using AES256 encryption key
2025-06-10 12:30:41 +02:00
Rémi Verschelde
e9775a0c57
Merge pull request #106030 from raulsntos/gdextension/main-loop-callbacks
...
[GDExtension] Add function to register main loop callbacks
2025-06-10 12:29:52 +02:00
Rémi Verschelde
40b251ba8e
Merge pull request #103899 from Ivorforce/idiomatic-template-vargs
...
Use idiomatic templating vargs in a few places to reduce code.
2025-06-10 12:29:40 +02:00
LuoZhihao
6ad4820d34
ProjectSettings: Fix missing property hint of setting overrides
2025-06-10 18:08:23 +08:00
Raul Santos
73488f5afd
[GDExtension] Add function to register main loop callbacks
2025-06-10 04:55:20 +02:00
Thaddeus Crews
0f05e91889
Merge pull request #82808 from dalexeev/gds-vararg
...
GDScript: Add support for variadic functions
2025-06-09 17:08:48 -05:00
Thaddeus Crews
d3956ea0f2
Merge pull request #103979 from ydeltastar/evaluator-global-classes
...
Fix global classes can't be used in the Evaluator
2025-06-09 17:08:44 -05:00
Thaddeus Crews
8ecc6da249
Merge pull request #100899 from dalexeev/core-unify-display-of-error-type-prefixes
...
Core: Unify display of error type prefixes
2025-06-09 17:08:41 -05:00
Danil Alexeev
ee121ef80e
GDScript: Add support for variadic functions
2025-06-09 21:53:05 +03:00
Thaddeus Crews
86415f1732
Merge pull request #99150 from dalexeev/gds-fix-callable-call-errror-text
...
GDScript: Fix `Callable` call error text
2025-06-09 12:31:39 -05:00
Thaddeus Crews
c10c656ea7
Merge pull request #99133 from dsnopek/gdextension-reloadable-when-not-createable
...
GDExtension: Check if class without recreate callback is creatable, before marking whole extension as unreloadable
2025-06-09 12:31:36 -05:00
Thaddeus Crews
7d5ecc2c6f
Merge pull request #107295 from Ivorforce/explicit-math-to-string
...
Remove implicit conversions from math types to `String`, to avoid accidental conversions
2025-06-09 12:31:30 -05:00
Thaddeus Crews
01ef1c0eae
Merge pull request #105231 from Ivorforce/ptr-to-arg-nomacro
...
Convert `PtrToArg` macros to regular C++ structs.
2025-06-09 12:31:25 -05:00
Danil Alexeev
24494d840e
Core: Unify display of error type prefixes
2025-06-09 20:18:51 +03:00
ydeltastar
a5181d75f4
Fix global classes can't be used in the Evaluator
2025-06-09 13:47:17 -03:00
David Snopek
e4aaf9fbc6
GDExtension: Check if class without recreate callback is creatable, before marking whole extension as unreloadable
2025-06-09 10:34:57 -05:00
Rémi Verschelde
7aa99599d4
SCons: Identify build clearly when using AES256 encryption key
...
It seems to be a common pitfall that users try to build custom templates with a key
but somehow it doesn't get picked up as they expect it to.
2025-06-09 10:47:24 +02:00
Lukas Tenbrink
ed836df150
Make conversions from math types to `String` explicit, to avoid accidental conversions.
2025-06-09 01:58:18 +02:00
Rémi Verschelde
9e02194297
Merge pull request #107289 from dementive/add-missing-color-hash
...
Add missing Color hash function
2025-06-09 00:46:05 +02:00
Rémi Verschelde
d16dd79761
Merge pull request #107222 from timothyqiu/mixed-space-tab
...
Fix mixed use of spaces and tabs for indentation
2025-06-09 00:45:06 +02:00
Rémi Verschelde
f759f52d8f
Merge pull request #106902 from lyuma/config_file_uids
...
Implement UID references in VariantParser
2025-06-09 00:44:32 +02:00
Rémi Verschelde
d06170b063
Merge pull request #101563 from MajorMcDoom/basis_scaled_local
...
Optimize and expose `Basis::scaled_local` to script
2025-06-09 00:43:55 +02:00
dementive
d2814ebbf3
Add missing Color hash function
2025-06-08 14:49:50 -04:00
Lyuma
f948ab5366
Implement uid Resource references in VariantWriter
...
VariantWriter now writes the uid and the path into Resource() references.
This change will affect ConfigFile, used for .import or project settings.
2025-06-08 06:11:35 -07:00
Lukas Tenbrink
df7dab4946
Use idiomatic templating vargs in a few places to reduce code.
2025-06-08 12:24:07 +02:00
Lukas Tenbrink
78ae5919af
Convert `PtrToArg` macros to regular C++ structs.
2025-06-07 22:17:06 +02:00
Rémi Verschelde
66e041d52f
Merge pull request #107114 from tehKaiN/fix-async-resource-loading-progress-on-empty-original-path
...
Fix async resource loading progress on empty `p_original_path`
2025-06-07 00:43:49 +02:00
Haoyu Qiu
fa7efd94b3
Fix mixed use of spaces and tabs for indentation
2025-06-07 00:30:26 +08:00
Zi Ye
b957cf73ef
Optimized and exposed Basis::scaled_local.
2025-06-05 13:06:46 -05:00
Rémi Verschelde
d59994688c
Merge pull request #107151 from retrotails/fix_inf
...
Revert some instances of `Math::INF` back to 1e20
2025-06-05 17:25:02 +02:00
Rémi Verschelde
b6f04cbe10
Merge pull request #107130 from timothyqiu/pure-virtual
...
Doc: Add "required" qualifier to methods
2025-06-05 17:24:58 +02:00
Rémi Verschelde
2cf16fbd52
Merge pull request #107040 from bruvzg/wtp_ggrid
...
Add `WorkerThreadPool.get_caller_group_id`
2025-06-05 17:24:46 +02:00
Jakub Marcowski
6b09f6e6d9
zstd: Update to 1.5.7
...
Adds supports for x86_64 assembly for Windows/MinGW builds.
2025-06-05 16:03:14 +02:00
Haoyu Qiu
1ca5bc2d04
Doc: Add "required" qualifier to methods
2025-06-05 21:41:07 +08:00
retrotails
ae06a2de48
Revert some instances of Math::INF back to 1e20
2025-06-05 09:32:40 -04:00
Pāvels Nadtočajevs
b6461a3bd5
Add `WorkerThreadPool.get_caller_group_id`
2025-06-05 14:23:26 +03:00
Rémi Verschelde
bb9d6d0d02
Merge pull request #107113 from mihe/macos-open-in-program
...
Add `OS::open_with_program` for opening files/directories with a specific program on macOS
2025-06-05 13:13:49 +02:00
Rémi Verschelde
8862d4c9b5
Merge pull request #107029 from mhilbrunner/expose-workerthreadpool-gettaskid
...
Expose `WorkerThreadPool.get_caller_task_id()`
2025-06-05 13:12:48 +02:00
Rémi Verschelde
61639d9574
Merge pull request #106996 from Ivorforce/no-oa-hashmap
...
Core: Remove `OAHashMap`, in favour of `AHashMap`
2025-06-05 13:12:34 +02:00
Rémi Verschelde
0518bd5fee
Merge pull request #106683 from dalexeev/gds-remove-leftmost-rightmost-column
...
GDScript: Remove `leftmost_column` and `rightmost_column` fields
2025-06-05 13:12:02 +02:00
Rémi Verschelde
8d14f8332f
Merge pull request #105343 from bruvzg/ac_wait_loop_timer
...
[Accessibility] Use system timer/wait functions for frame delay when screen reader is active.
2025-06-05 13:10:54 +02:00
Mikael Hermansson
f610c81943
Add `OS::open_with_program` for opening files/directories with a specific program on macOS
...
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2025-06-05 10:12:01 +02:00
Thaddeus Crews
0d88e17143
Merge pull request #105629 from aaronp64/list_sort
...
Reuse and optimize sorting logic for `List`, `SelfList`, and `HashMap`
2025-06-04 10:34:37 -05:00
Thaddeus Crews
5a89010752
Merge pull request #106946 from KoBeWi/support_for_all_scripts
...
Improve auto-translation of Script Editor
2025-06-04 10:34:24 -05:00
Thaddeus Crews
cc4bbf78fb
Merge pull request #105345 from Zylann/gdextension_print_version
...
Print Godot version when an extension is found to be incompatible
2025-06-04 10:34:24 -05:00
aaronp64
6b2674fe18
Reuse and optimize sorting logic for List, SelfList, and HashMap
...
Added SortList class, and updated List, SelfList, and HashMap sort methods to use it. Sorting is done with merge sort, with an initial check to optimize for already sorted lists, and sorted lists that were appended to.
2025-06-04 10:18:22 -04:00
KaiN
19a94159a2
Fix async resource loading progress on empty p_original_path
2025-06-04 15:24:39 +02:00
kobewi
c32a031908
Improve auto-translation of Script Editor
2025-06-04 14:41:15 +02:00
Pāvels Nadtočajevs
98f377d9d0
Use system timer/wait functions for frame delay when screen reader is active.
2025-06-04 13:44:02 +03:00
Thaddeus Crews
bdc8ef3325
Merge pull request #81266 from bruvzg/mac_shell_env
...
[macOS] Add support for loading shell environment from UI apps.
2025-06-03 15:30:27 -05:00
Thaddeus Crews
344b8ce1f1
Merge pull request #106190 from aaronfranke/compression64
...
Support 64-bit sizes in Compression
2025-06-03 15:30:24 -05:00
Thaddeus Crews
57bf364f36
Merge pull request #107058 from mihe/script-backtrace-deadlock
...
Fix various race conditions with capturing of script backtraces
2025-06-03 15:30:16 -05:00
bruvzg
ee181951b6
[macOS] Add support for loading shell environment from UI apps.
2025-06-03 18:27:29 +03:00
Michael Alexsander
454e4f817c
Make build profile project detection also set build options
2025-06-03 11:11:33 -03:00
Aaron Franke
5777a88b76
Support 64-bit sizes in Compression
2025-06-03 00:03:01 -07:00
Thaddeus Crews
7a3d2f6779
Merge pull request #106606 from aaronfranke/pow2_64
...
Add 64-bit versions of core power of 2 functions
2025-06-02 18:51:56 -05:00
Thaddeus Crews
3c43899e24
Merge pull request #102369 from Ivorforce/string-get-data-fast
...
Optimize `String::get_data` by avoiding a dereference of ptr, and inlining the function.
2025-06-02 18:51:53 -05:00
Thaddeus Crews
ae81b9f21f
Merge pull request #106954 from beicause/missing-headers-fixedvector-span
...
Add missing headers in `FixedVector` and `Span`
2025-06-02 18:51:44 -05:00
Thaddeus Crews
e8a02152c4
Merge pull request #105757 from bruvzg/no_temp
...
[PCK] Move directory to the end of file, write exported/saved PCK in place.
2025-06-02 18:51:28 -05:00
Thaddeus Crews
4f64eaef0c
Merge pull request #69012 from KoBeWi/settings_of_editor_project
...
Allow to override editor settings per project
2025-06-02 18:51:26 -05:00
Max Hilbrunner
7ef1cf3c2e
Expose WorkerThreadPool.get_caller_task_id()
2025-06-02 22:00:24 +02:00
Mikael Hermansson
6929823838
Fix various race conditions with capturing of script backtraces
2025-06-02 19:46:19 +02:00
kobewi
b41d6ecf8c
Allow to override editor settings per project
2025-06-02 17:51:26 +02:00
Pāvels Nadtočajevs
8cb2817976
[PCK] Move directory to the end of file, write exported/saved PCK in place.
2025-06-02 12:54:09 +03:00
Aaron Franke
f6f1df7d73
Add 64-bit versions of core power of 2 functions
2025-06-01 23:11:12 -07:00
Lukas Tenbrink
963c20565b
Remove `OAHashMap`, in favour of `AHashMap`.
...
The two types had (mostly) the same decisions, but `AHashMap` is a faster implementation, and is more consistent with `HashMap`.
2025-05-31 15:50:10 +02:00
Lukas Tenbrink
70672ef008
Optimize `String::get_data`, `length` and `is_empty` by making better assumptions and inlining.
2025-05-30 09:25:21 +02:00
LuoZhihao
21e2bac382
Add missing headers in FixedVector and Span
2025-05-30 13:41:45 +08:00
Marwen Azouzi
873833b4a7
Remove redundant `queue_redraw()` & fix typo
2025-05-29 17:22:32 +02:00
kit
ebf71cd4f3
Fix CodeEdit hover word lookup
2025-05-28 18:35:15 -04:00
Thaddeus Crews
2cde9292c3
Merge pull request #106876 from Ivorforce/localvector-no-force-trivial
...
Un-support `force_trivial` parameter for `LocalVector`. Instead, users should use `resize_uninitialized`.
2025-05-28 09:47:45 -05:00
Thaddeus Crews
a115af487a
Merge pull request #105146 from Ivorforce/cowdata-unref-sanity-check
...
Add a safety check for `CowData::_unref()`, for when something tries to add elements during destruction.
2025-05-28 09:47:39 -05:00
Thaddeus Crews
bb47f01481
Merge pull request #106390 from akien-mga/linux-drop-ppc32
...
Linux: Drop `ppc32` (32-bit PowerPC) architecture support
2025-05-28 09:47:34 -05:00
Lukas Tenbrink
37415530d7
Un-support `force_trivial` parameter for `LocalVector`. Instead, users are reformatted to use `resize_uninitialized` to make it explicit that the resize does not initialize missing elements.
2025-05-27 18:43:36 +02:00
Lukas Tenbrink
d2d57849de
Add a safety check for `CowData::_unref()`, for when something tries to add elements during destruction.
2025-05-27 18:00:48 +02:00
Thaddeus Crews
f619ca2519
Merge pull request #60143 from Rindbee/better-connection-dialog
...
Add a flag to make the connection automatically emit the source object.
2025-05-27 09:39:34 -05:00
Thaddeus Crews
b09c70c8db
Merge pull request #106855 from timothyqiu/control-through-stillness
...
Don't update scene tree when calling `Translation::set_locale()`
2025-05-27 09:39:33 -05:00
Thaddeus Crews
91b3a26438
Merge pull request #106848 from Faless/mp/rpc_config_revert
...
Expose `get_rpc_config` and `get_node_rpc_config`
2025-05-27 09:39:32 -05:00
Thaddeus Crews
0c12e758ac
Merge pull request #106569 from Ivorforce/hashmap-if-mod
...
Accelerate `HashMap` and `HashSet` lookup by using `if` based modulo in loops
2025-05-27 09:39:29 -05:00
Thaddeus Crews
0f67c3e992
Merge pull request #104522 from Ivorforce/localvector-force-trivial-resize
...
Core: Add `resize_initialized` and `resize_uninitialized` to `Vector` and `LocalVector`
2025-05-27 09:39:27 -05:00
Thaddeus Crews
63dff62948
Merge pull request #100673 from RandomShaper/res_duplicate
...
Overhaul resource duplication
2025-05-27 09:39:25 -05:00
Rindbee
5e2396e001
Add a flag to make the connection automatically emit the source object.
...
Mainly used to improve the connection dialog.
Not implemented in `emit_signalp()`, append the source object when a PackScene is instantiated.
2025-05-27 20:19:03 +08:00
Haoyu Qiu
9285bb3a51
Don't update scene tree when calling `Translation::set_locale()`
2025-05-27 09:34:58 +08:00
Haoyu Qiu
8d93b6a54c
Add translation preview in editor
2025-05-27 07:59:28 +08:00
Fabio Alessandrelli
b73ec1fa9b
Expose get_rpc_config and get_node_rpc_config
2025-05-27 00:43:21 +02:00
Lukas Tenbrink
670ab7a383
Add `resize_initialized` and `resize_uninitialized` to `LocalVector`.
2025-05-26 18:35:41 +02:00
Lukas Tenbrink
4cb8a0c77e
Add `resize_initialized` and `resize_uninitialized` to `Vector`. These functions serve as replacements for `resize`, to make sure the caller understands whether elements need to be initialized 'by hand' after the call.
2025-05-26 18:35:41 +02:00
Thaddeus Crews
955744fdaf
Merge pull request #106733 from Ivorforce/ok-rainbows
...
Use OkHSV for `RichTextLabel` rainbows
2025-05-26 11:24:44 -05:00
Thaddeus Crews
8bcec7afa9
Merge pull request #106730 from Ivorforce/simplify-memnew-arr-placement
...
Simplify `Memory::memnew_arr_placement` to always initialize memory
2025-05-26 11:24:43 -05:00
Thaddeus Crews
c38b856f39
Merge pull request #106717 from KoBeWi/uid_in_path_factory
...
Expose helper methods for converting UIDs
2025-05-26 11:24:40 -05:00
Thaddeus Crews
81953d3cc2
Merge pull request #106445 from YYF233333/opt_sarray
...
Optimize and simplify `sarray`
2025-05-26 11:24:38 -05:00
Thaddeus Crews
06301bee3e
Merge pull request #106775 from Ivorforce/gdsoftclass-expand
...
Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`.
2025-05-26 11:24:26 -05:00
Thaddeus Crews
506417fe43
Merge pull request #105623 from lodetrick/section-feature-hide
...
Allow Inspector Section Checkboxes to hide features, Add "On" text to checkboxes
2025-05-26 11:24:25 -05:00
Thaddeus Crews
6132792f05
Merge pull request #106386 from bruvzg/mac_fs_name
...
Implement `get_filesystem_type` on macOS and Linux.
2025-05-26 11:24:25 -05:00
Thaddeus Crews
c2fde491b7
Merge pull request #105996 from a-johnston/fuzzy_search_case_fix
...
Only update case sensitive fuzzy searching within `set_query`
2025-05-26 11:24:23 -05:00
Thaddeus Crews
f196a7128c
Merge pull request #106759 from aaronp64/time_year_calc
...
Update `time.cpp` year/unix time conversions to be constant time
2025-05-26 11:24:22 -05:00
Lukas Tenbrink
621a8d14fa
Move compatible functionality from `GDCLASS` to `GDSOFTCLASS`.
2025-05-26 17:41:15 +02:00
Pedro J. Estébanez
6841b45552
Add tests for resource duplication
2025-05-26 17:05:04 +02:00
Fabio Alessandrelli
c28d5d0058
Revert "Expose get_rpc_config and get_node_rpc_config"
...
This reverts commit 8835f326b1 .
2025-05-26 15:57:38 +02:00
Pedro J. Estébanez
342266cfd9
Overhaul `Variant::duplicate()` for resources
...
This in the scope of a duplication triggered via any type in the `Variant` realm. that is, the following: `Variant` itself, `Array` and `Dictionary`. That includes invoking `duplicate()` from scripts.
A `duplicate_deep(deep_subresources_mode)` method is added to `Variant`, `Array` and `Dictionary` (for compatibility reasons, simply adding an extra parameter was not possible). The default value for it is `RESOURCE_DEEP_DUPLICATE_NONE`, which is like calling `duplicate(true)`.
Remarks:
- The results of copying resources via those `Variant` types are exactly the same as if the copy were initiated from the `Resource` type at C++.
- In order to keep some separation between `Variant` and the higher-level animal which is `Resource`, `Variant` still contains the original code for that, so it's self-sufficient unless there's a `Resource` involved. Once the deep copy finds a `Resource` that has to be copied according to the duplication parameters, the algorithm invokes the `Resource` duplication machinery. When the stack is unwind back to a nesting level `Variant` can handle, `Variant` duplication logic keeps functioning.
While that is good from a responsibility separation standpoint, that would have a caveat: `Variant` would not be aware of the mapping between original and duplicate subresources and so wouldn't be able to keep preventing multiple duplicates.
To avoid that, this commit also introduces a wormwhole, a sharing mechanism by which `Variant` and `Resource` can collaborate in managing the lifetime of the original-to-duplicates map. The user-visible benefit is that the overduplicate prevention works as broadly as the whole `Variant` entity being copied, including all nesting levels, regardless how disconnected the data members containing resources may be across al the nesting levels. In other words, despite the aforementioned division of duties between `Variant` and `Resource` duplication logic, the duplicates map is shared among them. It's created when first finding a `Resource` and, however how deep the copy was working at that point, the map kept alive unitl the stack is unwind to the root user call, until the first step of the recursion.
Thanks to that common map of duplicates, this commit is able to fix the issue that `Resource::duplicate_for_local_scene()` used to ignore overridden duplicate logic.
2025-05-26 10:06:40 +02:00
Pedro J. Estébanez
2a03b459b9
Overhaul `Resource::duplicate()`
...
Thanks to a refactor, `Resource::duplicate_for_local_scene()` and `Resource::duplicate()` are now both users of the same, parametrized, implementation.
`Resource::duplicate()` now honors deepness in a more consistent and predictable fashion. `Resource::duplicate_deep()` is added (instead of just adding a parameter to the former, for compatibility needs).
The behavior after this change is as follows:
- Deep (`deep=true`, formerly `subresources=true`):
- Previously, only resources found as direct property values of the one to copy would be, recursively, duplicated.
- Now, in addition, arrays and dictionaries are walked so the copy is truly deep, and only local subresources found across are copied.
- Previously, subresources would be duplicated as many times as being referenced throughout the main resource.
- Now, each subresource is only duplicated once and from that point, a referenced to that single copy is used. That's the enhanced behavior that `duplicate_for_local_scene()` already featured.
- The behavior with respect to packed arrays is still duplication.
- Formerly, arrays and dictionaries were recursive duplicated, with resources ignored.
- Now, arrays and dictionaries are recursive duplicated, with resources duplicated.
- When doing it through `duplicate_deep()`, there's a` deep_subresources_mode` parameter, with various possibilites to control if no resources are duplicated (so arrays, etc. are, but keeping referencing the originals), if only the internal ones are (resources with no non-local path, the default), or if all of them are. The default is to copy every subresource, just like `duplicate(true)`.
- Not deep (`deep=false`, formerly `subresources=false`): <a name="resource-shallow"></a>
- Previously, the first level of resources found as direct property values would be duplicated unconditionally. Packed arrays, arrays and dictionaries were non-recursively duplicated.
- Now, no subresource found at any level in any form will be duplicated, but the original reference kept instead. Packed arrays, arrays and dictionaries are referenced, not duplicated at all.
- Now, resources found as values of always-duplicate properties are duplicated, recursively or not matching what was requested for the root call.
This commit also changes what's the virtual method to override to customize the duplication (now it's the protected `_duplicate()` instead of the public `duplicate()`).
2025-05-26 10:05:25 +02:00
kobewi
9c37ca5383
Expose helper methods for converting UIDs
2025-05-25 00:26:16 +02:00
Pāvels Nadtočajevs
d609cf62a0
Implement `get_filesystem_type` on macOS and Linux.
2025-05-23 23:05:06 +03:00
aaronp64
ba68e2a1e8
Update time.cpp year/unix time conversions to be constant time
...
Added functions to convert between year and day from unix timestamps in constant time, to avoid having to iterate one year at a time.
2025-05-23 14:02:14 -04:00
Yufeng Ying
8773f95e40
Optimize and simplify sarray.
2025-05-23 23:47:57 +08:00
Yufeng Ying
3545e945f6
Simplify implementation of errarray.
2025-05-23 23:14:59 +08:00
Lukas Tenbrink
ea6fbd6687
Use OkHSV for rainbow labels.
2025-05-22 22:53:32 +02:00
Lukas Tenbrink
4371aa864d
Simplify `Memory::memnew_arr_placement` to always initialize memory, to force callers to make the decision of whether to initialize.
2025-05-22 22:25:12 +02:00
Thaddeus Crews
15cd5e1619
Merge pull request #106689 from aaronp64/ringbuffer_localvector
...
Use `LocalVector` for `RingBuffer`
2025-05-22 12:15:03 -05:00
Thaddeus Crews
6258a3e224
Merge pull request #98750 from aaronfranke/grisu
...
Use Grisu2 algorithm in `String::num_scientific` to fix serializing
2025-05-22 12:15:02 -05:00
Thaddeus Crews
c3c3657a0d
Merge pull request #106661 from KirbyRider1337/dont-compare-the-same-item-with-itself
...
Prevent comparison of items with themselves while partitioning sort arrays
2025-05-22 12:14:58 -05:00
Thaddeus Crews
1b5064e3e3
Merge pull request #105505 from Ivorforce/simplify-force-trivial
...
Simplify use of `LocalVector` `force_trivial` template parameter.
2025-05-22 12:14:58 -05:00
Aaron Franke
15de1d6c35
Use Grisu2 algorithm in String::num_scientific to fix serializing
2025-05-22 09:13:16 -07:00
kobewi
42249bb659
Add @export_file_path to export raw paths (no UID)
2025-05-22 13:25:17 +02:00
Logan Detrick
1a427d3dec
Add feature hint string and "On" text for checkable groups
2025-05-21 14:56:55 -07:00
KirbyRider1337
caf8053b86
Adjusted get_median_from_3 and partitioner to also retrieve the pivot's index and check if either end of the partitioner has reached it to avoid comparing things with themselves
2025-05-21 14:38:09 -04:00
aaronp64
2a02cabe4d
Use LocalVector for RingBuffer
...
Updated RingBuffer to use LocalVector instead of Vector, to avoid _copy_on_write overhead when writing to the buffer.
2025-05-21 13:50:10 -04:00
Danil Alexeev
7aafa6ef18
GDScript: Remove `leftmost_column` and `rightmost_column` fields
2025-05-21 18:16:20 +03:00
Rémi Verschelde
25a3c27c41
Merge pull request #105628 from rsanchezsaez/apple/ios-visionos-4.5
...
Native visionOS platform support
2025-05-20 23:09:07 +02:00
Ricardo Sanchez-Saez
47971c0a27
Introduce 'visionos' platform derived from 'apple_embedded'
2025-05-19 15:47:01 -07:00
Ricardo Sanchez-Saez
457299449d
Introduce 'drivers/apple_embedded' abstract platform for code reuse
2025-05-19 15:37:13 -07:00
Lukas Tenbrink
70f8dd29f5
Simplify use of `LocalVector` `force_trivial` template parameter.
2025-05-19 20:27:14 +02:00
Thaddeus Crews
a2aefab4c7
Merge pull request #106486 from BlueCube3310/image-ch-detect-fix
...
Image: Fix detecting color channels
2025-05-19 08:01:40 -05:00
Thaddeus Crews
6c2d288ef1
Merge pull request #106337 from TokageItLab/arc-tolerance
...
Fix Quaternion arc constructor tolerance
2025-05-19 08:01:37 -05:00
Thaddeus Crews
2bf7ac76cf
Merge pull request #106456 from Repiteo/style/remove-DEBUG_METHODS_ENABLED
...
Style: Remove redundant `DEBUG_METHODS_ENABLED` macro
2025-05-19 08:01:35 -05:00
Thaddeus Crews
2d42b889d1
Merge pull request #104124 from Ivorforce/alloc-static-calloc
...
Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
2025-05-19 08:01:33 -05:00
Pedro J. Estébanez
f5383df83b
Overhaul `Resource::duplicate_for_local_scene()`
...
- Serves as a first step for future refactors.
- Code is simpler.
- Algorithm is more efficient: instead of two passes (dumb copy + resolve copies), it's single-pass.
- Now obeys `PROPERTY_USAGE_NEVER_DUPLICATE`.
- Now handles deep self-references (the resource to be duplicated being referenced somewhere deep).
2025-05-19 10:01:11 +02:00
Lukas Tenbrink
6fe17b264e
Use `if` based mod in `HashMap` and `HashSet` in loops (faster than `fastmod`).
2025-05-18 20:05:34 +02:00
Yufeng Ying
1384e82c2c
Improve ScriptLanguage get keyword API.
2025-05-17 18:43:19 +08:00
Thaddeus Crews
5620a215a1
Merge pull request #106021 from Alex2782/fix_xbox_controller_on_android
...
Fix Xbox Controller on Android
2025-05-16 07:43:09 -05:00
BlueCube3310
0f9986470a
Image: Fix detecting color channels
2025-05-16 12:47:57 +02:00
Adam Johnston
76a65de3ab
Change fuzzy search to only set case sensitive within set_query
2025-05-15 12:00:55 -07:00
Thaddeus Crews
d237e31a89
Style: Remove redundant `DEBUG_METHODS_ENABLED`
...
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Thaddeus Crews
5538850d87
Core: Convert `Pair`/`KeyValue` to `constexpr`
2025-05-15 10:37:41 -05:00
Pedro J. Estébanez
820380817a
Exclude RD creation test functions from templates
2025-05-15 10:12:38 +02:00
Yufeng Ying
3bf400ffae
Move bisect to Span and deduplicate code.
...
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-05-14 18:19:09 +08:00
Rémi Verschelde
1de9789806
Linux: Drop `ppc32` (32-bit PowerPC) architecture support
...
This was added together with `ppc64le` in #54490 , but seemingly only for the
purpose of getting it to compile on a Linux distro that aims at maximizing
support for all CPU architectures.
I don't think anyone has ever _run_ Godot on a `ppc32` system (do those even
support OpenGL ES 3.0?) and so I don't think we should aim to support it.
Debian dropped support for its PowerPC (`ppc32`) arch in Debian 9, released
in 2017.
2025-05-14 10:22:12 +02:00
Silc Lizard (Tokage) Renew
37aca09b23
Fix Quaternion arc constructor tolerance
2025-05-14 07:15:12 +09:00
Thaddeus Crews
0717136785
Merge pull request #106353 from YYF233333/hashmap_zst
...
Optimize `HashMap` size for zero-sized Allocators
2025-05-13 16:22:28 -05:00
Thaddeus Crews
1c4b660312
Merge pull request #96611 from Dynamic-Pistol/master
...
Add `PROPERTY_HINT_INPUT_NAME` for use with `@export_custom` to allow using input actions
2025-05-13 16:22:25 -05:00
Thaddeus Crews
f648eea7f4
Merge pull request #106209 from YYF233333/opt_get_actions
...
Optimize `InputMap::get_actions`
2025-05-13 16:22:23 -05:00
Thaddeus Crews
243c8932d3
Merge pull request #82497 from Repiteo/typed-array-consolidation
...
Typed array equality operator update
2025-05-13 16:22:15 -05:00
Thaddeus Crews
a2b49d0800
Merge pull request #93883 from TV4Fun/variant_join
...
Consolidate and simplify string joining code in `VariantUtilityFunctions`
2025-05-13 16:22:13 -05:00
Thaddeus Crews
172794337c
Merge pull request #99985 from allenwp/release-only-crash-99797
...
Print error message when index is out of range in `Variant::iter_get`
2025-05-13 16:22:11 -05:00
Thaddeus Crews
5b935881fc
Typed array equality operator logic updated
...
• Instead of calling to `_ref`, the same effect is achieved by calling to the base class assignment operator
• No longer need to be expose `_ref`; set back to private & remove reference from gdextension_interface
2025-05-13 14:41:16 -05:00
Allen Pestaluky
5657ecc542
Print error message when index is out of range in `Variant::iter_get` of `DEBUG_ENABLED` builds.
...
Mitigates #99797
2025-05-13 13:57:16 -04:00
Yufeng Ying
0babb2ab02
Optimize HashMap size for zero-sized Allocators.
2025-05-13 21:44:39 +08:00
Lukas Tenbrink
3207066e19
Add `Memory::alloc_static_zeroed` to allocate memory that's filled with zeroes.
...
This is generally faster than `malloc` followed by `memset` / loop-set to 0.
2025-05-13 01:57:05 +02:00
Rémi Verschelde
620206b0ae
Merge pull request #106309 from aaronp64/string_chr_appends
...
Avoid single character `String` allocations when appending characters
2025-05-13 01:05:45 +02:00
Rémi Verschelde
03cae12314
Merge pull request #106295 from timothyqiu/legacy-l10n
...
Remove translation loading logic that was never used
2025-05-13 01:05:31 +02:00
Rémi Verschelde
4c62c8aceb
Merge pull request #106020 from Ivorforce/hashmap-duplicate-hash
...
Optimize `HashMap` insertion by removing duplicate computation of hash and position
2025-05-13 01:04:57 +02:00
Rémi Verschelde
a529abc361
Merge pull request #101339 from Ivorforce/remove-nothing
...
Remove unintentional use of zero-width space.
2025-05-13 01:04:19 +02:00
Rémi Verschelde
2b037e8989
Merge pull request #93276 from mashumafi/avoid-vec-copy
...
Avoid unnecessary copy-on-write Vector/Array
2025-05-13 01:04:16 +02:00
Rémi Verschelde
b8fba34c17
Merge pull request #75629 from RedworkDE/non-atomic-error-macros
...
Remove pointless use of atomics in error macros
2025-05-13 01:04:12 +02:00
Joel Croteau
981f1e9298
Rename `VariantUtilityFunctions::join()` to `join_string()`
2025-05-12 17:51:09 -05:00
Joel Croteau
8be7ad32e7
Consolidate and simplify string joining code in `VariantUtilityFunctions`
...
`variant_utility.cpp` has 8 different copies of the exact same loop to join
vararg strings together. This is bad coding process and makes the codebase
needlessly cluttered. Also, the loop itself has an i == 0 check that is
unnecessary since String is auto-initialized to be empty and String::operator+=
already checks if it is empty before appending. This is a non-functional change
that only reorganizes the code to be a bit more readable.
2025-05-12 17:47:14 -05:00
aaronp64
8fb3697916
Avoid single character String allocations when appending characters
...
Removed calls to String::chr() when appending characters to Strings in Expression, Resource, and VariantParser, to avoid creating temporary Strings for each character. Also updated the Resource case to resize String up front, since size is known.
2025-05-12 17:35:42 -04:00
Lukas Tenbrink
e8c3409d40
Remove 4 unintentional uses of zero-width space and zero-width non-joiner.
2025-05-12 22:00:37 +02:00
RedworkDE
c5777c43d9
Remove pointless use of atomics in error macros
2025-05-12 17:06:19 +02:00
mashumafi
b73346ef19
Avoid copy-on-write when reading vectors
2025-05-12 16:08:05 +02:00
Haoyu Qiu
bbc6643e4c
Remove translation loading logic that was never used
2025-05-12 19:05:20 +08:00
Yufeng Ying
55a61cbd4a
Optimize InputMap::get_actions.
2025-05-12 17:51:27 +08:00
Thaddeus Crews
1b439d49a9
Merge pull request #100446 from YYF233333/vmap
...
Replace `VMap` used in `VisualShader` with `HashMap` and remove `VMap`
2025-05-09 11:29:25 -05:00
Thaddeus Crews
ba710dfde3
Merge pull request #106170 from IphStich/fix-typed-dictionary
...
Fix for debugging typed dictionaries
2025-05-09 11:29:18 -05:00
Thaddeus Crews
0bf9d88797
Merge pull request #106167 from Faless/mbedtls/fix_enable_threading
...
mbedTLS: Fix concurrency issues with TLS
2025-05-09 11:29:17 -05:00
Yufeng Ying
2db0a44519
Remove vmap.h
2025-05-09 19:05:28 +08:00
Thaddeus Crews
16aaa0a213
Merge pull request #103944 from KoBeWi/more_red_info
...
Improve error messages for `add_property_info()`
2025-05-08 07:19:33 -05:00
Elise
057759d413
Fix for debugging typed dictionaries
2025-05-08 21:11:23 +10:00
Fabio Alessandrelli
2c789788c0
mbedTLS: Fix concurrency issues with TLS
...
When we first integrated mbedTLS, we decided not to enable
MBEDTLS_THREADING_C (which adds mutex locking to calls modifying the
state), and instead to simply create separate contexts ("states") for
each connection.
This worked fine until recently.
Sadly, mbedTLS 3 added a global state for the new PSA crypto
functionalities (which are required to support TLSv1.3).
This results in TLSv1.3 connections to access and modify the global
state concurrently when running in threads.
This commit enables MBEDTLS_THREADING_C, and MBEDTLS_THREADING_C_ALT to
provide a generic Godot implementation using the engine Mutex class.
2025-05-08 11:45:00 +02:00
Thaddeus Crews
090d244b16
Merge pull request #101356 from Ivorforce/inline-utf-creation-functions
...
Inline `String::utf8` and `String::utf16` for their simplicity.
2025-05-07 12:48:32 -05:00
Thaddeus Crews
075b55068e
Merge pull request #100067 from aaronp64/randi_range_overflow
...
Fix `RandomPCG::random(int, int)` overflow bug
2025-05-07 12:48:30 -05:00
Thaddeus Crews
051712dfb8
Merge pull request #103264 from mhilbrunner/docs-path-join
...
Rename "file" param for str.path_join() to "path"
2025-05-07 12:48:29 -05:00
Thaddeus Crews
0ce3d75c20
Merge pull request #93783 from aaronp64/json_stringify_performance
...
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -05:00
Thaddeus Crews
aa1ca2b244
Merge pull request #93517 from Repiteo/core/nodiscard-strings
...
Core: Add `[[nodiscard]]` to string-like classes/structs
2025-05-07 12:48:27 -05:00
aaronp64
f13b4b760a
Improve JSON::stringify performance
...
- Changed stringify to call static function _stringify directly, instead of creating JSON object
- Changed colon and end_statement from String to const char * to avoid extra allocations in each _stringify call
- Pass result String reference to each _stringify call to append to instead of allocating new String in each call
These changes make JSON::stringify around 2-3x faster in most cases
2025-05-06 18:27:32 -04:00
aaronp64
1089f61868
Fix RandomPCG::random(int, int) overflow bug
...
- Use int64_t for subtraction before converting to uint32_t
- Don't add one to uint32_t max value for rand() bounds
2025-05-06 17:54:12 -04:00
Thaddeus Crews
579feb387c
Core: Add `[[nodiscard]]` to string-like classes
2025-05-06 12:23:41 -05:00
aaronp64
d176ba045f
Array performance improvements to reduce copying/copy_on_write calls
...
- Avoid temporary copy of p_array in Array::append_array when types match
- Call ptrw() once before looping in methods that return new Arrays, to avoid copy_on_write call for each item (recursive_duplicate, slice, filter, map)
2025-05-06 13:19:50 -04:00
Lukas Tenbrink
26a6d4062d
Inline `String::utf8` and `String::utf16` for their simplicity.
2025-05-06 17:20:03 +02:00
Thaddeus Crews
e085acd71c
Merge pull request #104815 from Ivorforce/strnlen
...
Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs)
2025-05-06 08:38:06 -05:00
Thaddeus Crews
bd22587170
Merge pull request #106093 from KoBeWi/deprecated_forever
...
Remove registration of deprecated classes
2025-05-06 08:38:05 -05:00
Thaddeus Crews
4cb030d6bf
Merge pull request #106089 from mihe/rogue-newlines
...
Fix empty lines being added for errors with no script backtrace
2025-05-06 08:38:04 -05:00
Thaddeus Crews
7efe897343
Merge pull request #106085 from clayjohn/texture-decompress-import
...
Fix loading BPTC/ASTC textures on devices that don't support them
2025-05-06 08:38:04 -05:00
Thaddeus Crews
5fec9a9fdc
Merge pull request #100057 from aaronp64/container_validate_obj_perf
...
Improve `ContainerTypeValidate` performance for object types
2025-05-06 08:38:03 -05:00
Thaddeus Crews
aa24e3b671
Merge pull request #105884 from stuartcarnie/macos_embedded
...
macOS: Embedded window support.
2025-05-06 08:37:59 -05:00