1
0
Fork 0
Commit Graph

7981 Commits

Author SHA1 Message Date
Thaddeus Crews 24a8c05cbd
Merge pull request #100335 from kiroxas/Improve`ResourceUID--id_to_text`Performance
Improve `ResourceUID::id_to_text` performance
2024-12-16 12:10:05 -06:00
Thaddeus Crews e42c22f359
Merge pull request #100426 from Ivorforce/variant-move-constructor
Add move assignment and move constructor to Variant.
2024-12-16 12:09:52 -06:00
Thaddeus Crews 9c9af038d5
Merge pull request #91060 from dalexeev/code-edit-add-doc-tooltips
Code Editor: Add documentation tooltips
2024-12-16 12:09:45 -06:00
Thaddeus Crews 7254761a46
Merge pull request #98861 from MJacred/get_joypad_infos_on_windows
Get joypad's vendor ID, product ID and name on Windows for XInput devices.
2024-12-16 12:09:44 -06:00
Thaddeus Crews a7fa0528bb
Merge pull request #100372 from Calinou/os-add-get-version-alias
Add `OS.get_version_alias()` to return a human-readable Windows/macOS version number
2024-12-16 12:09:40 -06:00
Lukas Tenbrink 8c4e674770 Add move semantics (constructor, assignment) to `StringName`. 2024-12-16 19:02:52 +01:00
Rémi Verschelde 08508d2e01
Merge pull request #99700 from hpvb/scene_tree_editor_performance
Improve Scene Tree editor performance
2024-12-16 17:16:00 +01:00
MJacred 01a2726c59 Get joypad's vendor ID, product ID, and name on Windows 2024-12-15 23:59:11 +01:00
Lukas Tenbrink df3e9291c6 Rename `String::copy_from` functions to their respective encodings (`parse_latin1`, `parse_wstring`, `parse_utf32`). 2024-12-15 21:46:50 +01:00
Lukas Tenbrink 34fa0bf3ec Add move assignment and move constructor to Variant.
Add `_to_variant` helper functions to `gdvirtual.gen.inc` to work around an MSVC bug.
2024-12-15 14:38:46 +01:00
Kiro 5f401e63b5 Improve `ResourceUID::id_to_text` performance 2024-12-15 10:41:13 +01:00
Danil Alexeev 80d11500b5
Code Editor: Add documentation tooltips 2024-12-15 10:51:33 +03:00
Hugo Locurcio 928982891e Add `OS.get_version_alias()` to return a human-readable Windows/macOS version number
Windows 11's major version number is actually 10.x.x, which can be confusing
if you don't know about this quirk. `OS.get_version_alias()` avoids this
by displaying the "branding" version number and the build number as a suffix,
so that individual updates can still be distinguished from each other.

On macOS, `OS.get_version_alias()` returns the version number prepended
with the version name (e.g. Sequoia for macOS 15).

On other operating systems, this returns the same value as `OS.get_version()`.
2024-12-14 18:47:50 +01:00
Rémi Verschelde 68559c4906
Merge pull request #100367 from Ivorforce/swap-move
Optimize `SWAP` macro by using move semantics.
2024-12-14 18:25:42 +01:00
Hilderin 4e19ab8afe
Fix connecting a signal with a double click is too difficult
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
2024-12-14 16:18:34 +03:00
Markus Sauermann ee2930cad4 Remove temporary project conversion
This project conversion should be removed before the next stable release,
because it affects only projects opened during dev-builds.
2024-12-14 00:37:47 +01:00
Lukas Tenbrink 383d933f53 Optimize `SWAP` macro by using move semantics. 2024-12-13 16:19:52 +01:00
Thaddeus Crews ba2c5c1e61
Merge pull request #100318 from dsnopek/stream-peer-extension-put-partial-data-bug
Fix `StreamPeerExtension::put_partial_data()` to call `_put_partial_data()`
2024-12-12 16:13:38 -06:00
Thaddeus Crews 9fba62a938
Merge pull request #100239 from Ivorforce/cowdata-move-constructor
Add move constructor and move assignment to `CowData`, `String`, `Char16String`, `CharString`, and `Vector`.
2024-12-12 16:13:30 -06:00
Thaddeus Crews 9c290c4c56
Merge pull request #100033 from Daylily-Zeleen/daylily-zeleen/optimize_callable_to_string
Optimize callable's stringify text.
2024-12-12 16:13:23 -06:00
HP van Braam 6f7525c396 Improve Scene Tree editor performance
We now cache the Node*<>TreeItem* mapping in the SceneTreeEditor. This
allows us to make targeted updates to the Tree used to display the scene
tree in the editor.

Previously on almost all changes to the scene tree the editor would
rebuild the entire widget, causing a large number of deallocations an
allocations. We now carefully manipulate the Tree widget in-situ saving
a large number of these allocations.

In order to know what Nodes need to be updated we add a
editor_state_changed signal to Node, this is a TOOLS_ENABLED,
editor-only signal fired when changes to Node happen that are relevant
to editor state.

We also now make sure that when nodes are moved/renamed we don't check
expensive properties that cannot contain NodePaths. This saves a lot of
time when SceneTreeDock renames a node in a scene with a lot of
MeshInstances. This makes renaming nodes go from ~27 seconds to ~2
seconds on large scenes.

