Commit Graph

597 Commits

Author SHA1 Message Date
rsburke4 c9924b11a4 Added error to catch conversion on invalid image
(cherry picked from commit dec2269bca)
2024-01-24 18:17:18 +01:00
Alfonso J. Ramos a285553472 Do not replace starting digit with underscore when making identifier
(cherry picked from commit 5cd7ca0ccc)
2024-01-23 16:03:16 +01:00
Brian MacIntosh 04bd9cc06c "Whole Words" search can detect word boundaries inside the search term.
For example, searching for ".func" will now match in "a.func" even with Whole Words enabled.

(cherry picked from commit 676627e1d1)
2024-01-23 16:03:16 +01:00
Rémi Verschelde aae20e5b10
Fix various typos with codespell
Also includes typo fixes from #79993, #80068, #80276, and #80303.

Co-authored-by: betalars <contact@betalars.de>
Co-authored-by: spaceyjase <429978+spaceyjase@users.noreply.github.com>
Co-authored-by: Swarkin <102416174+Swarkin@users.noreply.github.com>
Co-authored-by: Raul Santos <raulsntos@gmail.com>

(cherry picked from commit faaf27f284)
2023-10-03 20:45:35 +02:00
bruvzg 88afb1a8ba [String] Fix string conversion for -0.0 float values.
(cherry picked from commit 2b3bbde6da)
2023-09-21 14:57:13 +02:00
Rémi Verschelde 269b115d9c SCons: Disable C++ exception handling
Upon investigating the extremely slow MSVC build times in #80513, I noticed
that while Godot policy is to never use exceptions, we weren't enforcing it
with compiler flags, and thus still included exception handling code and
stack unwinding.

This is wasteful on multiple aspects:

- Binary size: Around 20% binary size reduction with exceptions disabled
  for both MSVC and GCC binaries.
- Compile time:
  * More than 50% build time reduction with MSVC.
  * 10% to 25% build time reduction with GCC + LTO.
- Performance: Possibly, needs to be benchmarked.

Since users may want to re-enable exceptions in their own thirdparty code
or the libraries they compile with Godot, this behavior can be toggled with
the `disable_exceptions` SCons option, which defaults to true.

(cherry picked from commit 3907e53ff6)
2023-09-20 22:44:05 +02:00
Ryan Hitchman e7978fe277 Fix Curve3D baking up vectors for nontrivial curves.
The code was modified in 42aa539 to have a different basis vector, but
this line was missed and caused up vectors to invert sometimes.

Fixes #81879

(cherry picked from commit 734b9d2379)
2023-09-20 22:44:03 +02:00
Markus Sauermann dbae37cc50 Fix global transform validity for `Node2D` and `Control`
Set global transform to invalid when changing transform

(cherry picked from commit 152572ac38)
2023-09-20 22:44:03 +02:00
A Thousand Ships d5c246bbd3 Ensure OpenXR classes are declared properly
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
(cherry picked from commit c23bd8b143)
2023-09-20 22:44:03 +02:00
Ninni Pipping a31b866793 Fix range error for `Array.slice`
(cherry picked from commit 7752a0d8d1)
2023-08-31 19:48:16 +02:00
MewPurPur a4547db15b Fix erroneous pad_zeros warning
(cherry picked from commit cc5500f7de)
2023-07-10 17:46:09 +02:00
Rémi Verschelde 100082b3ac
Merge pull request #74760 from lassade/unicode-err-uses-replacement-char
Don't append non unicode scalar values on the string, instead use the unicode replacement char
2023-06-22 18:30:04 +02:00
angel-721 ab4e89ecde
Add HTTPClient unit tests 2023-06-21 11:53:55 +02:00
Rémi Verschelde d252f43a86
Merge pull request #78449 from Scony/add-agent-n-map-navserver-tests
Add `agent` and `map` tests for 'NavigationServer3D'
2023-06-21 10:19:24 +02:00
Pawel Lampe e1bdde911c Add `agent` and `map` tests for 'NavigationServer3D'
This commits fixes a bug in `free()` function as well.
2023-06-20 17:48:06 +02:00
Rémi Verschelde cce100a840
Merge pull request #75459 from kleonc/node-fix-find-children
Fix recursive `Node.find_children`
2023-06-19 22:33:46 +02:00
Rémi Verschelde 867ea7fe59
Merge pull request #74730 from MarioLiebisch/fix-74726
Fix read-only dictionaries adding missing keys
2023-06-19 21:38:38 +02:00
andybarcia 553f4f8dce
Improve error reporting when parsing CSV translation file
Fixes #46682.

