Thaddeus Crews
6fce829fce
Merge pull request #105007 from Aziroshin/dev/aziroshin/comment-after-region-not-folding-102382
...
[CodeEdit] Fix folding for comments mixed with code region tags.
2025-04-10 10:18:14 -05:00
Thaddeus Crews
fc1dbda769
Merge pull request #105164 from stuartcarnie/apple_pthread
...
Apple: Add pthread implementation of `Thread` class
2025-04-10 10:18:12 -05:00
A Thousand Ships
889410dcda
Add `String::replace_char(s)` methods for performance and convenience
2025-04-10 13:08:45 +02:00
Pāvels Nadtočajevs
0497522933
Change `DisplayServerMacOS` from `GDCLASS` to `GDSOFTCLASS`. Add `GDSOFTCLASS` to other display servers.
2025-04-10 09:18:58 +03:00
kit
d16e8b7ca4
Fix and rename mouse filter recursive behavior
...
and focus mode recursive behavior.
2025-04-09 23:45:03 -04:00
Stuart Carnie
8c8d6de3e7
Apple: Add pthread implementation of `Thread` class
...
This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.
This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
2025-04-10 09:35:40 +10:00
Thaddeus Crews
7a6c3b309f
Merge pull request #105130 from bruvzg/uri_fix_plus
...
Add uri_file_decode to handle + in file names.
2025-04-09 18:11:56 -05:00
Thaddeus Crews
c6394a1b8b
Merge pull request #104357 from FilipeAlexCosta/control-set-position
...
Fix `Control.set_position` resizes offsets/anchors
2025-04-09 18:11:55 -05:00
Thaddeus Crews
ec675fc329
Merge pull request #100333 from YYF233333/reduce_list
...
Use `LocalVector` instead of `List` as arg of `Dictionary::get_key_list`
2025-04-09 08:51:45 -05:00
Thaddeus Crews
e6b2a42053
Merge pull request #83027 from rarysson/array-negative-indexes
...
Add negative index to `Array.remove_at` and `Array.insert`
2025-04-09 08:51:40 -05:00
Thaddeus Crews
7ae1fa0a33
Merge pull request #105157 from adamscott/test_rid_add_threads_enabled
...
Add `THREADS_ENABLED` check before RID thread tests
2025-04-09 08:51:37 -05:00
Yufeng Ying
f7e4987d0e
Dictionary::get_key_list use LocalVector instead of List.
2025-04-09 02:46:24 +08:00
Adam Scott
cba1ee1594
Add `THREADS_ENABLED` check before RID thread tests
2025-04-08 14:06:56 -04:00
Rarysson Guilherme
fe39ffeb7d
Add negative index to `Array.remove_at` and `Array.insert`
2025-04-08 14:55:39 -03:00
Thaddeus Crews
80e7f1a6d7
Merge pull request #105144 from Ivorforce/file-access-crompressed-size
...
Fix `FileAccessCompressed` claiming one byte more than it actually has.
2025-04-08 12:32:49 -05:00
Pāvels Nadtočajevs
b106dfd4f9
Base accessibility API.
2025-04-08 20:14:28 +03:00
Lukas Tenbrink
68f4502a5b
Fix `FileAccessCompressed` claiming one byte more than it actually has.
...
Add a unit test for fastlz compressed file access.
2025-04-08 15:19:58 +02:00
Pāvels Nadtočajevs
9abe2e5294
Add `uri_file_decode` to handle `+` in file names.
2025-04-07 23:49:17 +03:00
Aziroshin
40b7931279
[CodeEdit] Fix folding for comments mixed with code region tags.
...
Co-authored-by: Kit Bishop <kitbdev@gmail.com>
2025-04-07 20:50:54 +02:00
Thaddeus Crews
21db8487a2
Merge pull request #104664 from tomfull123/missing-typed-dictionary-initializer-list
...
Add missing `initializer_list` constructor to TypedDictionary
2025-04-03 16:50:23 -05:00
Thaddeus Crews
b1465b925b
Merge pull request #104976 from Ivorforce/no-inheritance-list
...
Remove unused `get_inheritance_list_static` from `GDCLASS`.
2025-04-03 16:50:20 -05:00
Thaddeus Crews
9bbda47794
Merge pull request #104776 from BrotherShort/TextEdit-VScroll-max-tolerance
...
Fix TextEdit VScroll max tolerance
2025-04-03 16:50:14 -05:00
Lukas Tenbrink
e6d166344b
Remove unused `get_inheritance_list_static` from `GDCLASS`.
2025-04-03 17:18:28 +02:00
BrotherShort
1077fdb15a
fix TextEdit VScroll max tolerance
...
newline
Co-Authored-By: Kit Bishop <kitbdev@gmail.com>
2025-04-03 21:22:57 +08:00
Tom
8a3f9846c5
Add missing initializer_list constructor for TypedDictionary
2025-04-03 00:17:44 +01:00
Thaddeus Crews
c9c8556a47
Merge pull request #104862 from smix8/navserver_process
...
Prepare NavigationServer for `process()` and `physics_process()` split
2025-04-02 07:37:32 -05:00
smix8
16fd7b6ae1
Prepare NavigationServer for process() and physics_process() split
...
Prepares the NavigationServer API for a split of its functionality between frame process() and stepped physics_process().
2025-04-02 11:01:08 +02:00
smix8
f2197a1013
Expose TriangleMesh api functions wrapped for scripting
...
Adds script wrapped TriangleMesh api functions to create and query the triangle BVH tree.
2025-04-02 09:52:35 +02:00
Thaddeus Crews
1f1b1c56e7
Merge pull request #104381 from Ivorforce/object-notification-nobool
...
Optimize `Object::notification` by avoiding runtime branches
2025-04-01 19:53:37 -05:00
Michael Alexsander
556933306a
Allow to compile templates without navigation features
2025-04-01 11:53:35 -03:00
Lukas Tenbrink
8a76e31547
Remove bool from `Object::notification` virtual function; replace with separate functions to avoid branching.
2025-04-01 15:26:32 +02:00
Thaddeus Crews
d52b84e472
Merge pull request #103993 from aaronfranke/geometry-segment
...
Directly use segment points in Geometry2D/3D function parameters
2025-04-01 08:01:34 -05:00
Thaddeus Crews
abd565eb19
Merge pull request #104844 from Ivorforce/gdsoftclass
...
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 19:02:03 -05:00
Lukas Tenbrink
fa0a3c9c6e
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 20:49:50 +02:00
Lukas Tenbrink
ccdc5862e9
Add `LocalVector.erase_unordered`, mimicking `erase` but with `remove_at_unordered`, to remove duplicate logic.
...
`erase_unordered` should be preferred over `erase` where order is not important, for its performance benefits.
Co-authored-by: smix8 <smix8@users.noreply.github.com>
2025-03-31 13:31:53 +02:00
Filipe Alexandre Francisco Costa
ca57fe1db4
Fix #100536 : Control set_position resizes offsets/anchors
...
The set_position method computes the anchors/offsets to match a
rectangle at the given position with size "size_cache". However, when
the Control's combined minimum size is larger than the size obtained
through the offsets and anchors, "size_cache" is set to be as large as
the combined minimum size. Therefore, when position is set while the
combined minimum size is larger than the rectangle given by the anchors
and offsets, it would resize these two fields, which would then stop
the Control from shrinking when its combined minimum size decreased. To
fix this, set_position now uses the size given by the offsets and
anchors instead of the "size_cache" field. This way, the rectangle
denoted by the offsets and anchors is simply moved, without being
resized, enabling the Control to shrink automatically when its combined
minimum size decreases. I also added a test case to ensure that the
Control shrinks correctly after setting its position while it has a
larger custom minimum size than the one obtained through the offsets
and anchors.
2025-03-31 08:50:00 +01:00
Aaron Franke
c1acc839a8
Directly use segment points in Geometry2D/3D function parameters
2025-03-30 16:25:59 -07:00
Thaddeus Crews
ac13efc822
Merge pull request #101443 from Repiteo/ci/replace-pytest
...
CI: Replace pytest with pre-commit hook
2025-03-30 09:06:00 -05:00
Thaddeus Crews
8b2952a71c
Merge pull request #101504 from AThousandShips/nav_split_new
...
[Navigation] Create a dedicated 2D navigation server
2025-03-30 09:05:43 -05:00
Thaddeus Crews
32de6285a8
SCons: Modernize shader builders
2025-03-29 11:51:54 -05:00
Thaddeus Crews
adc63c6149
CI: Replace pytest with pre-commit hook
2025-03-29 11:40:36 -05:00
Thaddeus Crews
780cf03051
Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse
...
Use `append_` instead of `parse_` for `String` methods.
2025-03-29 10:16:33 -05:00
A Thousand Ships
5cc0539961
[Navigation] Create a dedicated 2D navigation server
...
* Add a dedicated 2D server
* Create dedicated tests
* Split performance metrics between 2D and 3D
* Rename the 3D only server module
2025-03-29 12:10:50 +01:00
Rémi Verschelde
7598b08ec2
Merge pull request #104709 from kitbdev/remove-macro-testfontfile
...
Remove macros from FontFile test case
2025-03-28 17:30:52 +01:00
Rémi Verschelde
e8bc75f056
Merge pull request #103373 from YeldhamDev/build_remove_physics
...
Allow to compile templates without physics servers
2025-03-28 17:30:03 +01:00
Rémi Verschelde
3b90bb56ad
Merge pull request #89782 from KoBeWi/stdArrayList
...
Use initializer list in Arrays
2025-03-28 17:29:40 +01:00
kit
3bba00a4b3
Remove macros from FontFile test
2025-03-28 11:28:47 -04:00
Michael Alexsander
5ad414d046
Allow to compile templates without physics servers
2025-03-28 11:00:44 -03:00
Rémi Verschelde
76c30189fa
Merge pull request #103923 from Ivorforce/span-array-init
...
Add C array constructor to `Span`.
2025-03-28 14:32:14 +01:00
Lukas Tenbrink
ffa6ef220b
Use `append_` instead of `parse_` for `String` methods.
2025-03-27 17:51:02 +01:00
kobewi
75881f8322
Use initializer list in Arrays
2025-03-26 18:38:15 +01:00
Thaddeus Crews
f810c74c19
Merge pull request #104221 from Teschnique/fix-issue-100590
...
Fix tangent baking for curves when cubic derivatives are 0
2025-03-24 10:01:02 -05:00
Thaddeus Crews
7fed5f29ed
Merge pull request #99826 from kiroxas/improveParseUTF8Performance
...
Improve `parse_utf8` performance
2025-03-24 10:00:55 -05:00
Teschnique
a6dc345415
Fix tangent baking for curves where the derivative evaluates to 0 due to
...
collinear control points.
2025-03-21 23:02:24 -07:00
Thaddeus Crews
f6a35e2a6e
Merge pull request #86015 from kitbdev/array-initializer-list
...
Add list initialization to Array, Variant, and TypedArray
2025-03-19 17:46:06 -05:00
kobewi
10f6c01b9c
Remove ABS in favor of Math::abs
2025-03-19 13:52:40 +01:00
Rémi Verschelde
2fa721b1bc
Merge pull request #104127 from Ivorforce/360-noclip
...
Remove `String` clipping constructors.
2025-03-19 12:27:10 +01:00
Rémi Verschelde
3b8385a6be
Merge pull request #101824 from bruvzg/wrap_align
...
[TextEdit] Use actual indentation offset instead of space width for wrapped lines.
2025-03-19 12:26:20 +01:00
Pāvels Nadtočajevs
2fb5059c63
[TextEdit] Use actual indentation offset instead of space width for wrapped lines.
2025-03-19 12:50:43 +02:00
Pablo Andres Fuente
e2bef7041e
Fix `StreamPeerGZIP::finish()` internal buffer size usage
...
Fixes #97201
Instead of using and arbitrary fixed size for the internal buffer,
the remaining available bytes of the internal `RingBuffer` is used.
Also add unit tests for `StreamPeerGZIP`.
2025-03-19 09:56:32 +01:00
Thaddeus Crews
b7eda9dbc1
Merge pull request #104230 from bruvzg/start_clip
...
Add properties to configure space trimming on line break.
2025-03-18 14:42:44 -05:00
Thaddeus Crews
ea62170dac
Core: Add `constexpr` constructors/operators to math structs
...
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
Pāvels Nadtočajevs
2bbf0f2317
Add properties to configure space trimming on line break.
2025-03-16 16:15:37 +02:00
Lukas Tenbrink
a23f630781
Remove `String` clipping constructors.
...
Callers should instead call constructors with explicit encoding names, with known length `Span`.
2025-03-15 12:34:44 +01:00
Thaddeus Crews
b377562b52
Merge pull request #91660 from AThousandShips/methodinfo_vec
...
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-14 10:06:13 -05:00
Thaddeus Crews
22a7079afd
Merge pull request #104047 from YYF233333/dict_iter
...
Add const iteration support to `Dictionary`
2025-03-13 08:57:23 -05:00
Thaddeus Crews
c6004c6267
Merge pull request #102100 from AThousandShips/nav_split_prepare
...
[Navigation] Rename classes in preparation for future restructure
2025-03-12 13:17:11 -05:00
Yufeng Ying
bebe037abf
Add ConstIterator to Dictionary.
2025-03-13 01:28:46 +08:00
Lukas Tenbrink
78221946cc
Add C array constructor to `Span`. [skip ci]
2025-03-12 16:48:16 +01:00
Thaddeus Crews
3fc5390c8b
Merge pull request #103924 from Ivorforce/span-iteration
...
Add iteration to `Span`.
2025-03-12 10:31:53 -05:00
A Thousand Ships
b064fcf547
[Navigation] Rename classes in preparation for future restructure
2025-03-12 13:26:34 +01:00
Thaddeus Crews
754e3b3f9a
Merge pull request #103825 from JulianHeuser/region_highlight_crash_fix
...
Fix crash related to #region/#endregion caused by trailing spaces
2025-03-11 19:54:46 -05:00
Lukas Tenbrink
55a7de93c7
Add iteration to `Span`.
2025-03-11 23:46:25 +01:00
Thaddeus Crews
e30d3af34e
Merge pull request #102766 from smix8/region_filters
...
Add path query region filters
2025-03-11 16:54:05 -05:00
Thaddeus Crews
f8b45830aa
Merge pull request #94798 from AThousandShips/api_check_args
...
[Tests] Add check for argument name validity
2025-03-11 16:53:47 -05:00
Thaddeus Crews
75f131e047
Merge pull request #99632 from wheatear-dev/augment-tests-option-button
...
Augment unit tests for `OptionButton`
2025-03-11 09:34:44 -05:00
Julian
659d1b5d0c
Fix crash caused by trailing spaces
2025-03-11 00:06:08 -04:00
Thaddeus Crews
8d1c1c5867
Merge pull request #92476 from AThousandShips/string_remove_char
...
Add `String::remove_char(s)` methods for performance and convenience
2025-03-10 10:01:04 -05:00
A Thousand Ships
66e9c2f998
[Tests] Add check for argument name validity
...
Checks that all method and signal arguments have valid names
2025-03-10 14:57:21 +01:00
A Thousand Ships
d9721954e6
[Core] Use `Vector` for `MethodInfo::arguments`
2025-03-10 13:57:53 +01:00
A Thousand Ships
331a43a9d8
Add `String::remove_char(s)` methods for performance and convenience
2025-03-10 13:19:28 +01:00
Lukas Tenbrink
605b62cd29
Add `Span` struct (replacing `StrRange`). Spans represent read-only access to a contiguous array, resembling `std::span`.
2025-03-09 18:19:51 +01:00
A Thousand Ships
466590d0ec
Use `get_slicec` instead of `get_slice` for single character splitters
2025-03-08 20:36:37 +01:00
Thaddeus Crews
324512e11c
Style: Replace header guards with `#pragma once`
2025-03-07 17:33:47 -06:00
Thaddeus Crews
96fdaa616b
Style: Integrate `#pragma once` in builders/checks
2025-03-07 17:32:33 -06:00
Thaddeus Crews
47761b1bbe
Merge pull request #81503 from matorin57/font-tests
...
Add getter tests for dynamic fonts
2025-03-07 15:12:27 -06:00
Thaddeus Crews
c937b6d180
Merge pull request #102419 from Ivorforce/std-size
...
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-03-07 15:12:25 -06:00
Thaddeus Crews
9e7fbdf52b
Merge pull request #103663 from pafuent/fixing_errors_warnings_output_on_tests
...
Fix `SCRIPT ERROR/ERROR/WARNING` on test output
2025-03-07 15:12:11 -06:00
Thaddeus Crews
3d816853e5
Merge pull request #100209 from Flarkk/simplify_fix_projection
...
Simplify and fix `Projection`'s getter functions
2025-03-06 16:36:19 -06:00
Florent Guiocheau
1d416fc2ba
Simplify and fix `Projection`'s getter functions
2025-03-06 16:48:01 +01:00
Pablo Andres Fuente
5775d29ad8
Fix `SCRIPT ERROR/ERROR/WARNING` on test output
...
Also "fixing" some GDScript completion tests which
where named wrongly.
2025-03-06 13:44:48 +01:00
Thaddeus Crews
a1e2dd15af
Merge pull request #101077 from Rindbee/fix-ui-navigation-break
...
Fix ui navigation break
2025-03-05 12:07:56 -06:00
Thaddeus Crews
030cc9945e
Merge pull request #102854 from bruvzg/brk_trim3
...
[TextServer] Fix space trimming on line break.
2025-02-14 08:25:33 -06:00
Pāvels Nadtočajevs
c03aa4b563
[TextServer] Fix space trimming on line break.
2025-02-14 14:40:37 +02:00
girdenis-p
577ee919d4
Add tests for control to test anchoring and minimum size
2025-02-13 16:08:39 +00:00
smix8
9dfeabc92a
Add path query region filters
...
Adds filter lists to exclude or include specific regions in path queries.
2025-02-13 15:05:34 +01:00
DESKTOP-UT43QTQ\Garrigan-Desktop
2bfca8e9c2
Added getter tests for dynamic fonts
2025-02-12 18:45:44 -06:00
Rémi Verschelde
0d4d70d5a6
Merge pull request #102587 from bruvzg/s_pa_tst
...
[Tests] Add `Packed*Array` `to_byte_array` variant call tests.
2025-02-11 10:54:14 +01:00
Pablo Andres Fuente
d1338528f9
Fix file loggin log rotation
...
Fixes #97066
`RBSet` were used on `RotatedFileLogger` because it guarantees that
iterating it is done via `operator<`. This is important because
`RotatedFileLogger` depends on this behavior to delete the oldest log file.
On #61194 `HashSet` was added and all `RBSet` uses were replaced by
`HashSet`.
When that happened, the iteration in order is guaranteed to be the insertion
order, wich made that `RotatedFileLogger` delete the newest log file.
As a bonus, I added unit test for `RotatedFileLogger` and `CompositeLogger`.
2025-02-10 21:57:07 +01:00
Pāvels Nadtočajevs
7f7f12dad3
[Tests] Add Packed*Array to_byte_array variant call tests.
2025-02-08 17:40:50 +02:00
Lukas Tenbrink
e34f1f504c
Use `std::size` instead of `sizeof(a) / sizeof(a[0])` pattern throughout the codebase.
2025-02-07 14:57:48 +01:00
Thaddeus Crews
f0f5319b0b
Merge pull request #100107 from Faless/fix/net_tests
...
[Net] Fix TCP/UDP server network tests
2025-02-05 18:50:44 -06:00
Pāvels Nadtočajevs
b50d9742c2
Fix `is_valid_float`, `Variant` parser, `Expression` parser, script highlighter, and `TextServer` not handing capital E in scientific notation.
2025-02-05 18:39:40 +02:00
bruvzg
3be46a69c4
Fix uppercase B and X parsing in the integer literals.
2025-02-05 16:02:06 +02:00
Adam
d56cbd374b
Fix `Basis::get_euler` incorrectly simplifying rotations in some cases.
2025-01-29 16:13:29 -06:00
风青山
343b37dfc1
Add unit tests for control focus navigation
...
Users can navigate focus between controls using `ui_focus_next` or
`ui_focus_prev actions`. Add unit tests for these behaviors.
2025-01-29 20:51:02 +08:00
Thaddeus Crews
c032ce4050
Merge pull request #101613 from kitbdev/fix-te-hover-mouse-exit
...
Fix TextEdit breakpoint hover not hiding on mouse exit
2025-01-22 16:32:24 -06:00
Silc Lizard (Tokage) Renew
27e23280c5
Fix Quaternion arc constructor to check dot & Add test for same vec3s
2025-01-20 18:16:53 +09:00
kit
8274e64402
Fix TextEdit breakpoint hover not hiding
2025-01-16 10:42:54 -05:00
Pāvels Nadtočajevs
43bc44e3b0
[TextServer] Fix text buffer not processing strings added after `shape`.
2025-01-16 08:57:27 +02:00
Rémi Verschelde
35080c6df3
Merge pull request #100970 from anknetau/ank/godot-add-test-cases-for-uid-strings
...
Add some tests for `uid://` encoding and decoding
2025-01-10 23:05:59 +01:00
Rémi Verschelde
ad74e337b9
Merge pull request #100954 from Bromeon/bugfix/nodepath-slice
...
Fix `NodePath::slice()` incorrect behavior for subname indexing
2025-01-10 23:05:56 +01:00
Andres Kievsky
2b5dd99d72
Add some tests for uid:// encoding and decoding
2025-01-10 23:41:12 +11:00
Nazarii
8bfb5d74b3
Use LocalVector for Curve and Gradient
2025-01-09 14:25:21 +02:00
Aarni Koskela
f134769506
Fix various typos
...
* Add TODO notes for typos that should be fixed for 5.0
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-08 14:47:42 +02:00
Yufeng Ying
34d8255947
Force build editor with regex module, remove checking code.
...
Fix include.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-01-07 19:43:23 +08:00
Rémi Verschelde
4cf02312f6
Merge pull request #101136 from JulianHeuser/master
...
Add test for GLTFDocument
2025-01-07 00:45:14 +01:00
Rémi Verschelde
653f5a9613
Merge pull request #100976 from AThousandShips/uid_fixes
...
[Core] Fix UID encoding
2025-01-06 22:48:13 +01:00
Rémi Verschelde
af01694779
Merge pull request #100492 from bruvzg/txt_mbrk_trim
...
[TextServer] Fix space trimming around mandatory line breaks.
2025-01-06 22:47:38 +01:00
Julian
5727eda0e1
GLTFDocument test case
2025-01-06 15:53:33 -05:00
Rémi Verschelde
1aaf20b1f1
Merge pull request #98488 from RandomShaper/lockless_rid_fetch_pro
...
Fix `RID_Owner` synchronization
2025-01-06 08:38:14 +01:00
Pedro J. Estébanez
de7e4efef8
Fix RID_Owner synchronization
2025-01-03 17:05:36 +01:00
Rémi Verschelde
d47fef15b8
Merge pull request #100991 from TokageItLab/180deg-arc
...
Fix looking at with 180 degree arc
2025-01-03 00:49:59 +01:00
Rémi Verschelde
dd7d36e803
Merge pull request #100770 from hpvb/command-queue-mt
...
Core: Refactor CommandQueueMT to use vararg templates for performance and maintainability
2025-01-03 00:49:02 +01:00
HP van Braam
cccd2432c3
Refactor CommandQueueMT to use vararg templates
...
In order to make CommandQueueMT more maintainable this PR changes the
previous macro hell with variadic templates instead. This makes the
class far more explicit and will allow us to more easily change the way
the class functions in the future.
Furthermore this refactoring has allowed for some optimizations. In
particular by using std::forward to delay the decision of decaying the
type to as late as possible we are able to move the data from the
callsite into our Command buffer and later move it to the call.
In practice what this means is that compared to the old version instead
of copying values 3 times, we can now get away with 1 copy, and 1 move
for lvalues, and just 2 moves for rvalues. This saves quite a few
operations in a hot codepath.
We also now test to make sure that the amount of copies and moves are
what we expect. This way we can spot performance regressions in this
code easily.
Somewhat unscientifically, running TPS-demo by pressing enter and not
touching the controls average mspf, repeatable across many runs:
before: 6.467
after : 6.202
2025-01-02 15:35:08 +01:00
Silc Lizard (Tokage) Renew
d0c421976c
Fix looking at with 180 degree arc
...
Co-authored-by: Fruitsalad <949631+fruitsalad@users.noreply.github.com>
2025-01-02 15:47:01 +09:00
AThousandShips
25ecf5ec83
[Core] Fix UID encoding
...
Fixes edge case where `0` encoded as `uid://` instead of `uid://a`, and
fixes the size of the temporary buffer storing encoded UID strings.
2024-12-31 15:20:09 +01:00
Jan Haller
df66ea74d7
Fix `NodePath::slice()` incorrect behavior for subname indexing
...
Adjust slice boundaries in `NodePath` logic to correctly handle subnames.
Update test cases to reflect these changes.
2024-12-30 21:22:26 +01:00
Thaddeus Crews
a9b6b3d932
Merge pull request #100776 from AThousandShips/improve_null_checks
...
Improve use of `Ref.is_null/valid`
2024-12-29 09:35:04 -06:00
Hendrik Brucker
16233db6bf
Ensure that directory exists in create_test.py
2024-12-28 01:39:09 +01:00
A Thousand Ships
a1846b27ea
Improve use of `Ref.is_null/valid`
...
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
Thaddeus Crews
08d4dd7fd8
Merge pull request #100694 from Ivorforce/cowdata-destruct-graciously
...
Destruct `CowData` more graciously by avoiding accidentally exposing a half-destructed buffer.
2024-12-23 11:15:18 -06:00
smix8
d51615b334
Change navigation map synchronization to an async process
...
Changes the navigation map synchronization to an async process to avoid stalling the main thread.
2024-12-22 02:03:59 +01:00
Lukas Tenbrink
25cd923ea1
Destruct `CowData` more graciously by avoiding accidentally exposing a half-destructed buffer. This can avoid problems if any of the destructed objects tries to access the data while it's being destructed.
2024-12-21 20:01:03 +01:00
Rémi Verschelde
dac0b67c4d
Merge pull request #100659 from clayjohn/color-srgb-precision
...
Increase precision in `linear_to_srgb()` and `srgb_to_linear()`
2024-12-20 23:57:35 +01:00
Rémi Verschelde
87855e04ad
Merge pull request #100643 from ze2j/follow_up_of_array_mesh_surface_remove
...
Follow-up of `ArrayMesh::surface_remove` addition
2024-12-20 23:57:20 +01:00
Rémi Verschelde
a11364d1e6
Merge pull request #99010 from Hilderin/embedding-game-process
...
Embed game process in editor
2024-12-20 23:56:43 +01:00
clayjohn
46ce499b6f
Increase precision in linear_to_srgb and srgb_to_linear
...
This avoids the situation where white stops being white after conversion. While maintaining as much floating point ops as possible
2024-12-20 10:49:43 -07:00
ze2j
97b093617d
Follow-up of ArrayMesh::surface_remove addition
2024-12-20 10:53:43 +01:00
Thaddeus Crews
b715fabd70
Merge pull request #76371 from ze2j/array_mesh_surface_remove
...
Add `ArrayMesh::surface_remove`
2024-12-19 19:59:56 -06:00
Thaddeus Crews
361e3b4fe8
Core: Expand `std::initializer_list` support
2024-12-18 18:46:59 -06:00
Hilderin
9d2a4c03be
Embedding game process in editor
2024-12-18 17:52:42 -05:00
Rémi Verschelde
851d8e49e8
Merge pull request #100386 from hpvb/core-ubsan
...
Core: Fix UBSAN reports
2024-12-18 17:23:32 +01:00
HP van Braam
240f510fa7
Core ubsan fixes
...
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.
These fixes apply only to errors reported, and caused by, core/
The following things have been changed:
* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
the API cannot pass in wrongly-sized values leading to potential stack
corruption.
* Ensure that memcpy is never called with invalid or null pointers as
this is undefined behavior, and when the engine is built with
optimizations turned on leads to memory corruption and hard to debug
crashes.
* Replace enum values only used as static values with constexpr static
const values instead. This has no runtime overhead. This makes it so
that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
verify the new behavior. The behavior doesn't quite match master in
particulary for negative doubles as the original code tried to cast -inf
to an int. This then led to negative doubles losing all but one of
their decimal points when serializing. Behavior in GDScript remains
unchanged.
2024-12-18 14:31:12 +01:00
kit
63a90b3dd8
Add tests for SplitContainer
2024-12-17 18:16:52 -05:00
Rémi Verschelde
0ce9e3e941
Merge pull request #98504 from timothyqiu/test-keyevent-rtr
...
Fix `InputEventKey` test failure under certain system languages
2024-12-17 16:18:46 +01:00
Pāvels Nadtočajevs
7c182a1544
[TextServer] Fix space trimming around mandatory line breaks.
2024-12-16 23:37:26 +02:00
Kiro
e4f8a7f8cf
improveParseUTF8Performance
2024-12-16 09:55:11 +01:00
Thaddeus Crews
2b41a217d2
Merge pull request #100259 from Sauermann/proposal-right-click-cancel-drag
...
Allow canceling drag-and-drop with right mouse button
2024-12-11 17:35:39 -06: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
Markus Sauermann
4d6a6b21e2
Allow canceling drag-and-drop with right mouse button
...
This is a small usability enhancement, that allows users to cancel
drag-and-drop without the need to press the escape key on the keyboard.
2024-12-11 00:13:54 +01: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
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
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
e06f699354
Merge pull request #99886 from ZhiyiHu93/update-sky-tests
...
Add unit tests for Sky
2024-12-09 14:33:20 -06:00
Fabio Alessandrelli
e5807b2adf
[Net] Fix TCP/UDP server network tests
...
Some tests have been removed since there's no way to guarantee they will
pass.
Other tests have been refactored to ensure proper waiting, and taking
into account potential out-of-order delivery (which is unlikely in test
scenarios but expecting a specific order on a UDP socket is wrong and
OSes makes no promises of ordered delivery on localhost).
2024-12-06 18:00:49 +01:00
Zhiyi Hu
1e62c7f53e
Add unit tests to Sky
2024-12-06 10:31:17 -05:00
Rémi Verschelde
aa8d9b83f6
Merge pull request #99960 from pafuent/fixing_tcp_server_flappy_disconnect_test
...
Fix `TCPServer` "Should disconnect client" test
2024-12-06 16:16:17 +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
30b32396de
Merge pull request #100053 from bruvzg/font_change
...
Change default Arabic font to Vazirmatn.
2024-12-05 14:12:14 -06:00
Pāvels Nadtočajevs
06cae04b87
Change default Arabic font to Vazirmatn.
2024-12-05 16:26:52 +02:00
DeeJayLSP
eaa0418deb
TestAudioStreamWAV: use runtime load instead of importer
2024-12-04 18:44:48 -03:00
Pablo Andres Fuente
df2c2ca3c3
Fix TCPServer "Should disconnect client" test
...
"Should disconnect client" test was failing randomly on Mac CI tests, so
this PR is making it more reliable reading on the closed client instead of
writing to it
2024-12-03 09:46:37 -03:00
demolke
35bb827d10
Destroy EditorFilesystem/EditorSettings on test shutdown
...
Otherwise asan complains if a test tries to use these.
Split off from https://github.com/godotengine/godot/pull/98909
2024-12-02 19:34:39 +01:00
Rémi Verschelde
5836a24a1c
Merge pull request #99488 from bruvzg/te_brk_cases
...
[TextServer] Fix some line breaking edge cases.
2024-12-02 17:20:15 +01:00
Rémi Verschelde
90087476a3
Merge pull request #99726 from smix8/path_simply_test
...
Add test for NavigationServer path simplification
2024-12-02 15:51:25 +01: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
Rémi Verschelde
8d3fc48abf
Merge pull request #97521 from pafuent/enhance_scroll_container_focus
...
Add a focus border on `ScrollContainer`
2024-11-29 22:46:09 +01:00
Rémi Verschelde
5d462ee4c5
Merge pull request #67857 from anvilfolk/extended-curve
...
Extend Curve to allow for domains outside of [0, 1].
2024-11-29 22:45:19 +01:00
Rémi Verschelde
bcb5f8377f
Merge pull request #99125 from Flarkk/projection_tests
...
Add tests for `Projection`
2024-11-29 22:01:59 +01:00
Rémi Verschelde
94082a424b
Merge pull request #97303 from cixil/fix-duplicate-signal-bug
...
Avoid duplicating signals from scene instances into packed scenes
2024-11-29 22:01:51 +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
Pablo Andres Fuente
0c03db09f8
Add unit tests for TCPServer
...
This PR aims to help "fix" #43440
2024-11-29 12:55:49 +01:00
Danil Alexeev
bd1a35ce9e
Core: Fix `JSON.{from,to}_native()` issues
2024-11-29 12:43:06 +03:00
Thaddeus Crews
3edf8b91e9
Merge pull request #98489 from Flarkk/fix_project_position
...
Fix Camera3D::project_position() when depth=zfar
2024-11-27 10:47:07 -06:00
ze2j
97e0b43faa
Add ArrayMesh::surface_remove
2024-11-27 13:46:15 +01:00
Florent Guiocheau
f1f47c3a53
Add tests for `Projection`
2024-11-27 11:09:10 +01:00
smix8
b2e40829a8
Add test for NavigationServer path simplification
...
Adds test for NavigationServer3D.simplify_path() function.
2024-11-26 23:36:25 +01:00
Pāvels Nadtočajevs
0708048530
[TextServer] Fix some line breaking edge cases.
2024-11-25 10:31:07 +02:00
Edward Moulsdale
fe416c8046
Augment unit tests for OptionButton
2024-11-24 16:23:50 +00:00
Pablo Andres Fuente
86ea0127a3
Add a focus border on `ScrollContainer`
...
Also added new unit tests for `Control`.
Co-authored-by: ator-dev <dominic.codedeveloper@gmail.com>
2024-11-23 23:54:38 -03:00
Pablo Andres Fuente
2c9de1d9d2
Add unit tests for UDPServer
...
This PR aims to help "fix" #43440
2024-11-22 23:08:05 -03: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
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
Danil Alexeev
03b05cf9ac
Core: Fix built-in enum constant bindings
2024-11-22 14:03:21 +03: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
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
Thaddeus Crews
32b4f40cc8
Merge pull request #99131 from MarcusAahl/my-testing-branch
...
Add basic tests for Fontfile
2024-11-19 15:20:17 -06:00
marcus åhl
c636c86f65
Basic Fontfile tests
2024-11-19 11:56:26 +01:00
Thaddeus Crews
d72112ba0a
Merge pull request #98816 from arkology/to-infinity-and-beyond
...
Improve `TextureProgressBar.set_radial_initial_angle()` by removing loops
2024-11-18 09:23:28 -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
arkology
d692b7bdde
Improve set_radial_initial_angle by removing loops
...
Replace two while loops with fposmodp.
Document radial_initial_angle wrapping.
Add testcases for set_radial_initial_angle()
2024-11-14 20:20:20 +03: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
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
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