SceneTreeEditor instances will now also not do all of the potentially
expensive update work if they are invisible. This behavior is turned off
by default so it won't affect existing users. This change allows the
editor to only update SceneTreeEditors that actually in view. In
practice this means that for most changes instead of updating 6
SceneTreeEditors we only update 1 instantly, and the others only when
they become visible.

There is definitely more that could be done, but this is already a
massive improvement. In complex scenes we see an improvement of 10x,
things that used to take ~30 seconds now only take 2.

This fixes #83460

I want to thank KoBeWi, TokisanGames, a-johnston, aniel080400 for
their tireless testing. And AeioMuch for their testing and providing a
fix for the hover issue.
2024-12-12 22:47:05 +01:00
David Snopek 8c01fc2274 Fix `StreamPeerExtension::put_partial_data()` to call `_put_partial_data()` 2024-12-12 08:31:12 -06:00
Rémi Verschelde 7b15c0622e
Merge pull request #100295 from Ivorforce/string-builder-inplace
Optimize `StringBuilder.as_string` by constructing the string in-place and skipping unnecessary checks.
2024-12-12 14:10:21 +01:00
Rémi Verschelde 321bd35317
Merge pull request #100294 from Ivorforce/count-no-realloc
Optimize `String.count` and `String.countn` by avoiding repeated reallocations.
2024-12-12 14:10:17 +01:00
Rémi Verschelde 819db4daf5
Merge pull request #99559 from mayoff/OperatorEvaluatorModNZ-ptr_evaluate
Fix `Variant` modulo operation
2024-12-12 14:09:59 +01:00
Rémi Verschelde 1e1e862204
Merge pull request #98100 from BlueCube3310/image-cleanup-more
Image: More cleanup and reduced code duplication
2024-12-12 14:09:49 +01:00
BlueCube3310 335077a03f Image: More cleanup and reduced code duplication. 2024-12-12 11:52:59 +01:00
Lukas Tenbrink 76af9537ed Optimize `StringBuilder.as_string` by constructing the string in-place and skipping unnecessary checks.
Co-authored-by: YYF233333 <nbyyf2002@mail.ustc.edu.cn>
2024-12-12 01:35:02 +01:00
Thaddeus Crews c5e6f6276b
Merge pull request #100110 from DarioSamo/rd-get-data-async
Implement `RD::buffer_get_data_async()` and `RD::texture_get_data_async()`
2024-12-11 17:35:29 -06:00
Lukas Tenbrink ef3eecd34e Optimize `String.count` and `String.countn` by avoiding repeated reallocations. 2024-12-12 00:28:13 +01:00
Dario 054891de04 Implement buffer_get_data_async and texture_get_data_async. 2024-12-11 11:55:23 -08:00
Rémi Verschelde c2e4ae782a
Merge pull request #100235 from akien-mga/revert-97303
Revert "Avoid duplicating signals from scene instances into packed scenes"
2024-12-11 18:48:18 +01:00
Lukas Tenbrink 57073ba14e Add move constructor and move assignment to CowData, String, Char16String, CharString and Vector. 2024-12-11 15:52:15 +01:00
Rémi Verschelde 44dfa7e710
Merge pull request #99895 from mihe/jolt-physics
Add Jolt Physics as an alternative 3D physics engine
2024-12-11 14:53:57 +01:00
Mikael Hermansson d470c2ac6a Add Jolt Physics as an alternative 3D physics engine
Co-authored-by: Jorrit Rouwe <jrouwe@gmail.com>
2024-12-11 13:57:25 +01:00
Thaddeus Crews ba66c478c0
Merge pull request #100041 from Ivorforce/optimize-string-similarity
Optimize String.similarity by avoiding allocation for bigrams.
2024-12-10 14:16:00 -06:00
Thaddeus Crews 3ef8e835c2
Merge pull request #99775 from Ivorforce/string-builder-template-append
Optimize StringBuilder by using `LocalVector` instead of `Vector`.
2024-12-10 14:15:58 -06:00
Thaddeus Crews 8f16f864a6
Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
Core: Fix `JSON.{from,to}_native()` issues
2024-12-10 14:15:53 -06:00
Thaddeus Crews d108d4f29e
Merge pull request #100147 from esainane/vector-victor
Remove apparent contradiction in vector.h header
2024-12-10 14:15:52 -06:00
Thaddeus Crews 78215f3cc6
Merge pull request #100132 from Ivorforce/string-compile-time-strlen
Optimize String construction from statically known strings by evaluating `strlen` at compile-time.
2024-12-10 14:15:49 -06:00
Yufeng Ying bdf24924e6 [Codestyle] Merge identical code piece. 2024-12-11 00:48:00 +08:00
Rémi Verschelde 2153a60425
Revert "Avoid duplicating signals from scene instances into packed scenes"
This partially reverts commit 8a42e3d3ef.

Comment improvements and the test case were kept, with one part commented out.
2024-12-10 10:42:58 +01:00
Sai Nane 66b7d5f1b5 Remove apparent contradiction in vector.h header
3205a92ad8 was a major commit which removed `PoolVector`, and replaced
most references to `PoolVector` with `Vector` instead. In most cases,
this was appropriate, given that `PoolVector` was being replaced with
`Vector`, as an effective generalist in 64-bit address space layouts.