Also fix unit test suite to separate generic FileAccess CSV testing
from using CSV as translation. And add more CSV translation tests.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-06-19 12:47:44 +02:00
Rémi Verschelde 1a62f1e4fc
Merge pull request #74741 from vnen/variant-not-for-everyone
Allow boolean operators for all Variant types
2023-06-18 16:28:10 +02:00
Rémi Verschelde 6fb391bc23
Fix various typos with codespell
And ignore some false positives introduced by recent versions of codespell.
2023-06-16 08:45:35 +02:00
Rémi Verschelde 95a9089fdd
Merge pull request #74813 from bruvzg/text_edit_autowrap
[TextEdit] Expose all auto-wrap modes.
2023-06-15 16:08:21 +02:00
Pawel Lampe b54c3e7e5e Add initial 'NavigationObstacle' and 'NavigationRegion' tests 2023-06-14 22:24:37 +02:00
Rémi Verschelde ae896bbd85
Merge pull request #78156 from Maran23/node-tests-processing-priority
Tests for the node (physics) processing and process priority
2023-06-13 10:27:40 +02:00
bruvzg 75e6ec8874
[TextEdit] Expose all auto-wrap modes. 2023-06-13 10:28:27 +03:00
Marius Hanl 60a17ba78d Tests for node (physics) processing and process priority 2023-06-13 00:19:43 +02:00
Rémi Verschelde 54b0907e67
Merge pull request #78015 from MewPurPur/Mom-can-we-have-a-new-Godot-logo-----We-have-a-new-Godot-logo-at-home-----The-new-Godot-logo-
Standardize and Optimize blue robot SVGs
2023-06-12 22:55:12 +02:00
MewPurPur a8412c12da Standardize and Optimize blue robot SVG
Co-authored-by: Andre Vallestero <39736205+AndreVallestero@users.noreply.github.com>
2023-06-12 18:12:40 +02:00
Rémi Verschelde 577ab3c565
Merge pull request #75746 from ajreckof/order_autocomplete
Sort code autocompletion with rules
2023-06-08 18:14:31 +02:00
Markus Sauermann 479f359ac4 Add unit test: mouse movement after slider release 2023-06-05 13:51:28 +02:00
Yuri Sizov 3a895eafc0
Merge pull request #77595 from Sauermann/fix-double-inputevent
Fix InputEvent being used twice
2023-05-30 15:25:36 +02:00
Markus Sauermann a9bf3de08e Fix InputEvent being used twice
A single mouse click can cause multiple actions, which contradicts
the paradigm that a single Input Event should cause only a single
action.

The solution consists of two parts:
1. Physics Picking as the last step during viewport input event
handling, currently doesn't set the event as handled. This PR sets
the event as handled in the case of physics picking.
2. After an InputEvent is processed by a SubVieportContainer, it is
sent to its parent, even if it set as handled within the SubViewport.
This PR adds an additional test to check if the event is handled
before propagating the event to the parent Control.
2023-05-29 02:39:09 +02:00
Kory Postma c8cac39446 Grayscale fix for Image::premultiply_alpha() and Image::convert(FORMAT_L8) while using REC.709, with added test case 2023-05-27 18:01:44 -05:00
Silc Renew 42aa5398d9 Fix Pathfollow direction
Co-authored-by: aaronfranke <arnfranke@yahoo.com>
2023-05-24 17:37:00 +09:00
ajreckof 006e899bb3 sort code completions with rules
Fixups

