1
0
Fork 0
Commit Graph

1226 Commits

Author SHA1 Message Date
Thaddeus Crews acf38b2292
Merge pull request #76560 from aaronfranke/node-set-string-name
Change Node `set_name` to use StringName, slightly improves performance
2025-05-02 09:25:25 -05:00
Daniel Kinsman a0cc41b5ed
Use libjpeg-turbo for improved jpg compatibility and speed
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-05-02 11:47:56 +02:00
Aaron Franke a404b668a1
Change Node set_name to use StringName 2025-05-01 15:15:19 -07:00
Aziroshin 1a91570ce9 [Curve3D] Fix middle point forward vector when control1=end and control2=begin; issue #88923
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2025-05-01 20:54:59 +02:00
Lukas Tenbrink 1b1ab76a14 Add `FixedVector` template.
This is a high performance `Vector`-like object that can be used if the maximum number of objects is small and known, and the objects are needed only temporarily.
2025-04-30 19:14:08 +02:00
Marcos Casagrande 19540a0758 Avoid unnecessary version_get_uniform() calls 2025-04-28 15:05:59 +02:00
Thaddeus Crews 3947cbe3b2
Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Lukas Tenbrink 91fe434a86 Always use `String` as `StringName` backing internally. 2025-04-23 14:57:03 +02:00
Thaddeus Crews dd5460c32a
Style: Declare inline macros as attributes 2025-04-18 12:04:40 -05:00
Thaddeus Crews ad40939b6f
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews 3c0652699a
Merge pull request #103967 from HolonProduction/window-focus
GUI: Fix focus cycle through window
2025-04-16 10:45:17 -05:00
Thaddeus Crews 500a2243df
Merge pull request #105428 from mason1920/array-insert-test
Test for insertion at array's size
2025-04-16 10:45:14 -05:00
Thaddeus Crews 00bd421089
Merge pull request #105222 from kitbdev/fix-mouse-filter-recursive-and-rename
Fix and rename mouse filter recursive behavior and focus mode recursive behavior
2025-04-16 10:45:12 -05:00
HolonProduction 6b9641d364 Fix focus cycle through window 2025-04-15 20:24:32 +02:00
mason1920 692a244713 Test for insertion at array's size 2025-04-15 12:08:54 -04:00
Pāvels Nadtočajevs 501c64a12f
Remove `auto` misuse cases. 2025-04-14 16:54:57 +03:00
Thaddeus Crews 0d267e7b1e
Core: Add dedicated `BitField` template 2025-04-11 11:53:26 -05:00
Thaddeus Crews 717df3ee88
Merge pull request #105249 from Repiteo/core/math-defs-namespace
Core: Use `Math` namespace for constants
2025-04-11 09:51:04 -05:00
Thaddeus Crews cad0cd94ef
Merge pull request #105225 from bruvzg/ds_gdsoft
Change `DisplayServerMacOS` from `GDCLASS` to `GDSOFTCLASS`. Add `GDSOFTCLASS` to other display servers.
2025-04-10 16:53:42 -05:00
Thaddeus Crews 94282d88f9
Core: Use `Math` namespace for constants 2025-04-10 16:29:30 -05:00
Priahoud bf963e767e Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words
- refactored String::to_snake_case to work with the refactored String::_separate_compound_words
- created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion
- created String::to_kebab_case using the new String::_separate_compound_words
- created corresponding Documentation in String and StringName
- simplified both switch statements in EditorNode and ProjectDialog
- added new kebab-casing Option for Node Names in ProjectSettings
- added missing camelCase Options to Scene- and Node-Names in ProjectSettings
- simplified Mono RuntimeInterop Functions
- hooked up the ConnectionsDialog
- created additional Unit Tests
2025-04-10 21:22:21 +02:00
Thaddeus Crews cade15a163
Merge pull request #92475 from AThousandShips/string_replace_char
Add `String::replace_char(s)` methods for performance and convenience
2025-04-10 10:18:16 -05:00
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