However, vector.h itself was left with an artifact advising the reader
to use `Vector` instead of `Vector` for large arrays. While this led
to a fascinating deep dive, and hopefully improved some of the
documentation along the way, it's probably best to clean this up for
the next person.
2024-12-10 01:51:30 +00:00
Lukas Tenbrink a3f48f7047 Optimize String construction from statically known strings allowing `strlen` to be evaluated at compile time, where possible. 2024-12-09 21:47:28 +01:00
Thaddeus Crews 4b1a51d3e3
Merge pull request #100075 from demolke/simplify
Fix handling of leading `..` in simplify_path
2024-12-09 14:33:34 -06:00
Thaddeus Crews 5b312d0e59
Merge pull request #99816 from Ivorforce/string-copy-from-optimizations
Optimize `String::copy_from` and `String::copy_from_unchecked` implementations, improving String allocation speed.
2024-12-09 14:33:33 -06:00
Thaddeus Crews da8b9ba1ff
Merge pull request #99168 from RandomShaper/even_better_spinlock
SpinLock: Overhaul false sharing prevention
2024-12-09 14:33:31 -06:00
Thaddeus Crews 7d4db793e6
Merge pull request #100044 from Yelloween10/fix-input-event-metadata
Fix discarded input event metadata in `xformed_by`
2024-12-09 14:33:27 -06:00
Thaddeus Crews 473c28b1ad
Merge pull request #98118 from bruvzg/escape_colors
Add support for 24-bit color escape sequences, simplify `print_rich` BBCode parsing.
2024-12-09 14:33:25 -06:00
Thaddeus Crews a607bca2fd
Merge pull request #100024 from Ivorforce/optimize-string-single-char
Optimize string single char contains calls.
2024-12-09 14:33:24 -06:00
Thaddeus Crews 2654dbaf5c
Merge pull request #99984 from KoBeWi/negative_diff_but_it's_deleting_whole_files
Move singleton StringName definitions to header
2024-12-09 14:33:11 -06:00
Lukas Tenbrink 8df2dbe2f6 Optimize StringBuilder append for static strings, and as_string(). 2024-12-08 16:39:25 +01:00
Lukas Tenbrink 875b48366c Optimize String.similarity by avoiding allocation for bigrams. 2024-12-08 13:28:40 +01:00
Lukas Tenbrink e1c42392c2 Improve string copy_from and copy_from_unchecked implementations, by making use of caller contracts and language spec (NULL termination and casts). 2024-12-07 01:41:25 +01:00
Lukas Tenbrink b5c31ebb41 Add contains_char() for single-character 'contains' calls. 2024-12-06 20:23:35 +01:00
Yelloween 98a23136d5 Fix missing event metadata in _input() with Input.parse_input_event()
Use merge_meta_from() for metadata copying.

Fixed include order