Add levenshtein distance for comparisons, remove kind sort order, try to improve as many different use cases as possible

Trying again to improve code completion

Sort code autocompletion options by similarity based on input

To make it really brief, uses a combination `String.similiary`, the category system introduced in a previous PR, and some filtering to yield more predictable results, instead of scattering every completion option at seemingly random.

It also gives much higher priority to strings that contain the base in full, closer to the beginning or are perfect matches.

Also moves CodeCompletionOptionCompare to code_edit.cpp

Co-Authored-By: Micky <66727710+Mickeon@users.noreply.github.com>
Co-Authored-By: Eric M <41730826+EricEzaM@users.noreply.github.com>
2023-05-23 05:12:34 +02:00
Biggles Bristol c920a4f051 [Fixed] for "off-by-1" bug when sampling "baked" curve data towards the end of the curve.
[Fixed] Failing test "[Curve] Custom curve with free tangents" by setting the curve's `bake_resolution` to 11.
[Fixed] test messages in "[Curve] Custom curve with free tangents" to match sample offset used in each test
[Added] New test "[Curve] Straight line offset test" in response to pull request feedback.
Update tests/scene/test_curve.h

Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2023-05-20 11:28:09 +01:00
myaaaaaaaaa c996863464 Streamline WorkerThreadPool tests and make them more robust 2023-05-17 17:33:08 -04:00
Rémi Verschelde 186aa649d2
Merge pull request #76945 from RandomShaper/fix_wtp
Fix multiple issues in `WorkerThreadPool`
2023-05-12 10:03:45 +02:00
Rémi Verschelde 863bcd3e2b
Merge pull request #76936 from clayjohn/revert-hsl
Revert "Add API for HSL conversion"
2023-05-12 10:03:21 +02:00
Pedro J. Estébanez 9077bb9232 Fix multiple issues in WorkerThreadPool
- Fix project settings being ignored.
- Made usages of `native_thread_allocator` thread-safe.
- Remove redundant thread-safety from `low_priority_threads_used`, `exit_threads`.
- Fix deadlock due to unintended extra lock of `task_mutex`.
2023-05-11 16:10:09 +02:00
Rémi Verschelde fd4a06c515
Merge pull request #76906 from lawnjelly/safe_acos4_2
Make acos and asin safe
2023-05-11 13:33:37 +02:00
lawnjelly 50c5ed4876 Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.
2023-05-11 08:34:34 +01:00
clayjohn f83a90192f Revert "Add API for HSL conversion"
This reverts commit 0b7fd664c1.
2023-05-10 17:45:56 -03:00
Alex Drozd cdf9c33c35 add unit tests for Curve3D 2023-05-10 19:12:06 +02:00
Rémi Verschelde 703a3ce7ad
Merge pull request #76830 from ajreckof/fix_wrapf_CI_with_too_big_float
fix a test for wrapf with signed 32-bit float
2023-05-10 10:20:03 +02:00
Rémi Verschelde 6bca6beea3
Merge pull request #76878 from RedworkDE/tests-fix-errors
Fix various errors when running the unit tests
2023-05-09 19:28:54 +02:00
Rémi Verschelde 0f444f101a
Merge pull request #76661 from bonjorno7/hsl
Add API for HSL conversion
2023-05-09 19:28:35 +02:00
RedworkDE 8e7afec479 Fix various errors when running the unit tests
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2023-05-09 18:40:56 +02:00
bonjorno7 0b7fd664c1 Add API for HSL conversion
Math ported pretty much 1:1 from https://en.wikipedia.org/wiki/HSL_and_HSV
Style doesn't match the existing HSV code exactly, but should be close enough.
2023-05-09 17:43:10 +02:00
ajreckof fabd9535f0 fix a test for wrapf with signed 32-bit float 2023-05-08 20:53:58 +02:00
Paulb23 0b3fba45c6 Move convert_indent into CodeEdit 2023-05-07 13:08:37 +01:00