Removed unnecessary line
2024-12-06 22:08:16 +03:00
kobewi d3c9bee653 Move singleton StringName definitions to header 2024-12-06 13:43:31 +01:00
demolke 964e2b3a9e Fix handling of leading `..` in simplify_path
Prior to this `..\..\texture.png` was incorrectly simplified to `texture.png`
2024-12-06 07:53:55 +01:00
Thaddeus Crews 45734bd451
Merge pull request #99817 from Ivorforce/strlen-char32_t
Use `strlen()` 3 times instead of custom length check implementations in ustring
2024-12-05 14:12:21 -06:00
Thaddeus Crews 06cce0e81a
Merge pull request #100016 from Ivorforce/camelcase-to-underscore-rolling-cache
Optimize `_camelcase_to_underscore` (and thus `String.capitalize`)
2024-12-05 14:11:59 -06:00
Thaddeus Crews 3a948abdce
Merge pull request #100015 from Ivorforce/is-valid-filename-cache
Optimize `String::is_valid_filename()` and `String::validate_filename()`
2024-12-05 14:11:57 -06:00
Thaddeus Crews 9951743adf
Merge pull request #97822 from stdmnpkg/loongarch
Add loongarch64 support for Linux/*BSD
2024-12-05 14:11:44 -06:00
Student Main e0693f8ad8 Add loongarch64 support 2024-12-06 00:18:26 +08:00
Daylily-Zeleen 614a51f293 Optimize callable's stringify text. 2024-12-05 14:24:39 +08:00
Lukas Tenbrink 8d82933c7c Optimize _camelcase_to_underscore (and thus String.capitalize) by using a rolling cache of character attributes, instead of re-computing each iteration. 2024-12-04 18:39:38 +01:00
Thaddeus Crews 451fd7a436
Merge pull request #99540 from dalexeev/core-dont-gen-json-uid-files
Core: Do not generate `*.uid` files for JSON, certificates, and translations
2024-12-04 11:02:09 -06:00
Thaddeus Crews ab58a339df
Merge pull request #99712 from KoBeWi/bug_spawner_spawns_new_bugs_to_fix
Fix UID support in MultiplayerSpawner
2024-12-04 11:02:02 -06:00
Lukas Tenbrink 0d2e13bcb8 Optimize is_valid_filename and validate_filename by caching invalid filename characters, instead of re-splitting each call. 2024-12-04 17:54:11 +01:00
Danil Alexeev b91bacb43a
Core: Do not generate `*.uid` files for JSON, certificates, and translations 2024-12-04 14:26:10 +03:00
kobewi 67b95f341e Fix UID support in MultiplayerSpawner 2024-12-03 22:11:43 +01:00
Thaddeus Crews 44cda51110
Merge pull request #98812 from bruvzg/macos_bundles_as_file
[macOS] Handle bundles as files in the embedded file dialogs.
2024-12-03 14:41:07 -06:00
Thaddeus Crews 1719f8ed3d
Merge pull request #99834 from kiroxas/passLengthToParseUTF8
Ensure `parse_utf8` has length of string passed in when available
2024-12-03 14:41:06 -06:00
Thaddeus Crews 156bc92282
Merge pull request #98397 from adamscott/add-tmp-support
Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
2024-12-03 14:40:59 -06:00
Thaddeus Crews a135a6478a
Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 -06:00
bruvzg d5e599f77e [macOS] Handle bundles as files in the embedded file dialogs. 2024-12-03 12:41:52 +02:00
Adam Scott 1b3e483899
Add file and dir temporary utilities
Co-authored by @Alex2782 for the Android bindings.
Many thanks to the reviewers also.

Co-authored-by: Alex <alex.hart.278@gmail.com>
2024-12-02 12:08:14 -05:00
Rémi Verschelde acdffd0a14
Merge pull request #99864 from HuntJSparra/server-features-regression
Fix `OS::has_feature()` skipping custom features
2024-12-02 15:51:56 +01:00
Rémi Verschelde d7515dddaa
Merge pull request #99815 from Ivorforce/string-name-not-equal-inline
Move StringName `!=` operator to the header file to make it inlineable.
2024-12-02 15:51:43 +01:00
Lukas Tenbrink 2b39314461 Abstract the implementation of 3 ustring string length checks with strlen, adding an implementation for char32_t. 2024-12-02 15:19:20 +01:00
rune-scape d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
Lukas Tenbrink a47d29cf11 Move StringName != to the header file to make it inlineable. 2024-12-01 19:50:34 +01:00
Kiro 83d4bde0a2 When calling code has length of string, pass it to parse_utf8 2024-12-01 08:31:22 +01:00
Hunt J. Sparra ba992ed22f Fix early exit once has_server_feature_callback is set; remove server feature warning due to consistent "fallthrough" features (e.g., OS-specific features) 2024-11-29 23:34:52 -05:00
Rémi Verschelde 9048776457
Merge pull request #99751 from bruvzg/dir_init
Add `std::initializer_list` constructor for Dictionary.
2024-11-29 22:51:17 +01:00
bruvzg a4b17e7852 [FileAccess] Return error codes from `store_*` methods. 2024-11-29 23:22:31 +02:00
Rémi Verschelde 56a7dba10b
Merge pull request #99799 from akien-mga/fix-typos
Fix various typos and code style issues
2024-11-29 22:02:53 +01:00
Rémi Verschelde b1d65e4ed8
Merge pull request #99777 from Ivorforce/string-strlen-repeat-calls
String: Don't repeat calls to `strlen` in `split`, and make `splitter_length` const in `get_slice`.
2024-11-29 22:02:47 +01:00
Rémi Verschelde f4f6f5fb55
Merge pull request #99537 from BlueCube3310/betsy-bc1-bc5
Betsy: Add BC3 and BC5 support
2024-11-29 22:02:06 +01:00
cixil 8a42e3d3ef
Avoid duplicating signals from scene instances into packed scenes 2024-11-29 18:29:08 +01:00
Pāvels Nadtočajevs 54945c4d28 Add std::initializer_list constructor for Dictionary. 2024-11-29 14:12:40 +02:00
Danil Alexeev bd1a35ce9e
Core: Fix `JSON.{from,to}_native()` issues 2024-11-29 12:43:06 +03:00
Rémi Verschelde 88e81ee730
Fix various typos and code style issues 2024-11-28 17:40:42 +01:00
Lukas Tenbrink 884cbb5333 Don't repeat calls to strlen in split, and make splitter_length const in get_slice. 2024-11-28 01:55:48 +01:00
Thaddeus Crews 8b5f181d86
Merge pull request #90723 from Calinou/textedit-autocompletion-always-replace-if-not-shift
Make TextEdit autocompletion replace word unless Shift is held
2024-11-27 10:47:24 -06:00
BlueCube3310 88ffe07de9 Betsy: Add BC3 and BC5 support 2024-11-27 12:27:05 +01:00
Thaddeus Crews 13d59b28c1
Merge pull request #99563 from akien-mga/fix-projection-stringification
Fix stringification of Projection
2024-11-26 13:04:58 -06:00
Thaddeus Crews 0045b1a513
Merge pull request #98862 from HuntJSparra/early-projsettings-registration
Register Engine, OS, ProjectSettings, and Time singletons in time for for `INITIZATION_LEVEL_CORE`
2024-11-26 13:04:51 -06:00
Thaddeus Crews 7f3242a7e8
Merge pull request #99201 from Ivorforce/variant-get-contents-ptr
Add GDExtension `variant_get_ptr_internal_getter`, facilitating `VariantGetInternalPtr`-like behavior in GDExtension
2024-11-26 13:04:40 -06:00
Lukas Tenbrink ffd4de67d0 Add variant_get_ptr_internal_getter to gdextension_interface.h. The function returns functions to retrieve a pointer to a Variant's internal value. This enables GDExtensions to implement functionality similar to VariantGetInternalPtr, to access Variant internal values directly. 2024-11-26 02:19:03 +01:00
Rémi Verschelde f2f48aaf36
Fix stringification of Projection 2024-11-25 21:10:32 +01:00
Thaddeus Crews 9b5c7e9efa Merge pull request #99545 from KoBeWi/Vector4.0
Fix stringification of Vector4
2024-11-25 13:22:33 -06:00
Thaddeus Crews ea3154a0d4 Merge pull request #99424 from dalexeev/core-fix-builtin-enum-const-binds
Core: Fix built-in enum constant bindings
2024-11-22 14:54:31 -06:00
Thaddeus Crews 37305e40bc Merge pull request #95711 from TokageItLab/warn-oneshot-prop
Add hint for oneshot property & warning when it will be updated continuously by Force Continuous in `AnimationMixer`
2024-11-22 14:54:30 -06:00
Thaddeus Crews dcb59f0e7e Merge pull request #99548 from Repiteo/style/clang-format-19-options
Style: Add 19.1.0 LLVM options to `.clang-format`
2024-11-22 14:54:29 -06:00
Thaddeus Crews 514d73affc Merge pull request #99416 from adamscott/set-thread-count-for-single-threaded
Force `get_thread_count()` to `1` if single threaded
2024-11-22 14:54:28 -06:00
Thaddeus Crews e7b11d1c99 Merge pull request #99527 from RandomShaper/fix_threaded_trans
Make loading translations from threads safe
2024-11-22 14:54:26 -06:00
Thaddeus Crews c35e4c41d2 Merge pull request #97716 from pafuent/add_half_precision_floating_point_to_stream_peer
Add half precision floating point support to `StreamPeer` and `FileAccess`
2024-11-22 14:54:19 -06:00
kobewi e210313045 Fix stringification of Vector4 2024-11-22 21:44:30 +01:00
Rob Mayoff daa665c4cb fix copy/paste error (fixes #99518)
Replace erroneous use of `/` with `%`.
2024-11-22 13:21:02 -06:00
Thaddeus Crews e8a4b45ce4
Style: Add 19.1.0 LLVM options to `.clang-format` 2024-11-22 09:24:32 -06:00
Danil Alexeev 03b05cf9ac
Core: Fix built-in enum constant bindings 2024-11-22 14:03:21 +03:00
Pedro J. Estébanez 7a25173ff4 Make loading translations from threads safe 2024-11-22 09:44:07 +01:00
Thaddeus Crews f952bfe998
Merge pull request #98972 from dbnicholson/standardize-add-defaults
Expose `TranslationServer::standardize_locale` `add_default` param publicly
2024-11-21 17:57:01 -06:00
Dan Nicholson 6f4fadf65d Expose standardize_locale add_default param publicly
Comparing locales can have surprising outcomes since it standardizes
locales with defaults. For example, zh and zh_CN result in an exact
match since the defaults change them both to zh_Hans_CN. Expose the
add_default parameter publicly with a default of false so the fully
standardized locale can be inspected.
2024-11-21 16:50:31 -07:00
Hunt J. Sparra 48fbe4172b Register Engine, OS, ProjectSettings, and Time early. 2024-11-21 18:09:03 -05:00
Pedro J. Estébanez f79b972d0d ResourceLoader: Report appropriate error code when no suitable loader is found 2024-11-21 13:52:16 +01:00
Rémi Verschelde 9e6098432a
Merge pull request #99469 from akien-mga/revert-97370
Revert "ResourceLoader: Report error if resource type unrecognized"
2024-11-20 17:03:26 +01:00
Rémi Verschelde cfef79415b
Merge pull request #99449 from Sauermann/fix-revert-device-id-clash
Revert "Fix `InputEvent` device id clash" and add a compatibility function
2024-11-20 17:03:23 +01:00
Rémi Verschelde 23fc8e22a3
Merge pull request #95303 from EIREXE/inverted_composer
Fix `Projection::invert` for orthographic projection
2024-11-20 17:03:03 +01:00
Rémi Verschelde 219b14b905
Revert "ResourceLoader: Report error if resource type unrecognized"
This reverts commit fe21913ee8.
2024-11-20 16:50:30 +01:00
Markus Sauermann bc5e2f9b96 Revert "Fix InputEvent device id clash" and add a compatibility function
This reverts commit 916d480686.

Revert "Fix InputEvent crash when opening project"
This reverts commit abb9c0f171.

Introduce a compatibility function for projects affected by the
device id clash reversal

Since the reverted PR introduced changes in the project.godot
file, it seems prudent to introduce a compatibility function for
such affected projects.
2024-11-20 09:18:55 +01:00
Adam Scott 4988fa1ece
Force `get_thread_count()` to `1` if single threaded 2024-11-18 22:27:17 -05:00
David Snopek 2599df3b8a GDExtension: Fix method binds not saying if they are varargs 2024-11-18 13:19:22 -06:00
Thaddeus Crews 7ac9d7fec9
Merge pull request #99304 from emanvidmaker/Update-gamecontrollerdb.txt-2024
Sync controller mappings DB with SDL2 community repo [Nov 2024]
2024-11-18 09:23:47 -06:00
Thaddeus Crews 0dda6a974c
Merge pull request #99286 from KoBeWi/uid_in_a_path_factory
Support uid:// in more places
2024-11-18 09:23:44 -06:00
Thaddeus Crews 80e73b0dca
Merge pull request #98483 from timothyqiu/pack-dir-exists
`DirAccessPack`: Fix `file_exists` and `dir_exists` in exported projects
2024-11-18 09:23:37 -06:00
Álex Román 02b2efc668 Fix Projection::invert on orthogonal projections and others.
Fixes #68878, specially when using orthographic projection.

Also adds some tests.
2024-11-18 16:13:04 +01:00
A Thousand Ships 68f638cf02
Use `(r)find_char` instead of `(r)find` for single characters 2024-11-17 10:02:18 +01:00
kobewi 3b6705a641 Support uid:// in more places 2024-11-16 21:43:18 +01:00
Emanuel Acosta Gonzalez (emanvidmaker) f2d58f5d76
Sync controller mappings DB with SDL2 community repo [Nov 2024]
Synced with cfc2bffe0a
2024-11-15 21:56:25 -04:00
kobewi 0dabcd9941 Resource UID fixes and improvements 2024-11-14 16:37:54 +01:00
Pedro J. Estébanez a46ea9d064 Deprecate the pointless unsafe threading model for rendering 2024-11-14 10:43:29 +01:00
Thaddeus Crews 1627912d11
Merge pull request #98918 from bruvzg/pck_enc_iv
Allow setting custom initialization vector for FileAccessEncrypted. Add export setting to set static seed for PCK encryption initialization vectors.
2024-11-13 08:34:31 -06:00
Thaddeus Crews 8fd98b69d2
Merge pull request #99135 from Meorge/fix-unresponsive-axis-value
Replace default deadzone magic number with named constant and fix `InputEventJoypadMotion::set_axis_value` unresponsiveness
2024-11-13 08:34:10 -06:00
Thaddeus Crews 370c692bcb
Merge pull request #98706 from Nazarwadim/fix_capture_cache_was_not_cached
Fix `capture_cache.animation` was not cached
2024-11-13 08:33:54 -06:00
Pedro J. Estébanez a5caeeb664 SpinLock: Overhaul false sharing avoidance 2024-11-13 12:09:45 +01:00
Pāvels Nadtočajevs 93a21c3efc Fix PackedData::has_path() using wrong path format. 2024-11-13 09:50:10 +02:00
bruvzg 45593d45b3 Allow setting custom initialization vector for FileAccessEncrypted. Add export setting to set static seed for PCK encryption initialization vectors. 2024-11-13 08:16:12 +02:00
Thaddeus Crews 4d4353179e
Merge pull request #97218 from wenqiangwang/local_debuggger_expr_evalulation
Add support for `print` command in local (command line `-d`) debugger
2024-11-12 12:13:13 -06:00
Thaddeus Crews 179321a0a3
Merge pull request #91201 from bruvzg/con_type
[OS] Add functions to determine standard I/O device type.
2024-11-12 12:13:12 -06:00
Thaddeus Crews cc6ee3e956
Merge pull request #98713 from dalexeev/core-fix-callable-get-bound-arguments
Core: Fix `Callable.get_bound_arguments{,_count}()` return incorrect data
2024-11-12 12:13:04 -06:00
Thaddeus Crews ebf49317a2
Merge pull request #97923 from kisg/translation_server_siof_fix
Make TranslationServer singleton variable inline.
2024-11-12 12:13:01 -06:00
Malcolm Anderson 829dade53b Replace default deadzone magic number with named constant 2024-11-12 10:11:52 -08:00
Thaddeus Crews 8fd672cd87
Merge pull request #98120 from dalexeev/core-typed-dicts-bin-serialization
Core: Add typed dictionary support for binary serialization
2024-11-12 09:28:00 -06:00
Thaddeus Crews 27b394c52a
Merge pull request #98743 from dbnicholson/improve-compare-locales
Improve locale comparison
2024-11-12 09:27:54 -06:00
Thaddeus Crews d3c8e4ed5d
Merge pull request #98084 from BlueCube3310/image-cleanup-v2
Clean up Image
2024-11-12 09:27:50 -06:00
Thaddeus Crews 1cbe9715ea
Merge pull request #98969 from Faless/net/split_sockets
[Net] Split Unix/Windows NetSocket implementation
2024-11-12 09:27:40 -06:00
Dan Nicholson 2dd409fd70 Improve locale comparison
Since 9456454109, country specific locales are always preferred over
country-less locales even when the OS locale country doesn't match. For
example, running the Godot editor with locale es_ES will result in the
es_AR locale being chosen even though the es locale would be better.

The change happened because the score of the es_AR locale and the es
locale are the same when comparing to es_ES. Change this by parsing
locale strings into a Locale structure and decreasing the score when
script, country or variant are set in both but not matched. For the
es_ES case, this causes the es_AR score to be decreased since the
countries don't match. On the other hand, the es locale is not decreased
since it doesn't specify a country.
2024-11-12 06:06:50 -07:00
Pablo Andres Fuente eb86670f94 Add half precision floating point support to `StreamPeer`
Closes godotengine/godot-proposals#5983

Adds put/get methods to `StreamPeer` that handles half precision
floating point values.
Adds endode/decode half precision floating point to `marshalls`.
Adds `get_half` and `store_half` to `FileAccess`

Co-Authored-By: "Alfonso J. Ramos" <theraot@gmail.com>
2024-11-12 08:46:52 -03:00
Danil Alexeev 9ba098b670
Core: Add typed dictionary support for binary serialization 2024-11-12 10:18:56 +03:00
Thaddeus Crews 6c4c61f1b2
Merge pull request #98547 from timothyqiu/loaded-locales-set
Fix duplicated entries in `TranslationServer::get_loaded_locales()`
2024-11-11 14:18:40 -06:00
Thaddeus Crews 2ed6d12652
Merge pull request #97363 from reduz/deterministic-gen-suberesources-id
Allow passing UID to importer
2024-11-11 14:18:30 -06:00
Thaddeus Crews c8ff788052
Merge pull request #96590 from reduz/list-directory
Provide a reliable way to see original resources in a directory
2024-11-11 14:18:28 -06:00
Thaddeus Crews d76fbb7a40
Merge pull request #97356 from reduz/pck-file-removal
Add ability for PCK patches to remove files
2024-11-11 14:18:27 -06:00
Thaddeus Crews 2430b7f9b4
Merge pull request #97352 from reduz/uids-everywhere
Universalize UID support in all resource types
2024-11-11 14:18:25 -06:00
Thaddeus Crews f233d186ef
Merge pull request #93885 from dalexeev/core-fix-freed-object-booleanization
Core: Fix `Freed Object` booleanization
2024-11-11 14:18:18 -06:00
Thaddeus Crews 9be806aef1
Merge pull request #92986 from Repiteo/core/ref-instantiate-integration
Core: Integrate Ref `instantiate` where possible
2024-11-11 14:18:15 -06:00
Thaddeus Crews 30d87229ed
Merge pull request #82845 from Hysterelius/master
Color: Expose OKHSL properties
2024-11-11 14:18:04 -06:00
Thaddeus Crews bb3d5ef47c
Merge pull request #99078 from DarkMessiah/fix_callables_compare
Fix comparison of callables
2024-11-11 14:17:56 -06:00
Hysterelius 2126df2dfd
Color: Expose OKHSL properties 2024-11-11 20:41:57 +01:00
Stanislav Labzyuk 824ddeea3f Fix comparison of callables 2024-11-11 17:15:52 +01:00
Juan 2ac562cdf8 Add ability for PCK patches to remove files
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2024-11-11 16:34:37 +01:00
Juan d57846087b
Universalize UID support in all resource types
Ensures all resource types support UIDs in a project.

This is required to fix:
* Scripts and many other resource types can't be referenced by UID and when refactored the references are lost.
* Path export properties can't use UID for unsupported types.
* Refactoring problems when files are moved outside the editor (this PR effectively fixes it).
* Editor properly refreshing paths if they changed externally while opened (as example, git update).
  This needs to be addressed in a subsequent PR, but this one effectively sets the prerequisites.

Resource types that do not support UID will get a .uid file appended to them (this includes .gd, .gdshader, .gdextension, etc. files).
2024-11-11 15:59:56 +01:00
Juan fe34c45d2a
Allow passing UID to importer
This helps, for importers spitting out new resources to the res://
filesystem to actually hash them to generate deterministic UIDs.

This PR also fixes the determinism for translations.
2024-11-11 15:22:42 +01:00
Thaddeus Crews 8d1462c748
CI: Update Linux runners to Ubuntu 24.04 2024-11-10 14:05:27 -06:00
Thaddeus Crews 925b690c98
Core: Integrate `Ref::instantiate` where possible 2024-11-10 12:41:26 -06:00
Thaddeus Crews c4a52e1ade
Merge pull request #98809 from bruvzg/mac_gde_libs_non_uni
[GDExtension] Improve macOS library loading/export.
2024-11-10 12:13:06 -06:00
Thaddeus Crews 63838c936c
Merge pull request #98278 from a-johnston/fuzzy-search-rebase
Add fuzzy string matching to quick open search
2024-11-10 12:12:56 -06:00
Thaddeus Crews 155f94adc0
Merge pull request #97370 from RandomShaper/refix_rl_not_found
ResourceLoader: Report error if resource type unrecognized
2024-11-10 12:12:51 -06:00
Thaddeus Crews f3294e59e1
Merge pull request #98891 from Faless/debugger/game_view_settings
[Debugger] Better settings configuration for RuntimeNodeSelect and Window quit
2024-11-10 12:12:46 -06:00
Thaddeus Crews 7d31e16686
Merge pull request #86600 from nikitalita/fix-missing-resources
Fix `MissingResource` properties being stripped on save
2024-11-10 12:12:44 -06:00
Thaddeus Crews 01ad56da38
Merge pull request #85167 from RandomShaper/good_spinlock
Enhance SpinLock
2024-11-10 12:12:36 -06:00
Thaddeus Crews 90ce26a27b
Merge pull request #94889 from rune-scape/no-const-list-erase
Remove const_cast in `List::erase`
2024-11-10 12:12:34 -06:00
Thaddeus Crews 323b2d53d7
Merge pull request #98963 from RandomShaper/fix_classdb_deadlock
Fix deadlocks related to ClassDB queries about global classes
2024-11-10 12:12:24 -06:00
Silc Lizard (Tokage) Renew 761a20f7a7 Add hint for oneshot & warning when it will be updated continuously 2024-11-11 01:12:45 +09:00
Fabio Alessandrelli 0c620b29cd [Net] Split Unix/Windows NetSocket implementation 2024-11-10 16:13:50 +01:00
Pedro J. Estébanez 56bdef9f6f Fix deadlocks related to ClassDB queries about global classes
`ClassDB::can_instantiate()` and other reflection methods deadlock if the type is an script global class, when such script indirectly uses a not-yet-registered class. The reason is the `ClassDB` read lock is still held when invoking the `ResourceLoader` to load the class script, which may in turn need to lock for writing (for the class registration).

In particular, this happens with some types related to animation tree, that aren't registered at engine startup, but can happen with others, especially ones from the user. Registration statements are also added for the animation-related types that were lacking them.
2024-11-08 18:15:58 +01:00
rune-scape a47daa0a44 Avoid const_cast in List::erase by requiring mutable elements 2024-11-08 00:10:08 -08:00
Pedro J. Estébanez 360ed2b00d Enhance SpinLock 2024-11-08 08:06:07 +01:00
Pedro J. Estébanez 95c6a24795 Add a utility cache line size constant 2024-11-08 08:06:01 +01:00
Thaddeus Crews 671d6e3230
Merge pull request #98150 from hunterloftis/fix-default-import-threaded
Fix freeze on non-thread-safe custom importers
2024-11-07 12:36:20 -06:00
Fabio Alessandrelli 7cd850b909 [Debugger] Move quit shortcut configuration to the SceneDebugger 2024-11-07 15:03:17 +01:00
bruvzg 76164c2aa9
[OS] Add functions to determine standard I/O device type. 2024-11-06 13:33:38 +02:00
nikitalita 95d2909474 Fix missing resource properties being dropped on save 2024-11-05 11:53:29 -06:00
Danil Alexeev e379cc76e5
Core: Fix `Callable.get_bound_arguments{,_count}()` return incorrect data 2024-11-04 22:41:56 +03:00
Thaddeus Crews bb5f390fb9
Style: Apply `clang-tidy` fixes (superficial)
• `modernize-use-bool-literals`, `modernize-use-nullptr`, and `readability-braces-around-statements`
2024-11-04 12:11:14 -06:00
Thaddeus Crews 89a311205f
Style: Apply `clang-tidy` fixes
• `modernize-use-default-member-init` and `readability-redundant-member-init`
• Minor adjustments to `.clang-tidy` to improve syntax & remove redundancies
2024-11-04 12:11:06 -06:00
Pedro J. Estébanez fe21913ee8 ResourceLoader: Report error if resource type unrecognized
Co-authored-by: Summersay415 <summersay415@gmail.com>
2024-11-04 09:49:37 +01:00
bruvzg 2d66988f99
[GDExtension] Improve macOS library loading/export. 2024-11-04 09:28:30 +02:00
BlueCube3310 80a9c0d569 Clean up Image 2024-11-01 21:32:16 +01:00
A Thousand Ships ec650a2f09
[Core,Drivers] Improve use of `Ref.is_null/valid`
Use `is_null` over `!is_valid` and vice versa.
2024-11-01 16:50:11 +01:00
Thaddeus Crews c6c464cf9a
Merge pull request #98679 from Bromeon/qol/rename-static-call
Rename `ClassDB::class_call_static_method` -> `class_call_static`
2024-10-31 20:14:44 -05:00
Thaddeus Crews 363c0b5fec
Merge pull request #47502 from KoBeWi/add_0
Always add decimal when converting float to string
2024-10-31 20:14:39 -05:00
Thaddeus Crews 163bf94d04
Merge pull request #98091 from AThousandShips/improve_err_prints_core
[Core] Improve error messages with `vformat`
2024-10-31 20:14:36 -05:00
Nazarii d1dc7afdd5 Fix `capture_cache.animation` was not cached 2024-10-31 19:26:02 +02:00
Jan Haller a025ceddc0 Rename ClassDB::class_call_static_method -> class_call_static 2024-10-30 19:07:28 +01:00
A Thousand Ships 38f9769bc6
[Core] Improve error messages with `vformat` 2024-10-30 15:55:51 +01:00
Michael Alexsander 16524a8a01
Add "Game" editor for better runtime debugging 2024-10-30 11:42:17 -03:00
Thaddeus Crews a8931f1aa9
Merge pull request #98652 from stuartcarnie/2d_texture_state_fixes
2D: Fix various issues and minor performance optimisations
2024-10-29 19:25:54 -05:00
Thaddeus Crews b8f626a0e1
Merge pull request #65962 from 4d49/format-object
Add `Object` support for `String.format`
2024-10-29 19:25:45 -05:00