Compare commits

...

635 Commits
master ... 4.1

Author SHA1 Message Date
Rémi Verschelde 488757bd00
CI: Fix support for latest codespell
(cherry picked from commit 7132627666)
2024-07-05 13:34:01 +02:00
A Thousand Ships eb296c7f9c
[Doc] Fix incorrect reference to `input_pickable`
(cherry picked from commit d8cd7b2f9f)
2024-05-07 14:49:01 +02:00
Yuri Sizov 6c9f2f7109
Fix a property reference in EditorSpinSlider
(cherry picked from commit d9c980f1cf)
2024-05-07 13:49:47 +02:00
Rémi Verschelde 1ef40f418e
Merge pull request #91353 from bruvzg/41_ios_privacy
[4.1, iOS export] Add support for privacy manifest configuration.
2024-04-30 16:40:27 +02:00
bruvzg 5685756576
[4.1, iOS export] Add support for privacy manifest configuration. 2024-04-30 10:34:29 +03:00
Rémi Verschelde 845fb92b03
Merge pull request #91157 from akien-mga/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.5) - 1st batch
2024-04-29 11:44:54 +02:00
Rémi Verschelde dc3a97a2c6
Fix GCC 14 -Wtemplate-id-cdtor warnings
Fixes #91206.

(cherry picked from commit a8ff47b6d6)
2024-04-26 11:56:59 +02:00
A Thousand Ships 7d9c3520a4
[CI] [macOS] Build for both `arm64` and `x86_64`
Creates a universal build, to catch discrepancies on different
architectures

(cherry picked from commit 24ad73b13f)
2024-04-25 14:43:16 +02:00
Rémi Verschelde 891c609d2e
Sync controller mappings DB with SDL 2 community repo
Synced with mdqinc/SDL_GameControllerDB@5b4efa3a20

(cherry picked from commit 1da02fa7be)
2024-04-25 13:05:01 +02:00
Rémi Verschelde ddaafbe81f
Bump version to 4.1.5-rc 2024-04-17 17:21:03 +02:00
Rémi Verschelde fe0e8e5575
Bump version to 4.1.4-stable 2024-04-16 14:04:03 +02:00
Yorick de Wid 943b394946
FIX: Return if TCP is in STATUS_CONNECTED
If the `StreamPeerTCP` is polled and the TCP connection is `STATUS_CONNECTED` it should return after polling netsocket. Without `return` poll keeps calling `_sock->connect_to_host` and `connect()`.

(cherry picked from commit 61a2f5c534)
2024-04-16 13:45:57 +02:00
Rémi Verschelde bb5ea0d249
Merge pull request #90386 from akien-mga/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.4) - 4th batch
2024-04-08 23:51:22 +02:00
Rémi Verschelde e03ea704e2
Update changelog for 4.1.4 2024-04-08 23:06:44 +02:00
Rémi Verschelde 71a0be2b35
Sync controller mappings DB with SDL 2 community repo
Synced with mdqinc/SDL_GameControllerDB@4c9b8dace8

(cherry picked from commit 6772047e50)
2024-04-08 23:06:41 +02:00
Rémi Verschelde 7c502d449a
Linux: Handle export preset forward compat with 4.3+ platform name
(cherry picked from commit d534c67d91)
2024-04-08 22:12:58 +02:00
Ekaterina Vaartis 13b0956538
Clarify that LightmapGI is not supported in compatibility renderer
(cherry picked from commit 71a6870c06)
2024-04-08 22:12:58 +02:00
Aaron Franke 7c02f5cd5c
[4.2] Fix crash when previewing a scene with a mesh as the root node
(cherry picked from commit 424a6a6bf5)
2024-04-08 22:12:58 +02:00
smix8 611c435dab
Fix CSGShape debug_collision_shape crash
Fixes CSGShape debug_collision_shape crash.

(cherry picked from commit 0cba21f2da)
2024-04-08 22:12:58 +02:00
kleonc c93eb1ba91
Fix RenderingServer.instance_set_transform docs saying it's not global
(cherry picked from commit 01b029f0a5)
2024-04-08 22:12:58 +02:00
melquiadess f0c8d2c536
Add POST_NOTIFICATIONS permission to the list of permissions available in the Export dialog
(cherry picked from commit 739190ca2b)
2024-04-08 22:12:58 +02:00
Rémi Verschelde eb281cc342
mbedtls: Update to upstream version 2.28.8
(cherry picked from commit 915ca4dd45)
2024-04-08 15:55:43 +02:00
Fabio Alessandrelli 16bc127e00
[MP] Fix dead code doing unnecessary allocation
Probably a leftover from some old refactor.

(cherry picked from commit e64aa4d25f)
2024-04-08 15:55:43 +02:00
Micky 83e985b159
Add documentation to PhysicsServer2DExtension
(cherry picked from commit b7eee9de65)
2024-04-08 15:55:42 +02:00
Micky e7da23b5dd
Add documentation to PhysicsDirectBodyState2DExtension
(cherry picked from commit 9bbb2bc0f1)
2024-04-08 15:41:39 +02:00
A Thousand Ships e1826e7caf
Add instructions to get shape of `RayCast2D/3D`
Adds details on how to get the intersected shape

(cherry picked from commit f2d4ff5c1f)
2024-04-08 15:40:35 +02:00
A Thousand Ships 30eb46b938
[Doc] Clarify behavior of `String.format` with keys in replacements
(cherry picked from commit 8a78e7e174)
2024-04-08 15:40:04 +02:00
A Thousand Ships 0cf3f3582a
[Doc] Document loading behavior with relative paths
(cherry picked from commit 2508c2e309)
2024-04-08 15:39:44 +02:00
A Thousand Ships 169059efeb
[Doc] Clarify the behavior of `Vector2/3.cross` and mention parallel vectors
(cherry picked from commit 47a8033698)
2024-04-08 15:38:20 +02:00
Rémi Verschelde 0c51c5cb1c
certs: Sync with Mozilla bundle as of Mar 11, 2024
c5a419971b
(cherry picked from commit fd61a42e04)
2024-04-08 15:35:45 +02:00
Silc Lizard (Tokage) Renew 3c779d37bf
Move the line of infinity loop checking in AnimationStateMachine
(cherry picked from commit b8d555c74b)
2024-04-08 15:31:51 +02:00
AlexOtsuka caf55eb072
Fix Set Animation Save Paths breaking on Windows
(cherry picked from commit 4d3319eceb)
2024-04-08 15:30:34 +02:00
Brandtware 6c898685c7
Fix wrong return type mention in AStarGrid2D docs
(cherry picked from commit f8c0208e96)
2024-04-08 15:28:55 +02:00
Jordyfel 14b4742940
Fix small error in Variant doc
(cherry picked from commit e41209caf2)
2024-04-08 15:26:46 +02:00
Enhex 7b4ea00218
Fix documentation for receiving light from light probes
(cherry picked from commit 14ba478023)
2024-04-08 15:25:02 +02:00
K. S. Ernest (iFire) Lee e25abb5760
Fixed loop condition in bone mapping
Corrected the for-loop condition in the auto_mapping_process function. Previously, it was checking if children.size() is non-zero, which resulted in an infinite loop

(cherry picked from commit 15f1a0fba3)
2024-04-08 15:24:28 +02:00
kleonc 0177ddb144
[C#] Fix `Transform3D.InterpolateWith` applying rotation before scale
(cherry picked from commit e2ed63b313)
2024-04-08 15:22:32 +02:00
A Thousand Ships 5318c0ae6b
[CI] Improve fetching of changed files
PRs always use a merge into the repo on checkout, so checking for
`HEAD^1` will show all the changes regardless of the number of commits
in a PR

(cherry picked from commit 950743c3d8)
2024-04-08 15:21:52 +02:00
Haoyu Qiu 3d8fc90d84
Fix wrong extension filter for dependency editor
(cherry picked from commit e1ee838d11)
2024-04-08 15:20:49 +02:00
Chronos-W 64093528cd
Add reference to InputEventJoypadButton in _shortcut_input doc
(cherry picked from commit 9a439b246a)
2024-04-08 15:20:09 +02:00
A Thousand Ships 31fd129ba0
[Doc] Fix casing of some C# names
(cherry picked from commit 366cc648bf)
2024-04-08 15:17:15 +02:00
MewPurPur ecf7f3f349
Follow up to blue robot icons optimization
(cherry picked from commit 35a569478f)
2024-04-08 15:16:30 +02:00
Haoyu Qiu afc47f93d1
Fix description of touch input position
(cherry picked from commit 0ff396c981)
2024-04-08 15:10:01 +02:00
Danil Alexeev 527e1d12b0
Update `@GDScript` documentation
(cherry picked from commit 0c48845247)
2024-04-08 15:09:22 +02:00
iltenahmet 44211441f3
Update docs clarifying description for get_unix_time_from_system on UTC
fix url tag in doc/classes/Time.xml

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>

fix url tag in doc/classes/Time.xml

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>

update get_unix_time_from_system description

Update doc/classes/Time.xml

Co-authored-by: Aaron Franke <arnfranke@yahoo.com>
(cherry picked from commit 8bfc257e63)
2024-04-08 15:08:51 +02:00
Rémi Verschelde fbc4a7e3a5
Merge pull request #89340 from akien-mga/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.4) - 3rd batch
2024-03-12 22:44:39 +01:00
Micky dc2a52141a
Overhaul Basis' documentation
Co-Authored-By: Aaron Franke <arnfranke@yahoo.com>
(cherry picked from commit 58ddd84108)
2024-03-12 00:37:54 +01:00
Micky 634c413791
Overhaul Quaternion documentation
(cherry picked from commit 38cd13c51a)
2024-03-12 00:37:54 +01:00
Max Hilbrunner 3e908bfef3
Fix removing connected peer during disconnection
(cherry picked from commit bd8380db55)
2024-03-11 23:42:52 +01:00
Aaron Franke 49c95e7bbb
Fix GLTF exporting invalid meshes and attempting to export gizmo meshes
(cherry picked from commit 2d38c980ee)
2024-03-11 23:42:52 +01:00
Fabio Alessandrelli bc0c61a30b
[MP] Fix auth not waiting for confirmation in some cases
The auth implementation was treating any received packet as a remote
confirmation after the peer was confirmed locally.

It now correctly awaits for the remote confirmation packet before
admitting new peers.

(cherry picked from commit 754036f82f)
2024-03-11 23:42:52 +01:00
Pedro J. Estébanez 15ac760e4a
Avoid regressing in progress reporting in resource load
(cherry picked from commit f5ca58d32f)
2024-03-11 23:42:51 +01:00
Thaddeus Crews 00cfd6dcac
C#: Match Core implementation of `BinToInt` & `HexToInt`
(cherry picked from commit 48428bd087)
2024-03-11 23:42:51 +01:00
Paul Joannon c1efc31f2b
Delay fs update when populating path bimap
(cherry picked from commit 999180d5b5)
2024-03-11 23:42:51 +01:00
bruvzg 776696eb64
[macOS] Enabled secure restorable state.
(cherry picked from commit 84380a94f7)
2024-03-11 23:42:51 +01:00
Alexander Hartmann 601afdf1d5
Fix virtual keyboard for decimal values on Android
(cherry picked from commit 6f91c00056)
2024-03-11 23:42:51 +01:00
Adam Scott c8ae076c1a
Fix emscripten 3.1.51 breaking change about `*glGetProcAddress()`
(cherry picked from commit 5922ac0fb1)
2024-03-11 23:42:48 +01:00
Adam Scott 00e3aa9b07
Add workaround for emscripten >= 3.1.47 LTO build
(cherry picked from commit 656bc22e28)
2024-03-11 17:12:54 +01:00
A Thousand Ships 59b0a8da4f
[TileSet] Fix crash when deleting dragged polygon point
(cherry picked from commit 0ba7463803)
2024-03-11 16:46:58 +01:00
A Thousand Ships aec956d7c6
[Doc] Clarify `bsearch(_custom)` behavior
* Added an example for the effect of `before`
* Clarified the arguments to the custom callable can be either order

(cherry picked from commit 06df4abcd3)
2024-03-11 15:23:49 +01:00
A Thousand Ships c2ff91c418
[Docs][C#] Use `PropertyName` constants in more places
(cherry picked from commit 2f1f8ee39b)
2024-03-11 15:23:30 +01:00
Micky 962575ad73
Address a few issues in Transform3D documentation
(cherry picked from commit abf4894677)
2024-03-11 15:23:10 +01:00
A Thousand Ships 045c42f514
[C#] Fix typo in `Color` documentation
(cherry picked from commit 5aadb8660b)
2024-03-11 15:22:07 +01:00
A Thousand Ships dd6eced096
[Doc] Clarify some details about deferred calls
(cherry picked from commit 1cc5b0aa0d)
2024-03-11 15:21:45 +01:00
Rémi Verschelde bbc06c7cc8
RTL: Clarify that line, paragraph, and character numbers are zero-indexed
Closes #82885.

(cherry picked from commit 4a1397b58c)
2024-03-11 15:20:35 +01:00
A Thousand Ships 201ccb7aeb
[Doc] Fix some incorrect uses of "children"
(cherry picked from commit 9b5cd8e240)
2024-03-11 15:20:07 +01:00
Zi Ye b0ca5cdc12
Add necessary elaboration to documentation for Node3D::get_parent_node_3d
(cherry picked from commit 4c8015bec3)
2024-03-11 15:18:43 +01:00
Markus Sauermann e01bf42ca5
Document that `parse_input_event` doesn't influence the OS
(cherry picked from commit 8121446385)
2024-03-11 15:18:25 +01:00
A Thousand Ships 3eee0c0563
[Doc] Fix GDScript casing of `String.num_scientific`
(cherry picked from commit b384beccc5)
2024-03-11 15:18:04 +01:00
A Thousand Ships e96c67d725
Clarify behavior of opening a new file in `FileAccess`
The containing directory must exist for this to succeed.

(cherry picked from commit a775d8bf5a)
2024-03-11 15:17:45 +01:00
SaNeOr f518099f73
Additional docs: c# mainloop needs to be registered in the global class
(cherry picked from commit 3122b368c0)
2024-03-11 15:17:23 +01:00
Cariad Eccleston f63b703f21
Fix "dimensionnal" typo
(cherry picked from commit 9472ccbcdd)
2024-03-11 15:17:02 +01:00
A Thousand Ships 10848d0e80
Fix some leftover references to `hint_albedo` in docs
(cherry picked from commit e5266f71b9)
2024-03-11 15:16:41 +01:00
Dalton 846892d366
Fix function description for Font.get_char_size()
Removed description implying you can pass a second char in order to account for kerning

(cherry picked from commit c9bc54637b)
2024-03-11 15:14:48 +01:00
Hugo Locurcio 5afb5e3132
Document initial position project settings not affecting run from editor
(cherry picked from commit d3df15f823)
2024-03-11 15:13:45 +01:00
Hugo Locurcio 803e901e22
Improve documentation on Android package unique name
- Document `$genname` behavior.
- Update to match actual validation and Google Play guidelines.

(cherry picked from commit 111908c4ed)
2024-03-11 15:13:20 +01:00
Allen Pestaluky cbe3bf7511
Fix docs for Color class regarding bits per component.
This fixes godot-docs#8906 ( https://github.com/godotengine/godot-docs/issues/8906 )

(cherry picked from commit 0e977e087c)
2024-03-11 15:13:03 +01:00
Hugo Locurcio 4d45daec12
Document `OS.execute()` limitations on Android
(cherry picked from commit d94ee14123)
2024-03-11 15:12:39 +01:00
Florian Grabmeier 5e483e5af4
Remove duplicate reference of CUSTOM_ARRAY_RBGA8_URNOM in docs
(cherry picked from commit 02faccd14f)
2024-03-11 15:11:22 +01:00
A Thousand Ships 25e88dd552
Fix inverted link in docs
Title and url were swapped

(cherry picked from commit 17000bf8c3)
2024-03-11 15:10:48 +01:00
Micky 848d93f144
Mention and deprecate InputEventJoypadButton's pressure
(cherry picked from commit 25c0c95960)
2024-03-11 15:09:06 +01:00
Micky a0a44578aa
Tweak XROrigin3D documentation
(cherry picked from commit 552403d581)
2024-03-11 15:07:57 +01:00
Micky 185cfee96f
Overhaul Transform3D documentation
(cherry picked from commit 64ba22a9a7)
2024-03-11 15:07:11 +01:00
Micky 503dc95d71
Add documentation to EditorExportPlatformWeb
(cherry picked from commit 7ffacb5d49)
2024-03-11 15:05:13 +01:00
Micky ccc4f49c22
Add missing documentation for AudioStream & AudioStreamPlayback
(cherry picked from commit 8f4598bad4)
2024-03-11 15:04:53 +01:00
Micky 44fc5956aa
Add a few notes to Sprite3D's documentation
(cherry picked from commit 8ca47c981d)
2024-03-11 15:04:31 +01:00
Micky 6b734531a3
Overhaul documentation about MIDI support
(cherry picked from commit 8723d116c4)
2024-03-11 15:03:58 +01:00
20kdc fd9f1a7c41
Fix the documentation of Bone2D::apply_rest (squashed)
Co-authored-by: Micky <66727710+Mickeon@users.noreply.github.com>
(cherry picked from commit f16f8bf39b)
2024-03-11 15:03:11 +01:00
Hugo Locurcio 3e4519fc2f
Document Bounce = 1.0 not being sufficient for infinite energy conservation
(cherry picked from commit 7ff1704b1b)
2024-03-11 15:02:53 +01:00
Lucas Clemente Vella cdf8e0e87c
Improve docs on how ParallaxLayer mirroring works.
I wrote everything I wish was written when I tried to make an
infinite scrolling background, addressing every point of every
mistake I made.

(cherry picked from commit 40813b68f0)
2024-03-11 15:02:20 +01:00
kobewi 3c76c89cc7
Clarify Tween.set_parallel()
(cherry picked from commit 207bd34aa5)
2024-03-11 15:01:25 +01:00
clayjohn a24347d041
Significantly improve the speed of shader compilation in compatibility backend
Compile the unlit version by default to save on both cache size and compile time

(cherry picked from commit f1781fe9d1)
2024-03-11 15:01:23 +01:00
Markus Sauermann 5dfaec5c29
Fix global position for `InputEventMouse` in `viewport::push_input`
Global position doesn't get adjusted within `InputEventMouse::xformed_by()`.

(cherry picked from commit 8de39911c8)
2024-03-11 15:01:23 +01:00
Rémi Verschelde 1281517746
Fix reporting exit code when command line export fails
Fixes #83042.

(cherry picked from commit 51bfda9446)
2024-03-11 15:01:23 +01:00
Mikael Hermansson 036c9715c2
Allow LSP to process multiple messages per poll
(cherry picked from commit e2485044a1)
2024-03-11 15:01:23 +01:00
AlexOtsuka 702be5e2f2
Fix audio crackling issues due to incorrect WASAPI buffer size
(cherry picked from commit 179b0786c6)
2024-03-11 15:01:23 +01:00
Rémi Verschelde 19673840fb
iOS: Enable Storyboard launch screen by default
LaunchImages are deprecated, and Storyboard is supported on all currently
supported iOS versions, so this should be the default.

LaunchImages support was removed in 4.3 with #86312.

(cherry picked from commit 91c5d1e245)
2024-03-11 15:01:23 +01:00
Jakub Marcowski f464e5d3f5
libpng: Update to 1.6.43
(cherry picked from commit 41268d7faa)
2024-03-11 15:01:22 +01:00
Jakub Mateusz Marcowski ce72cd9651
tinyexr: Update to 1.0.8
(cherry picked from commit ab14dec952)
2024-03-11 15:01:22 +01:00
Rémi Verschelde 5b493f7214
Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@232c738ce0

(cherry picked from commit 10445d80d8)
2024-03-11 15:01:22 +01:00
Rémi Verschelde 8db15d9dc8
mbedtls: Update to upstream version 2.28.7
(cherry picked from commit dec635119e)
2024-03-11 15:01:22 +01:00
Rémi Verschelde 3de73d0249
mbedtls: Backport Windows fix to use bcrypt for entropy
We had a slightly older version of it for UWP, as the wincrypt API isn't allowed there.
We removed this with UWP in #81416, but since this was enabled inconditionally before,
this actually changed behavior for Windows compared to Godot 4.1 and earlier.

This change is also needed to properly supported Windows Store.

(cherry picked from commit b9d008de3d)
2024-03-11 15:01:22 +01:00
Rémi Verschelde a3e39e2f57
CI: Update actions to latest versions
(cherry picked from commit ad8d3cf1c9)
2024-03-11 15:01:22 +01:00
LinuxUserGD 5c10605295
os_linuxbsd.cpp: include `servers/rendering_server.h`
(cherry picked from commit 6307cebf37)
2024-03-11 15:01:22 +01:00
Fredia Huya-Kouadio 10f49cb758
Fix gradle build errors when the build path contains non-ASCII characters
(cherry picked from commit f1887a30f3)
2024-03-11 15:01:22 +01:00
Andreia Gaita 4182f2435a
Use an absolute path for SConsignFile so all Sconscript invocations share the same database
SConscript("some SCsub path") calls create a new context where a relative path
to the .sconsign file is interpreted as being next to the currently executing
SCsub, and not the one at the root. This breaks incremental build detection
because scons can't find the build information of dependent files outside of the
SCsub directory and just rebuilds everything every time.

(cherry picked from commit 0b43b0124f)
2024-03-11 15:01:22 +01:00
Adam Scott b11c95dc98
Add `WASM_BIGINT` linker flag to the web build
(cherry picked from commit 3ae524fa9e)
2024-03-11 15:01:22 +01:00
Rémi Verschelde 193592d532
Web: Bump closure compiler spec to ECMASCRIPT_2021
Fixes #88008.

(cherry picked from commit d29b0d90e0)
2024-03-09 23:37:49 +01:00
Fabio Alessandrelli 5b4c5c4118
[Web] Fix closure compiler builds using BIGINT
When using proxy_to_pthread we add BIGINT support (to support exchanging
64 bits integers between wasm and JS).

Bigint though, is part of ECMAScript 2020, and the closure compiler was
using ECMAScript 6 instead.

This commit update the CC configuration to use ECMAScript 2020 instead.

(cherry picked from commit e9df955e39)
2024-03-09 23:37:30 +01:00
bruvzg 8c54f7b6cd
[macOS] Check Vulkan SDK version when looking for MoltenVK libs.
(cherry picked from commit 70e328385c)
2024-03-09 23:34:53 +01:00
Adam Scott 0d75fc564b
Add basic Emacs .gitignore entries
(cherry picked from commit 2696fee3c6)
2024-03-09 23:34:25 +01:00
A Thousand Ships 49927fb64c
Fix `printf` for format checks
Prevents errors with input being invalid format strings

(cherry picked from commit 6da378afea)
2024-03-09 23:33:56 +01:00
Pedro J. Estébanez 2860ed6064
Undefine yet another macro from Windows headers
(cherry picked from commit bcc96441d6)
2024-03-09 23:33:21 +01:00
Rémi Verschelde 10da4db645
CI: Update mymindstorm/setup-emsdk to v14, should fix cache folder conflicts
https://github.com/mymindstorm/setup-emsdk/releases/tag/v14

Co-authored-by: Yuri Sizov <yuris@humnom.net>
(cherry picked from commit 35ef0b32b3)
2024-03-09 23:31:03 +01:00
bruvzg ec0ddc4633
[iOS] Update linker flags for Xcode 15.2.
(cherry picked from commit ac57f10f82)
2024-03-09 23:30:22 +01:00
Rémi Verschelde 68154d8a71
Merge pull request #79878 from HolySkyMin/editor_theme_startup_fix
[4.1] Fix editor layout breaks on startup when default custom theme is applied
2024-02-28 23:26:57 +01:00
Pedro J. Estébanez 664b2502d2
Fix warning in MSVC
(cherry picked from commit fe8c217b7c)
2024-02-27 16:40:17 +01:00
Michael Wörner e1421715e8
Fixed an issue that could cause a crash when encountering a zero-length packet in an OGG stream.
A zero-length memcpy into a null pointer itself does not fail, but for gcc with optimizations, this can cause incorrect code to be generated further down the line since the pointer is then assumed to be non-null.
Now stripping zero-length packets and pages without packets from the OggPacketSequence during import. This prevents various warning and error messages for files that end on a zero-length packet.

(cherry picked from commit a4db4ae658)
2024-02-27 16:40:16 +01:00
Rémi Verschelde 77598f0708
Merge pull request #87964 from aaronfranke/4.1-fix-gltf-crash-root-skel-imp
[4.1] Fix crash when importing a GLTF file with a skeleton as the root
2024-02-05 18:03:47 +01:00
Aaron Franke 72f00333dd
[4.1] Fix crash when importing a GLTF file with a skeleton as the root 2024-02-04 20:31:04 -06:00
Yuri Sizov b9008f3d51 Bump the version year to 2024 2024-01-24 20:50:57 +01:00
Yuri Sizov 51c0672b13 Add changelog for 4.1.4 2024-01-24 20:45:55 +01:00
Yuri Sizov c39ad18bfa
Merge pull request #87540 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.4) - 2nd batch
2024-01-24 20:09:52 +01:00
kleonc 5b05029b35 Fix Polygon2D to Skeleton2D transform calculation
(cherry picked from commit 41e4f3c215)
2024-01-24 18:54:29 +01:00
ShirenY 211dd2fb53 Transform mesh's AABB to skeleton's space when calculate mesh's bounds.
(cherry picked from commit 27f71c4e78)
2024-01-24 18:54:11 +01:00
Hugo Locurcio e2c96dc711 Document changing the window's resizable status at runtime
(cherry picked from commit d6768a17fa)
2024-01-24 18:31:41 +01:00
Micky 1ec0e4fba1 Fixing some reports to String's documentation
Closes https://github.com/godotengine/godot-docs/issues/8043
Closes https://github.com/godotengine/godot-docs/issues/8044
Mitigates https://github.com/godotengine/godot-docs/issues/8190
Closes https://github.com/godotengine/godot/issues/86734

(cherry picked from commit 46b0f3e9d6)
2024-01-24 18:31:27 +01:00
jsjtxietian f5c7a0e832 Mention CollisionPolygon2D.polygon is local to the given CollisionPolygon2D
(cherry picked from commit f5409dc132)
2024-01-24 18:30:59 +01:00
Micky 45fc8a3b43 Add missing descriptions for Image's documentation
(cherry picked from commit e01b91777a)
2024-01-24 18:30:59 +01:00
Hugo Locurcio ffed9d36b5 Make the rendering method dropdown also affect mobile if compatible
This prevents visual discrepancies between desktop and mobile platforms
after switching rendering methods using this dropdown.

The restart dialog now displays which rendering methods will be used,
and the dropdown tooltip also lists caveats related to specific platforms.

(cherry picked from commit 57f3bdb1e5)
2024-01-24 18:30:44 +01:00
Micky c02fcb4ede Add missing descriptions to TextServer's constants
(cherry picked from commit d3150c9c8f)
2024-01-24 18:27:37 +01:00
Rémi Verschelde 329f2ce49b Style: Mark clang-format 16 as supported for pre-commit hook
It only introduced a difference in a .glsl file, which I've worked
around by removing an empty line. This keeps formatting consistent
between clang-format 15 and 16.

Also added a change in the 3-to-4 project converter to fix bogus
formatting in clang-format < 17.

(cherry picked from commit 49f4860ce3)
2024-01-24 18:20:39 +01:00
Quincy Wofford 57fe32f8da corrected tooltip information Roll Influence property of VehicleWheel3D
(cherry picked from commit c979d02db2)
2024-01-24 18:20:39 +01:00
Hugo Locurcio c72c69379a Improve RichTextLabel `install_effect()` documentation
(cherry picked from commit 78fff7292c)
2024-01-24 18:20:38 +01:00
Fabio Alessandrelli e11165d7f1 [MP] Fix complete_auth notifying the wrong peer
The SceneMultiplayer complete_auth method was not configuring the
multiplayer peer correctly, causing it to potentially send the
notification to the wrong peer, on the wrong channel, and/or with an
incorrect transfer mode.

(cherry picked from commit 4826c14d20)
2024-01-24 18:20:38 +01:00
Michael Macha 0904f0affd Remove pointer to deprecated class page, from Skeleton3D
SkeletonIK3D is now deprecated, but Skeleton3D is recommending looking into its use for complicated inverse kinematics. What's worse, the removed line is not perfectly clear for non-developers and people less experienced with the engine, and could still stand to be improved.

(cherry picked from commit 0e52ffeb69)
2024-01-24 18:20:38 +01:00
LunaticInAHat afac25a3f8 Support unspecified linear size in DDS files
Not all exporters choose to populate that (optional) header field.

(cherry picked from commit a344d7f906)
2024-01-24 18:19:48 +01:00
Ricardo Subtil c8fabac8c7 Fix DAP breakpoints being cleared on closed scripts
(cherry picked from commit 760ff2e933)
2024-01-24 18:19:28 +01:00
rsburke4 c9924b11a4 Added error to catch conversion on invalid image
(cherry picked from commit dec2269bca)
2024-01-24 18:17:18 +01:00
Pedro J. Estébanez 62485a51fd Remove superfluous locking in RID owners in Vulkan RD
(cherry picked from commit 72bf8dfecf)
2024-01-24 18:12:40 +01:00
Pedro J. Estébanez 4b71c38e47 Remove redundant explicit clears in the Vulkan RD
(cherry picked from commit 4964d9a083)
2024-01-24 18:12:40 +01:00
Fredia Huya-Kouadio 307a6eba6b Update the validation logic for the package name:
- When using the project name, allow underscore (`_`) characters
- Send a warning instead of an error when the project name is modified to fit the package name format

(cherry picked from commit 0325568a9b)
2024-01-24 18:12:40 +01:00
A Thousand Ships a8180680af Fix invalid 3-to-4 renames of `add_animation` to `add_animation_library`
This rename breaks `SpriteFrames` and also isn't valid as the new method
takes an `AnimationLibrary`, not an `Animation`

(cherry picked from commit 4b7ea9fe47)
2024-01-24 18:10:23 +01:00
A Thousand Ships ab7d9578b7 Clarify `PackedByteArray.decompress*` limitations with external data
(cherry picked from commit 4850b866e8)
2024-01-24 18:04:32 +01:00
clayjohn dc6ae4a8f0 Disable scissor test after rendering batches in compatibility renderer
(cherry picked from commit 062e8802b7)
2024-01-24 18:04:32 +01:00
Rémi Verschelde 8d479e8389 zlib/minizip: Update to version 1.3.1
Minizip includes previously backported fix for CVE-2023-45853,
and a Debian patch for CVE-2014-9485 was also upstreamed.

(cherry picked from commit 8ead8d2ddb)
2024-01-24 18:04:32 +01:00
Raul Santos f4e6063ed8 Ignore directory entries in TPZ
Zip files may contain directory entries, they always end with a path
separator and zip entries always use forward slashes for path separators.

There's no need to create the directories included in the zip file,
since they'll already be created when creating the individual files.

(cherry picked from commit 59a5a1eb70)
2024-01-24 18:04:32 +01:00
Lyuma a4cabd7497 gltf: fix three bugs which prevented extracted textures from being refreshed.
1. Extracted texture paths in `GLTFDocument::_parse_image_save_image` at the project root started with res:/// which broke cache invalidation
2. md5 hashes were not being written to generator_parameters for new imports, which led Godot to think the file was manually created.
3. `EditorFileSystem::reimport_append` must emit the `resources_reimported` signal in order for the resource cache to be updated.

(cherry picked from commit fea4165ca8)
2024-01-24 18:04:25 +01:00
CardboardCarl b3018d81c5 Clarified behavior of RayCast objects when get_collision_point() is used inside a collision shape
(cherry picked from commit 6dfec4f70d)
2024-01-24 18:00:50 +01:00
A Thousand Ships 3df6145361 Redraw `TreeItem` on more changes
* Custom font changes
* Custom draw changes
* Custom as button

(cherry picked from commit 552594ffdc)
2024-01-24 18:00:49 +01:00
Bartłomiej T. Listwon b113602ce5 Prevent overriding file info of another file when reimport creates files
(cherry picked from commit aae48ac2b6)
2024-01-24 18:00:49 +01:00
jsjtxietian 5376aea688 Fix CollisionObject3D Gizmo not updated after calling shape_owner_* functions
(cherry picked from commit 80a488a242)
2024-01-24 18:00:49 +01:00
Occalepsus a092b1aa38 Fix body leaving area gravity influence
(cherry picked from commit 492f1c2406)
2024-01-24 18:00:49 +01:00
Erik Johnson dfcd70c09f Add descpription for rendering/limits/spatial_indexer/threaded_cull_minimum_instances
(cherry picked from commit 498f46063d)
2024-01-24 18:00:49 +01:00
31 2c062f1922 Include animation.length in Animation example
The length of an Animation isn't automatically set by adding keys, and
it must be set manually. The existing example only has keys up to 0.5s,
so the default value of 1.0s may be acceptable. However, this results in
unexpected behavior for anyone who makes an animation longer than 1.0s.
Include animation.length in the example because it's important.

Also, increase the key position to 2.0s so it won't be confusing that
the assignment is somewhat redundant.

(cherry picked from commit 698c67d540)
2024-01-24 18:00:49 +01:00
Alessandro Famà 1fa33b6072 Fix Dummy audio driver initialization issue on WASAPI output device initialization failure
`AudioDriverWASAPI::init` consistently returns `Error::OK`, even when encountering a failure during the initialization of the output device. This behaviour blocks the dummy driver from initializing in `AudioDriverManager::initialize`.

(cherry picked from commit 998078f8d7)
2024-01-24 18:00:49 +01:00
Micky 5ffc22b06f Add missing descriptions to PrimitiveMesh and SoftBody3D
(cherry picked from commit a33777d49d)
2024-01-24 18:00:49 +01:00
BlueCube3310 bf2b98b801 Fix BasisUniversal ETC RA_AS_RG transcoding
(cherry picked from commit 51ad937532)
2024-01-24 18:00:49 +01:00
Yuri Sizov b915d7d9f2
Merge pull request #87514 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.4) - 1st batch
2024-01-24 11:42:59 +01:00
ChibiDenDen d75566167f fix clear color on mobile renderer
(cherry picked from commit df25e87842)
2024-01-23 22:41:00 +01:00
LRFLEW 38037bae47 Fix transparent viewport backgrounds with custom clear color
(cherry picked from commit 6effd3cde7)
2024-01-23 22:40:53 +01:00
Malcolm Nixon 5115b119f8 Fix memory corruption and assert failures in convex decomposition
This PR fixes how triangular faces are decomposed into vertices and indices. The pre-increment resulted in the indices table skipping entry 0 and potentially overrunning the end of the vertices vector.

(cherry picked from commit bf7cdc5229)
2024-01-23 20:22:01 +01:00
aXu-AP e7db7b552d Fix UV editor not showing polygon correctly
Fix polygon not showing correctly if UVs have been moved around. Show the actual contents of the polygon instead.

(cherry picked from commit a45db4d616)
2024-01-23 20:22:01 +01:00
Haoyu Qiu 32a3b2bf9c Set language encoding flag when using ZIPPacker
When non-ASCII filenames are used, this indicates that the encoding is
UTF-8. Programs like ZIPReader can then parse the filename correctly.

(cherry picked from commit 08b1354b36)
2024-01-23 20:22:00 +01:00
A Thousand Ships 9598a32b7b [Core] Prevent infinite recursion when printing errors
(cherry picked from commit d10617bb3b)
2024-01-23 20:22:00 +01:00
HolySkyMin c51b59c1fc GLES3: Skip batches with zero instance count while rendering
(cherry picked from commit 51dcb38840)
2024-01-23 20:22:00 +01:00
Ellen Poe 97b081b45f Only warn once about OGG seeking issues
(cherry picked from commit 729d270a25)
2024-01-23 20:22:00 +01:00
jsjtxietian 7180817900 Fix bad parameter of rendering_method crashes Godot
Print error and default to forward plus

(cherry picked from commit b6bee1c21e)
2024-01-23 20:22:00 +01:00
bruvzg 9d1d916864 Add unsigned char cast ifdef.
(cherry picked from commit ec052cd38a)
2024-01-23 20:22:00 +01:00
Alex Drozd 3daaaff330 use venv if detected when building godot.sln
(cherry picked from commit 3f22c1bfb6)
2024-01-23 20:22:00 +01:00
Yuri Sizov cf97df236d Fix the Web platform team's codeowners link
(cherry picked from commit 10e714a975)
2024-01-23 20:22:00 +01:00
addmix 87798576f0 Improve documentation for `CameraAttributesPhysical.exposure_shutter_speed`
(cherry picked from commit b7b0022c7a)
2024-01-23 20:22:00 +01:00
Hugo Locurcio 4cec48f1ea Fix typo in BaseMaterial3D conversion from 3.x SpatialMaterial
(cherry picked from commit 70959a9c04)
2024-01-23 20:22:00 +01:00
A Thousand Ships d9af9dd682 [Core] Fix crash when hashing empty `CharString`
(cherry picked from commit ca5ec6aec1)
2024-01-23 20:22:00 +01:00
Hugo Locurcio da200b99c9 Improve and clarify texture filtering documentation
- Mention the Use Nearest Mipmap Filter project setting.
- Fix nearest mipmap claiming to always use bilinear filtering
  (it uses trilinear filtering by default, like linear mipmap).

(cherry picked from commit 47cadda3ad)
2024-01-23 20:22:00 +01:00
Roy Berube d8b89badfd Enable scrolling of output with UI scale changes
(cherry picked from commit a7b2e090ad)
2024-01-23 20:22:00 +01:00
aXu-AP 8a395124e6 Fix UV editor not using texture transform
(cherry picked from commit d7e5c25e4a)
2024-01-23 20:22:00 +01:00
Rémi Verschelde 98cfa8bcf2 VideoPlayer: Fix reloading translation remapped stream
Fixes #43917.

(cherry picked from commit 7d0c561e02)
2024-01-23 20:22:00 +01:00
Nico 2ff7b6c830 Specify the behaviour of get_tree when the node is not in the scene tree
(cherry picked from commit ee9c8cb296)
2024-01-23 20:00:34 +01:00
clayjohn 9c82571dd6 Fill out Material documentation and clarify render_priority and next_pass sorting
(cherry picked from commit 6a663959a6)
2024-01-23 20:00:23 +01:00
jsjtxietian 126874bb38 Check nullptr in `_nvapi_disable_threaded_optimization` to prevent crash
update outdated link

(cherry picked from commit a3f44cd67e)
2024-01-23 19:57:34 +01:00
bruvzg d3713220b8 Prevent read-after-free in the queued CallableCustomStaticMethodPointer.
(cherry picked from commit eb81e8b2dc)
2024-01-23 19:53:33 +01:00
kobewi 326314eaa9 Provide more context when scene fails to load
(cherry picked from commit c6c872ba34)
2024-01-23 19:15:04 +01:00
Gabor Koncz 46bcfa82e1 Remove incorrect system_fbo overwrite
(cherry picked from commit 0198eedb06)
2024-01-23 19:15:03 +01:00
Bastiaan Olij 140f5a6a5a Compile OpenXR into MacOS build
(cherry picked from commit a9c8feeba0)
2024-01-23 19:15:03 +01:00
Andreia Gaita d9d4a2bb1d r128: Update to include latest fix for intrinsics being incorrect included.
https://github.com/fahickman/r128/pull/15 is needed to build on platforms
that define R128_STDC_ONLY

(cherry picked from commit 8fad157dbb)
2024-01-23 19:15:03 +01:00
bruvzg b62b3fc40b Fix remapped font reloading on locale change.
(cherry picked from commit 8b2260544a)
2024-01-23 19:15:03 +01:00
smix8 b0179bba74 Fix NavigationObstacle height
Fixes NavigationObstacle height.

(cherry picked from commit 3f26191d16)
2024-01-23 19:15:03 +01:00
smix8 0cf4e79b48 Fix NavigationObstacle elevation
FixesNavigationObstacle elevation.

(cherry picked from commit fc4cc27e66)
2024-01-23 19:15:03 +01:00
Fredia Huya-Kouadio f6a9129219 Preserve the output from the gradle build command
Updates `EditorNode#execute_and_show_output(...)` to return the output of the executed command.

(cherry picked from commit 136b7f9c52)
2024-01-23 19:15:03 +01:00
Fredia Huya-Kouadio a3432848b2 Fix Android editor crash issue
Fix issue causing the Android editor to crash when pressing back from a running project

(cherry picked from commit fcb07ff8dc)
2024-01-23 19:15:03 +01:00
Guilherme 2762ae69d4 Fix wrong shader rename
Co-authored-by: BrunoArmondBraga <abraga3547bruno@gmail.com>
(cherry picked from commit 7a76d5e6ea)
2024-01-23 19:15:02 +01:00
Rémi Verschelde c3a6dd2c11 Fix translation remapping check for imported resources
Fixes #81660.

(cherry picked from commit 2729a78fd7)
2024-01-23 19:15:02 +01:00
Hugo Locurcio b468496700 Don't apply frame delay project setting to the editor
This appears to already be the case for the Max FPS project setting.

(cherry picked from commit a63556212d)
2024-01-23 19:15:02 +01:00
Haoyu Qiu c5e94ad9de Fix texture region editor not selecting restored snap mode
(cherry picked from commit 64fb22e17b)
2024-01-23 19:15:02 +01:00
Anutrix b3b9342bf1 Added docs for DRAW_ORDER_REVERSE_LIFETIME constant and minor XR log improvement
(cherry picked from commit 3c82f4a371)
2024-01-23 19:15:02 +01:00
Fredia Huya-Kouadio 2559d4b587 Remove Android specific abis from the export preset feature list
The presence of those abis cause them to be included in the set of `p_features` passed to the `gdextension_export_plugin#_export_file(...)` method, which caused them to be lumped in the `features_wo_arch` set.
When trying to find the gdextension library path, we use a predicate with the following logic:

```
[features_wo_arch, arch_tag](String p_feature) { return features_wo_arch.has(p_feature) || (p_feature == arch_tag); }
```

For a `gdextension` config file like the one below, this causes the first android entry (`android.armeabi-v7a = ...`) to always be returned regardless of archs since it always satisfies the predicate.

```
[configuration]

entry_symbol = "example_library_init"
compatibility_minimum = 4.1

[libraries]
linux.x86_64 = "res://libgdexample.so"

android.armeabi-v7a = "res://libgdexample.android.template_release.armeabi-v7a.so"
android.arm32 = "res://libgdexample.android.template_release.armeabi-v7a.so"
android.x86 = "res://x86/libgdexample.android.template_release.x86.so"
android.x86_32 = "res://x86/libgdexample.android.template_release.x86.so"
android.x86_64 = "res://libgdexample.android.template_release.x86_64.so"
android.arm64-v8a = "res://libgdexample.android.template_release.arm64-v8a.so"
android.arm64 = "res://libgdexample.android.template_release.arm64-v8a.so"
```

(cherry picked from commit dce2686e52)
2024-01-23 19:09:45 +01:00
coumcashier 4619d34b91 Fix storing invalid item height values in `ItemList`
The height of the last N items is incorrectly overwritten with
the max height of first row (N = number of columns). This happen
in the first iteration of the while loop. Moving this code inside
if (all_fit) makes sure the last rows height is only updated at
the end when max height (max_h) is calculated for the last row.

(cherry picked from commit 1533292f09)
2024-01-23 19:09:45 +01:00
Rémi Verschelde 1e460e37c3 CI: Pin Emscripten to 3.1.39
Due to #82865, newer versions can't be used for dlink-enabled Web builds.
This isn't a problem for CI which doesn't use dlink, but it's clearer for
users if our CI version matches the one we use for official builds.

(cherry picked from commit 51aff13ef4)
2024-01-23 19:09:45 +01:00
Stanislav Labzyuk 4100743a62 Fix undo methods for DELETE in EditorAutoloadSettings
(cherry picked from commit 3462ecf2fb)
2024-01-23 19:09:45 +01:00
kobewi 0a7af396c4 Fix missing arrows in integer vector properties
(cherry picked from commit aff49d3a76)
2024-01-23 19:09:45 +01:00
jitspoe ceb0602c16 Fix bug where maximized->fullscreen->windowed mode stays maximized.
(cherry picked from commit 7918e2b6d9)
2024-01-23 19:09:45 +01:00
scgm0 561b843831 Fix Andorid disabling splash screen Show Image
(cherry picked from commit 7771936df5)
2024-01-23 17:49:55 +01:00
jsjtxietian a966068f09 Fix _get_debug_tooltip will crash if tooltip string is too large
(cherry picked from commit 155d738163)
2024-01-23 17:45:44 +01:00
A Thousand Ships 9c68648d72 Ensure binds are duplicated with `Node` signals
(cherry picked from commit 9cf13cedfd)
2024-01-23 17:42:36 +01:00
jsjtxietian e63a7215bb Update `add_submenu` doc to mention that submenu should already exist
(cherry picked from commit 34c27021e0)
2024-01-23 17:42:36 +01:00
bitsawer 28a44d7bbc Fix several Material texture parameter updates
(cherry picked from commit 1ec97a7b91)
2024-01-23 17:42:22 +01:00
jsjtxietian 98002e03d7 Fix int to uint implicit cast error when use uniform mat in gles3
(cherry picked from commit 967e0e6485)
2024-01-23 17:38:48 +01:00
Hugo Locurcio 95ca8e0365 Add an example for `Dictionary.merge()`, mention lack of recursion
(cherry picked from commit 0396e12a47)
2024-01-23 17:38:48 +01:00
Pedro J. Estébanez 1aeff1a7a5 [GLES3] Avoid freeing proxy textures clearing onwer's data
(cherry picked from commit a67559931b)
2024-01-23 17:38:48 +01:00
kobewi 1bd63576b8 Remove margins from editor scrollbars
(cherry picked from commit a3172ae8c5)
2024-01-23 17:38:29 +01:00
A Thousand Ships 36c7a47b11 Prevent `encode_variant` doing `memcpy` from `nullptr`
(cherry picked from commit 210461f2ed)
2024-01-23 17:36:49 +01:00
Hugo Locurcio 3d4f1ce21f Improve headings for the export mode in the Export dialog
"Export as dedicated server" now uses a less confusing heading.

(cherry picked from commit 73c1b212f7)
2024-01-23 17:36:49 +01:00
Raul Santos 6d1401cb8d Enable new addon after hiding ProjectSettings
- Enabling newly created addons can show a warning dialog, doing so before hiding the `ProjectSettingsEditor` dialog causes rendering glitches.
- Remove unused `PuginConfigDialog` in `EditorNode`. The one actually being used is an instance in `EditorPluginSettings`.

(cherry picked from commit 7b34fa8dd2)
2024-01-23 17:36:31 +01:00
jsjtxietian cf61f5e938 Hide CSGShape's debug_collision_shape when it is invisible
(cherry picked from commit 173e2c7f29)
2024-01-23 17:33:01 +01:00
stoofin 73b0984764 Fixed PlaneMesh tangents for 'Face X' orientation
(cherry picked from commit 6099d9f3d1)
2024-01-23 17:33:01 +01:00
Ege Yıldır 06d8262b57 doc: Fix typo in ConcavePolygonShape2D/3D description
(cherry picked from commit 0573122605)
2024-01-23 17:32:49 +01:00
A Thousand Ships f563f8bfa6 Fix invalid return from some more `_get/_set`
Invalidly returned `true` on the non-matched path

(cherry picked from commit 3ef6314980)
2024-01-23 16:54:03 +01:00
Hugo Locurcio e33eb36231 Use colored output on CI for Doctest
GitHub Actions output is not considered a TTY, so colored output
must be forced.

(cherry picked from commit dec26e15b3)
2024-01-23 16:54:03 +01:00
thfrwn 204f3bd58d TTS_Linux: Fix size_t template issue on OpenBSD by using int consistently
(cherry picked from commit a0253e593c)
2024-01-23 16:54:02 +01:00
A Thousand Ships f247ffef54 Clarify `NOTIFICATION_SCROLL_BEGIN/END` behavior
Documents that these notifications are only sent for touch events.

(cherry picked from commit 44f62a4f97)
2024-01-23 16:54:02 +01:00
Thaddeus Crews ce9eee097e Header format commits to .git-blame-ignore-revs
(cherry picked from commit 704f085097)
2024-01-23 16:54:02 +01:00
A Thousand Ships f311b0557c Fix invalid return from some `_get/_set`
Invalidly returned `true` on the non-matched path

(cherry picked from commit b04cf8486d)
2024-01-23 16:54:02 +01:00
Hugo Locurcio 0ca1957445 Clamp ReflectionProbe Max Distance to 262,144 to fix rendering issues
(cherry picked from commit ce421da908)
2024-01-23 16:54:02 +01:00
bitsawer d38b61d523 Fix VoxelGI MultiMesh and CSG mesh baking
(cherry picked from commit cbb39f4b6e)
2024-01-23 16:54:02 +01:00
A Thousand Ships a33cf3b6bf Ensure input event is valid in `PopupMenu::activate_item_by_event`
(cherry picked from commit f721b34b4e)
2024-01-23 16:54:02 +01:00
Haoyu Qiu a4912b8a63 Translate TextEdit placeholder
(cherry picked from commit d53529f488)
2024-01-23 16:54:02 +01:00
RealMadvicius 8ed4af259a Fix crash when clicking on "Interpolation Mode" with nonexistent node path
issue reference [https://github.com/godotengine/godot/issues/81769]

- adding a nullptr check on a Node pointer obtained from get_node(NodePath) in case it is null now we wont execute the next instruction

> ClassDB::get_property_info(nd->get_class(), prop, &prop_info);

Which then prevents the crash

(cherry picked from commit e7a35d1521)
2024-01-23 16:53:22 +01:00
A Thousand Ships 5470eb5894 Fix description of `Animation::copy_track`
The documentation stated the track was added to this, instead of
`to_animation`

(cherry picked from commit 9d23956b28)
2024-01-23 16:44:36 +01:00
John Watson 76d5a0e723 Android: Fix joypad trigger value range
`Input::joy_axis` converts trigger values to be between 0.0f to 1.0f by default. This is not needed for Android, as values are already within that range, as per Android documentation: https://developer.android.com/reference/android/view/MotionEvent#AXIS_RTRIGGER

This patch prevents this conversion on Android, which caused L2 and R2 triggers to get stuck pressed. https://github.com/godotengine/godot/issues/79263

(cherry picked from commit d413a02079)
2024-01-23 16:03:16 +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
crazyStewie 222cba2aab Implemented {project} placeholder for external dotnet editor
Implements the {project} placeholder, available when setting an external editor
in the project settings, via Editor > Editor Settings > Text Editor > External
for the c# external editor, under Editor > Editor Settings > Dotnet > Editor,

This allows passing the project folder as a command line argument when using a
custom external editor that isn't one of the available options.

Fixes #81845

(cherry picked from commit c01a47867b)
2024-01-23 16:03:16 +01:00
bruvzg 8face42022 [SystemFont] Check name when selecting the best matching face from a collection.
(cherry picked from commit a5a0e48dbc)
2024-01-23 16:03:15 +01:00
Silc Lizard (Tokage) Renew 37e6267c6b Improve retarget auto-mapping algorithm
(cherry picked from commit c1c4a09527)
2024-01-23 16:03:15 +01:00
A Thousand Ships 222ceb7a82 Fix allocation size overflow check in `CowData`
(cherry picked from commit c48b189e14)
2024-01-23 16:03:15 +01:00
Ben Rog-Wilhelm a71153d9bd Fix: incorrectly .gitignored files.
(cherry picked from commit 90f3992036)
2024-01-23 16:03:15 +01:00
Rémi Verschelde 44098e56c9 Remove too greedy GCOV ignores from `.gitignore`
This would cause `updown.png` to be ignored in our default theme in 3.x.

These ignores were added in #36800 for #36572 (see that PR for usage
instructions).

From a quick test, using `--output-file` for `lcov` and `--output-directory`
for genhtml let us output the files in a way that won't conflict with the
Git repository (e.g. in `bin/`, or outside the Git repo).

(cherry picked from commit 5c38e42161)
2024-01-23 16:03:15 +01:00
Rindbee 52d56d806d Fix rename animation in SpriteFramesEditor/AnimationNodeStateMachineEditor
When the name suffix grows, the old name is used if it is obtained first.

Fix the case where the following error message would appear when renaming
an animation.

```
ERROR: Animation '' doesn't exist.
   at: get_frame_count (scene/resources/sprite_frames.cpp:71)
```

(cherry picked from commit e9cd29cf22)
2024-01-23 15:56:09 +01:00
MrBBBaiXue 965ea011a0 Delete .lgtm.yml
LGTM has been acquired by Github, and all its features is replaced by Github Code Scanning.
So seems .lgtm.yml is no longer used.

(cherry picked from commit ee6cec1649)
2024-01-23 12:43:11 +01:00
bruvzg ba41f42c82
[macOS] Fix MoltenVK SDK detection after file location changes in 1.3.275.0.
(cherry picked from commit a2c1c01941)
2024-01-18 10:47:42 +01:00
Mikael Klasson 39271362c3
Fix invalid Python escape sequences
(cherry picked from commit 4986d6d317)
2024-01-16 17:17:29 +01:00
HolySkyMin d4a406f4a5 Fix editor layout breaks on startup when default custom theme is applied
Moved EditorNode's all get_minimum_size()s outside constructor
2023-11-11 19:48:18 +09:00
Rémi Verschelde 2d3b2abcf6
Merge pull request #84328 from akien-mga/4.1-re-disable-exceptions
[4.1] SCons: Re-disable exceptions for Android, iOS, and Web
2023-11-02 09:09:23 +01:00
Rémi Verschelde 1e1d91df6a
SCons: Re-disable exceptions for Android, iOS, and Web
We made a mistake when cherry-picking #80612 with 269b115d9c,
where the global flag was defaulted to false to preserve the 4.1-stable behavior for desktop
platforms, but we forgot that the refactoring removed the force disabling of exceptions for
Android, iOS, and Web.

This reintroduces this behavior so it should be back to the same as in 4.1/4.1.1, and the
export templates should get back to their original size.

Only difference, the old code used to keep exceptions for the Web editor, but I see no reason
for it, so I disable them like with the templates.
2023-11-01 22:16:17 +01:00
Yuri Sizov 65f5865d11 Bump version to 4.1.4-rc
This also fixes a reference issue in the changelog for 4.1.3.
2023-11-01 20:59:38 +01:00
Yuri Sizov fc79201851 Bump version to 4.1.3-stable 2023-11-01 16:34:59 +01:00
Yuri Sizov b79961e3c0 Update changelog for 4.1.3 2023-11-01 16:33:17 +01:00
Fredia Huya-Kouadio 74a1d8addd Update the `launchMode` for the `GodotApp` activity to allow other activities to be part of the same task
For details, see https://developer.android.com/guide/topics/manifest/activity-element#lmode

(cherry picked from commit 14428c8d5b)
2023-11-01 16:20:27 +01:00
Yuri Sizov c5e3fcbeb6 Update changelog for 4.1.3 2023-11-01 15:47:09 +01:00
风青山 7c3ac4d170 Fix `SubViewport` with `UPDATE_WHEN_VISIBLE` not working properly in exported project
The issue is primarily due to `RSG::texture_storage->render_target_was_used()`
returning inconsistent results in the editor and exported projects.

(cherry picked from commit 59d0fdbacc)
2023-11-01 15:30:00 +01:00
Yuri Sizov f80c673cdf Add changelog for 4.1.3 2023-10-26 16:30:30 +02:00
Rémi Verschelde 56feab3258
Bump version to 4.1.3-rc
Should have been done before merging #83901, oops.
2023-10-25 14:29:42 +02:00
Yuri Sizov 4a4356dafc
Merge pull request #83901 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.3) - 1st batch
2023-10-25 14:17:57 +02:00
David Snopek 9a322737cc GDExtension: Fix `variant_iter_get()` actually calling `iter_next()`
(cherry picked from commit b14f359c94)
2023-10-25 12:23:48 +02:00
warriormaster12 9e315e7c79 Make SkeletonIk3D node usable
(cherry picked from commit ddf93f3f59)
2023-10-25 12:23:48 +02:00
ajreckof 5abac84a9e Fix paste value emptying an array on some right click location
(cherry picked from commit f2758d8591)
2023-10-24 20:15:34 +02:00
Alexander Hartmann 3d8c77dc92 Fix Android logic for deferred window input events being inverted
Notably fixes issues with `is_action_just_*` queries in `_physics_process`
for TouchScreenButton.

Fixes #66318.
Fixes #82396.

(cherry picked from commit 5137497c18)
2023-10-24 20:15:20 +02:00
Saif Kandil d73b76da02 Fix Object class C# syntax error
Signed-off-by: Saif Kandil <74428638+k0T0z@users.noreply.github.com>
(cherry picked from commit 74efbde7df)
2023-10-24 20:10:49 +02:00
CopyTIME f2dd4086b7 Change return type of "_Set" method in csharp code example
Add "return false" to GDScript code example of _Set method

(cherry picked from commit 458cb99966)
2023-10-24 20:10:49 +02:00
kobewi 7f2ebc2389 Fix _set example
(cherry picked from commit 90160eff80)
2023-10-24 20:10:49 +02:00
Rémi Verschelde 93becd4d2e SCons: Use CXXFLAGS to disable exceptions, it's only for C++
Following discussion in https://github.com/godotengine/godot-cpp/pull/1216.

(cherry picked from commit 3bfcbe7946)
2023-10-24 20:02:24 +02:00
David Snopek 10eafe236c Fix `GPUParticles3D` on the Meta Quest 2 with OpenGL renderer
(cherry picked from commit 58775a6c67)
2023-10-24 19:51:53 +02:00
Ninni Pipping c148398735 Fix incorrect virtual function in `VideoStream.set_paused`
(cherry picked from commit 2284689b0e)
2023-10-24 19:51:53 +02:00
Ryan Roden-Corrent c93d74aca0 Update blender export flags for 3.6.
Fixes #76338.

Blender 3.6 imports fail with:

```
TypeError: Converting py args to operator properties: : keyword "export_nla_strips" unrecognized
```

The `export_nla_strips` flag was removed and replaced with `export_animation_mode`.
In 3.6.0-3.6.21, this option does not exist at all and causes the failure above.
In 3.6.22, this option was re-added, but does nothing.
See 96a73cb664.

We now need to check the blender version to determine what flags to use.
This adds an additional shell command before every import.
We might consider caching the version, but we'd have to invalidate the cache if the blender version or path changes.

As an aside, the "group animations" setting in Godot does the opposite of what I'd expect.
When `group_tracks=true`, each animation is exported individually.
When `group_tracks=false`, all animations are exported as a single track.
This seems backwards, but I've kept the 3.6 behavior consistent with 3.5.

From https://docs.blender.org/api/3.6/bpy.ops.export_scene.html:

> ACTIONS Actions – Export actions (actives and on NLA tracks) as separate animations.
> ACTIVE_ACTIONS Active actions merged – All the currently assigned actions become one glTF animation.

Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
(cherry picked from commit 7e64c6c399)
2023-10-24 19:51:53 +02:00
A Thousand Ships 578fa8603d [Audio] Fix pausing stream on entering tree
The paused notifications are only sent when pause status is changed,
this ensures that streams that are non-processing do not play when added
to the tree. Also ensures that the `process_mode` property applies
generally.

(cherry picked from commit 72fccd82c5)
2023-10-24 19:51:53 +02:00
Rémi Verschelde 4c8ee43d08 Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@eb831f75ab

Fixes #83552.

(cherry picked from commit d3c0a7d598)
2023-10-24 19:51:53 +02:00
Rémi Verschelde 0b3c182038 Sync controller mappings DB with SDL2 community repo
Synced with gabomdq/SDL_GameControllerDB@fc4b33c872

(cherry picked from commit e40b0b3ed8)
2023-10-24 19:51:53 +02:00
Matthew Borkowski 34811c1f1e Fix `GDScriptCache::get_full_script` eating parsing errors because of early exit
Fixes #75545.

(cherry picked from commit 2d262c072b)
2023-10-24 19:51:53 +02:00
Max Hilbrunner e37eb47144 Docs: Fix link to Android Gradle build tutorial
(cherry picked from commit 68a1e0c7d4)
2023-10-24 19:51:53 +02:00
Lunarisnia 471af30f7b Fix disabling depth prepass breaks opaque material
(cherry picked from commit 28f7a62ae4)
2023-10-24 19:51:53 +02:00
A Thousand Ships d56a6ad461 Make error suggestion less ambiguous
(cherry picked from commit bea7cc784d)
2023-10-24 19:51:52 +02:00
Haoyu Qiu ac57043a34 Don't auto translate theme type list
(cherry picked from commit 26b21f110a)
2023-10-24 19:50:22 +02:00
bitsawer 27d47246b5 Fix ShaderGlobalsOverride property handling
(cherry picked from commit 71e32364ee)
2023-10-24 19:50:22 +02:00
floatingpointer 82ad6a3dad Update joypad_windows.cpp
Add XInput device for Series 2 Elite controller

(cherry picked from commit 81f9c0345c)
2023-10-24 19:50:22 +02:00
Yogendra Manawat 2b8dbbccae Fix scrolling popup_menu On keyboard/controller input
(cherry picked from commit a16fdb05ae)
2023-10-24 19:50:22 +02:00
Daniel Castellanos de6e7c070c Fixing incorrect swapchain release timing
Applied a couple of checks suggested by @dhoverml for when the
XrResult is not XR_SUCCESS but is also not a failure. Also simplified
checks from @BastiaanOlij feedback.

(cherry picked from commit 771ec958af)
2023-10-24 19:50:22 +02:00
朱力 11f9e35c06 Fixed an error in Vector3.BezierDerivative in mono module
(cherry picked from commit bceba81b54)
2023-10-24 19:50:22 +02:00
bitsawer dac7049e16 Fix errors when freeing GPUParticles
(cherry picked from commit 898d1a2d5f)
2023-10-24 19:00:16 +02:00
Radiant 15eaeddfbf Fix `RefCounted.unreference()` documentation providing wrong info.
(cherry picked from commit 098c445f75)
2023-10-24 19:00:16 +02:00
bruvzg d7fc0805c8 [iOS] Fix build on Xcode 14 and older.
(cherry picked from commit 09d5120865)
2023-10-24 19:00:16 +02:00
bitsawer e65f98576b Fix VoxelGI bake memory leak
(cherry picked from commit 416ef5ad1b)
2023-10-24 19:00:16 +02:00
clayjohn 51fd44318f Avoid default fallback material when using world_vertex_coords
This avoids z-fighting between the opaque shader and the depth prepass shader

(cherry picked from commit 04846c1d6d)
2023-10-24 19:00:16 +02:00
Haoyu Qiu 1ebfd2f510 Fix garbled text in editor toasters
(cherry picked from commit 3006394a69)
2023-10-24 19:00:16 +02:00
bitsawer 27b0e5aebb Fix BoneAttachment3D signal connection
(cherry picked from commit 34574db5b9)
2023-10-24 19:00:16 +02:00
bitsawer efe99e5479 Fix VoxelGI static light pairing
(cherry picked from commit 5e22ded4c9)
2023-10-24 19:00:15 +02:00
bitsawer 75671b7937 Fix GLES3 instanced rendering color and custom data defaults
(cherry picked from commit 6f88ed73be)
2023-10-24 18:59:55 +02:00
viksl ee6bdce5a1 Instead of Vector2() start volumetric fog at frustum_near_size to avoid INF and NaN in shaders.
(cherry picked from commit 00c2fb4a08)
2023-10-24 18:29:41 +02:00
viksl c9e5f90813 Fixes spotlight's cluster artifacts and negative light.
(cherry picked from commit 8a2d345a85)
2023-10-24 18:29:41 +02:00
tomissj2 ecd098341a Fog Shader bugfix: 'global_variables' : undeclared identifier
If user try to use a global shader variable in a fog type shader we are getting shader error. The reason of this there is a typo in the fog.cpp. I other well working shaders types like sky the "action.global_buffer_array_variable" is "global_shader_uniforms.data".
The investigation tracked here:
https://discord.com/channels/212250894228652034/1158918161337434172

(cherry picked from commit e906eb8433)
2023-10-24 18:29:40 +02:00
bruvzg 426e5288a1 [macOS] Fix borderless mode on macOS 13.6+.
(cherry picked from commit 873d4079d1)
2023-10-24 18:29:40 +02:00
Aitor Guevara fdfa59ee6c [Windows] Fix not applying NVIDIA profile to new executables
An NVIDIA profile is applied to the current executable to disable
threaded OpenGL optimizations on Windows (see #71472). But because the
application is only added to the profile upon the profile creation,
newer executables won't be added to the profile (e.g. if the profile is
created on first launch of Godot_v4.1-stable_win64.exe, when users
update the editor and launch Godot_v4.2-stable_win64.exe, the profile
will never be applied to this new executable).
This patch fixes that scenario by splitting creating the profile (if it
doesn't exist) and adding the application (if it doesn't have a profile
applied) into two separate steps.
Applications that have been manually added to a different profile aren't
overriden to avoid confusing users who know what they're doing.

(cherry picked from commit 6263774aec)
2023-10-24 18:17:02 +02:00
GrammAcc 3c3fad858c AssetLib: Fix long plugin names breaking the UI
The UI was extending past the screen width when loading a page diplaying
a plugin with an especially long title in the asset store plugin.

I implemented a new `EditorAssetLibraryItem::clamp_width` method that
checks that the title text is not longer than the column width minus
some padding and truncates it if it is.

I also noticed that the nav buttons for paginated results were causing the UI to extend past
the screen width on higher editor scales since they were hardcoded to
show ten page buttons if there were enough results. I modified the
pagination slightly to display a dynamic number of nav buttons based on
the editor scale in order to fix this other cause of the same problem.

I had to use the font of the `title`, which is a `LinkButton` in order
to determine the text width, so I added a public getter `get_button_font` to the `LinkButton` class.

(cherry picked from commit d63a88bef1)
2023-10-24 18:17:02 +02:00
0x4448 ced93eb2e5 Omit quotes from completion if triggered with quote
Typing a single or double quote in an external editor triggers
auto-completion. The returned CompletionItem should not include
quotes since they're already in the editor.

CompletionParams was missing context in to_json() and this is
required to detect whether a quote was typed.

(cherry picked from commit 7ea4247c3d)
2023-10-24 18:17:02 +02:00
jsjtxietian 2d82ab735c Fix can not set process priority of node if not any process is processing
(cherry picked from commit e36117f557)
2023-10-24 18:17:01 +02:00
BlueCube3310 f220aaa54b Fix TreeItem range slider not working
(cherry picked from commit c759ac0e4f)
2023-10-24 18:17:01 +02:00
Eric Liu 3bc614bb1c Fix conversion of hex color strings in project converter
(cherry picked from commit d94ad09903)
2023-10-24 18:17:01 +02:00
Hugo Locurcio 61374c7794 Clarify difference between surface material and surface override material
(cherry picked from commit f4fd6d0d99)
2023-10-24 18:17:01 +02:00
kleonc e5c8d1ec0b Fix animated tile time-slice calculation accumulating float errors
(cherry picked from commit 20d6a9b2e1)
2023-10-24 18:16:52 +02:00
Rémi Verschelde aa05918971 zlib/minizip: Update to version 1.3
Upstreams the fix from #73310, so we can remove that patch.
Remove `infback.c` which we stopped compiling after #79273.

The `OF` macro was also removed so I can drop the patch where I yell
at Gentoo developers.

(cherry picked from commit e0e1f2e4a2)
2023-10-24 17:48:46 +02:00
RedworkDE fb73281519 Fix ZIPReader failing to open empty zip files
(cherry picked from commit 071499ac0d)
2023-10-24 17:48:46 +02:00
Fabio Alessandrelli fbc4ed8d94 mbedTLS: Update to version 2.18.5
(cherry picked from commit 5333365593)
2023-10-24 17:38:21 +02:00
Adam Scott 21e1148cc5 Fix godot_js_wrapper_create_cb regression
(cherry picked from commit 8447cbc16d)
2023-10-24 17:25:07 +02:00
SysError99 55ae5b0a78 Fix JavaScript callback memory leak issue
Typo fix

(cherry picked from commit 6a90164a03)
2023-10-24 17:25:07 +02:00
Saracen 314dac441b Fix dependency menu not showing up if scene failed to load.
(cherry picked from commit c0e872c05b)
2023-10-24 17:23:21 +02:00
Saracen eb414422fe Make notify_dependency_error only defer calls if called from secondary threads.
(cherry picked from commit 0b0a6109b6)
2023-10-24 17:16:30 +02:00
bitsawer 3d47a3662f Fix LightmapGI baking with GridMap
(cherry picked from commit 8c26da5460)
2023-10-24 17:10:40 +02:00
bruvzg ff59871b86 Fix compiler detection.
(cherry picked from commit 89b568c2b0)
2023-10-24 17:08:57 +02:00
Mario Liebisch 5bb54d3184 Updated compiler version detection
This fixes multiple issues/inconsistencies around  `get_compiler_version()`:
* With no shell allocated, launching the compiler could fail even
  with proper paths being set.
* The return value was described as "an array of version numbers as ints",
  but the function actually returned a `Dictionary` (or `None`).
* Not all calls were properly handling a `None` return value in case of errors.
  On Windows this broke compiling for me since #81869 with default settings.
* Some calls defined inconsistent defaults/fallbacks (`0` or `-1`).

(cherry picked from commit 426e18fd37)
2023-10-24 17:08:57 +02:00
bitsawer 08bc3570ae Fix ImporterMesh bone weight handling during lightmap unwrap
(cherry picked from commit 145503765a)
2023-10-24 17:05:24 +02:00
bitsawer 4f04d3191e Fix LightmapGI shading sometimes being unlit or black
(cherry picked from commit dda8846dea)
2023-10-24 17:05:02 +02:00
Lyuma 299413157a Avoid crash when generating LODs on meshes with non-finite vertices.
(cherry picked from commit acf76027bd)
2023-10-24 16:52:59 +02:00
chokomancarr 78713a427c fix incorrect GL format code for 16 bit float formats
For FORMAT_XXXH half-precision format constants, the description uses GL_XXX32F, which is incorrect.
This fixes it to GL_XXX16F to align with the intended precision.

(cherry picked from commit 4a2de1e17a)
2023-10-24 16:52:59 +02:00
Matias N. Goldberg b7498aeb5d Fix massive validation errors when enabling TAA + MSAA
TAA + MSAA would make Godot request unnecessary flags for an MSAA
velocity texture. flags that were not even actually needed.

This was causing:
 1. Unsupported GPUs to fail completely (e.g. Intel Arc 770)
 2. Wrong codepaths to be followed (causing validation errors, possibly
crashes or glitches)
 3. Unnecessary performance impact in all GPUs.

See
https://github.com/godotengine/godot/issues/71929#issuecomment-1722274359

(cherry picked from commit 4de0ed4adf)
2023-10-24 16:52:59 +02:00
Tom Coxon ba27e16275 Fix animation keyframes being skipped sometimes when being played backwards. #57271
(cherry picked from commit 1a52c0c543)
2023-10-24 16:52:59 +02:00
Aaron Franke 3518801deb Limit mesh complexity in LOD generation to prevent crashing
(cherry picked from commit f95f2d1149)
2023-10-24 16:52:59 +02:00
A Thousand Ships b0c59de143 Fix missing clear for some `set_exclude*` query parameter methods
(cherry picked from commit 95eafcba4c)
2023-10-24 16:52:59 +02:00
Gilles Roudière 89325e8f13 Fix TileMap editor so that pressing control deselects cells correctly
(cherry picked from commit 83f1e31483)
2023-10-24 16:52:59 +02:00
ocean (they/them) 2beec2b00f GDScript: Add check for `super()` methods not being implemented
(cherry picked from commit 729c9b4d4b)
2023-10-24 16:52:59 +02:00
Fredia Huya-Kouadio e0221d1c09 Fix Android input routing logic when using a hardware keyboard
When a hardware keyboard is connected, all key events come through so we can route them directly to the engine.
This is not the case for soft keyboards, for which the current logic was designed as it requires extra processing.

(cherry picked from commit 87102e358d)
2023-10-24 16:52:58 +02:00
Chia-Hsiang Cheng 48b92610ce Ensure methods skipped by AnimationPlayer::seek are not called
(cherry picked from commit 125ae78a89)
2023-10-24 16:52:58 +02:00
Haoyu Qiu d69359fa92 Fix description of dock slot usage in the documentation
(cherry picked from commit 6cdf5eff21)
2023-10-24 16:52:00 +02:00
jsjtxietian a8e67284a9 Fix clear color's alpha value will affects 2D editor in Compatibility mode
When the rt's transparency is false, force the alpha of the clear color to one

(cherry picked from commit e21a485dbc)
2023-10-24 16:33:54 +02:00
Alexander Hartmann e19f868e09 Fix go to parent folder in EditorFileDialog
(cherry picked from commit 40046bcf60)
2023-10-24 16:33:53 +02:00
A Thousand Ships 74506ce901 Fix incorrect cast when animating `int`
Type was cast to `int` rather than `int64_t`
Also corrects `real_t` to `double`

(cherry picked from commit 035cf5e210)
2023-10-24 16:33:53 +02:00
David Nikdel 4d498e18ec Remove nondeterminism in pck_packer
PCK files (like other build products) should be deterministic based on their inputs. Removed calls to Math::rand() that are being used to generate padding.

Looks like these were introduced as part of adding encryption support, but the padding being random does not have any cryptographic significance. This can be trivially inferred since file blocks that happen to be aligned don't get padding anyway.

If there's a desire to indroduce something that functions as a nonce it should probably be added explicitly and only if encryption is enabled.
remove Math::rand() calls in editor_export_platform.cpp

follow up to make consistent with pck_packer

(cherry picked from commit 067807c1cb)
2023-10-24 16:33:53 +02:00
AttackButton 90b8a2ae8c Add missing YEN, SECTION and OPENURL names to keycode mappings
(cherry picked from commit 8908ac4e6e)
2023-10-24 16:07:42 +02:00
Raul Santos 3c84e5a947 Fix int's C# documentation
- There's no implicit conversion from `double` to `int`, a cast was missing.
- The example about literals in GDScript also applies to C# (with the same syntax even).

(cherry picked from commit 0897a795c3)
2023-10-24 16:07:42 +02:00
Chia-Hsiang Cheng 9e7652c5db Ensure the visibility is updated when entering the tree
(cherry picked from commit 3a3ebbf4c9)
2023-10-24 16:07:42 +02:00
A Thousand Ships a9566c17fc Fix comparison of `Callable`s with binds
(cherry picked from commit 2caf5ae453)
2023-10-24 16:07:42 +02:00
Hugo Locurcio 8d6493fae4 Initialize View Frame Time estimates to match 120 FPS
This prevents the estimation from being extremely high (close to 100,000 FPS)
until enough time has passed to display an accurate estimation.

(cherry picked from commit 15b31f0891)
2023-10-24 16:06:29 +02:00
BlueCube3310 165c49066b Fix grayscale dds loading
(cherry picked from commit cbbcaa31d5)
2023-10-24 16:06:29 +02:00
Pedro J. Estébanez d3d5531658 Fixup special case of cluster render
(cherry picked from commit e9b4d25f20)
2023-10-24 16:06:28 +02:00
ARez ca6fba87de Add missing RenderingDevice method descriptions
(cherry picked from commit bd4d43023d)
2023-10-24 16:06:28 +02:00
Mateus Elias cfd8b3cd9b Improve MeshDataTool.get_face_vertex() method description
Improve MeshDataTool.get_face_vertex() method description and also add an example code.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
(cherry picked from commit adb0d0ea58)
2023-10-24 16:06:28 +02:00
bitsawer daa44c778c Fix VoxelGI CameraAttributes exposure normalization handling
(cherry picked from commit c73e1f0d22)
2023-10-24 16:05:00 +02:00
bitsawer 7d76bcbac6 Fix Vulkan multithreaded compute list and GPU particle processing
(cherry picked from commit 5d18e2ee00)
2023-10-24 16:05:00 +02:00
Rakka Rage 22560c5bf0 Convert TileSet Atlas Merge input images to RGBA8 to match output, if needed
(cherry picked from commit dc2aa69c46)
2023-10-24 16:05:00 +02:00
Brecht Kuppens 4944a07044 Windows: Always double-quote path when launching explorer.exe to browse
Code now always double quotes the filename to use as command line
argument when calling explorer.exe. In particular, commas in a filename
would be interpreted by explorer.exe as separators for commands.

Similarly a trim_suffix for "file://" is assumed to be a mistake, this
could potentially be a PREfix that we want to strip, but never a suffix.
Since it didn't seem needed in the end, we removed it.

(cherry picked from commit 5608b1d411)
2023-10-24 16:05:00 +02:00
Fabio Alessandrelli 560c52cef2 [MP] Fix watch properties not being correctly removed
(cherry picked from commit 3860f2e366)
2023-10-24 16:05:00 +02:00
Marcus Elg 035fece0e7 Fix GPUParticle2D offset stutter
(cherry picked from commit 936fd8db38)
2023-10-24 16:05:00 +02:00
Bastiaan Olij 82846a7e6d Fix missing decal mask in mobile renderer
(cherry picked from commit 8449331f13)
2023-10-24 16:05:00 +02:00
Markus Sauermann 1c0ffdaa87 Document mouse-picking limit of 64 objects
(cherry picked from commit 765da0a365)
2023-10-24 16:05:00 +02:00
vitormaduro 60b432a1f0 Updated C# example for method AddPropertyInfo
(cherry picked from commit 694f280acd)
2023-10-24 16:04:59 +02:00
azuloo 3de5e5d4d4 Fixes LSP connection error when launched in a separate thread
(cherry picked from commit a5710d468b)
2023-10-24 16:04:59 +02:00
Kirill Diduk eaa2485a5d [bugfix] Fix reimporting scene withh default values selected
This commit fixes #78140

When the scene was re-imported with non-default values of some settings, re-importing it again using default values for those settings didn't have the effect.

The problem was that when handling the reimport, a wrong dictionary of the settings was used.

(cherry picked from commit 8b729e5b7e)
2023-10-24 16:04:59 +02:00
Hugo Locurcio 67e1849bd4 Add missing tutorials to documentation classes
(cherry picked from commit 469c462b76)
2023-10-19 21:59:32 +02:00
Chia-Hsiang Cheng 1588eae8fa Ensure POINT_SIZE takes effect
(cherry picked from commit 0cf57e1927)
2023-10-19 21:49:01 +02:00
PorkrollPosadist f5130502be Use EWMH for DisplayServerX11::_window_minimize_check() implementation
(cherry picked from commit 5666656d42)
2023-10-19 21:49:00 +02:00
pidogs 67f5ec2f2f Make CSGShape follow curve's tilt in Path mode
Fixes #65634.

(cherry picked from commit f476b74ecf)
2023-10-19 21:49:00 +02:00
Rindbee 00d5da2f09 Clear the previously set state when configuring for a new scene root node
Saving a subscene causes the main scene to be re-instantiated. And the resource
instance in the main scene will be reused when the main scene is re-instantiated.
So for resources with `resource_local_to_scene` enabled, resetting state may be
necessary (at least for `ViewportTexture`).

(cherry picked from commit 4795c3cdfa)
2023-10-19 21:49:00 +02:00
Danil Alexeev d5a11e17b8 GDScript: Check `get_node()` shorthand in static functions
(cherry picked from commit 0f27c4ad80)
2023-10-19 21:49:00 +02:00
jsjtxietian efa82d5025 fix CollisionShape3D Shape Size handle will missing
when Script editor floating

(cherry picked from commit fec0396cac)
2023-10-19 21:49:00 +02:00
Chia-Hsiang Cheng 3e9751aca4 Avoid emitting signals if the animation is not ready to be processed
(cherry picked from commit ef5d0b1c06)
2023-10-19 21:48:43 +02:00
Andrés Botero 2e39550306 Fix empty XML tag doc in XMLParser.xml
Fix doc to show how an empty XML tag is appropiately closed.

(cherry picked from commit 3fdca75365)
2023-10-19 21:45:12 +02:00
Septian 35d622b029 Fix particle shader deterministic random values
(cherry picked from commit cb7400d67a)
2023-10-19 21:45:12 +02:00
Emmanuel Ferdman 7773e1ed96 docs: fix link to two's complement wiki page
Signed-off-by: Emmanuel Ferdman <emmanuelferdman@gmail.com>
(cherry picked from commit f000be3237)
2023-10-19 21:45:12 +02:00
mandryskowski 666460448d Clarify the behaviour of CSGMesh3D using ArrayMesh
(cherry picked from commit 378f835a9c)
2023-10-19 21:45:12 +02:00
Septian bede7fa0d8 Fix `get_method` from named lambda
(cherry picked from commit 793cc080cb)
2023-10-19 21:45:12 +02:00
Bastiaan Olij ed94e3eb79 Fix issue with four subpasses always been requested in mobile renderer
(cherry picked from commit 414df467cd)
2023-10-19 21:45:12 +02:00
Haoyu Qiu b027d000cb Fix OptionButton min size when fit longest item is enabled
(cherry picked from commit 5dd854513e)
2023-10-19 21:45:12 +02:00
samdevelopscode 7fa44784f8 Add description for SoftBody3D linear_stiffness property
(cherry picked from commit 7ca6e94c36)
2023-10-19 21:45:11 +02:00
Matias N. Goldberg 1f4a5c2c15 Fix validation error when enabling SSIL alone
(cherry picked from commit 666e91b9ff)
2023-10-19 21:45:11 +02:00
bruvzg 02c6d985b8 Fix native popups auto-closing when interacting with non-client area.
(cherry picked from commit e26a6c36c8)
2023-10-19 21:45:11 +02:00
ajreckof 3d0c29cc0a Fix completion option location not found
(cherry picked from commit 4b724c9252)
2023-10-19 21:21:54 +02:00
Haoyu Qiu 06f6ef8fca Fix wrong example output of float*Color in classref
(cherry picked from commit 54f26c66ab)
2023-10-19 21:21:02 +02:00
smix8 d0b652932e Fix pathfinding funnel adding unwanted point
Fixes pathfinding funnel adding unwanted point due to precision issues.

(cherry picked from commit c51e264446)
2023-10-19 21:21:02 +02:00
bruvzg eca105f075 [Windows] Do not force redraw window background on mouse pass-through region change.
(cherry picked from commit b240b5be84)
2023-10-19 21:21:02 +02:00
Raul Santos 85ab269796 C#: Fix line in OpenInExternalEditor
(cherry picked from commit 132a1daf1a)
2023-10-19 21:21:02 +02:00
Ninni Pipping 5cc85fb119 Fix indentation in script templates
(cherry picked from commit 39353462ac)
2023-10-19 21:21:02 +02:00
Haoyu Qiu 06b777fe4a Fix "a number is required" error when printing RID
(cherry picked from commit 35f28407d9)
2023-10-19 21:20:06 +02:00
LRFLEW 3df5907c87 Mobile: Uncomment code required for fog rendering on clear color
(cherry picked from commit db17415df8)
2023-10-19 21:17:46 +02:00
Haoyu Qiu 2192c717a4 Make indentation indicators translatable
(cherry picked from commit a552103531)
2023-10-19 21:17:46 +02:00
detomon cf1674c423 Initialize MSDF parameters in BaseMaterial3D with default
(cherry picked from commit d275a7487d)
2023-10-19 21:17:46 +02:00
Haoyu Qiu 188d9040d3 Fix typo in ResourceImporterImageFont
(cherry picked from commit 80728bdf1e)
2023-10-19 21:06:12 +02:00
smix8 8fab0ff848 Add detail to NavigationAgent signal descriptions
Adds detail to NavigationAgent signal descriptions.

(cherry picked from commit 99e70ab6ef)
2023-10-19 21:06:12 +02:00
Pedro J. Estébanez ff6229e794 Support loading of translations on threads
(cherry picked from commit 5301bbb3a5)
2023-10-19 21:06:12 +02:00
kobewi f7d1f9e25b Improve and clarify paused Tweens
(cherry picked from commit dbecf8bd1a)
2023-10-19 21:06:11 +02:00
Sathvik Mulukutla 77f6d00ad8 Updated Deprecated Method in C# Example Size to Region
(cherry picked from commit 5b3f14cc82)
2023-10-19 21:06:11 +02:00
Hugo Locurcio c8bd1259af Allow using floating-point bone sizes and outline widths in the 2D editor
This is useful when animating pixel art sprites in the 2D editor,
as a value of `1` is often too large when zoomed in.

(cherry picked from commit a39190a18f)
2023-10-19 21:06:11 +02:00
Rémi Verschelde 399c9dc393
Bump version to 4.1.2-stable 2023-10-04 01:22:46 +02:00
Rémi Verschelde 681efc5bc5
Merge pull request #82737 from akien-mga/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.2) - 3rd batch
2023-10-03 23:04:01 +02: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
Rémi Verschelde 78fe0e47b1
Update changelog for 4.1.2 2023-10-03 20:45:35 +02:00
Fabio Alessandrelli 52e2bde16f
[Crypto] Fix generate_random_bytes for large chunks
Properly handle mbedtls errors, ensure we don't ask more bytes than
allowed for each iteration.

(cherry picked from commit e0140601a5)
2023-10-03 20:45:35 +02:00
Nomad1 33b965367c
Fixed VS 2022 Mac compatibility
Visual Studio 2022 on Mac marks the project as invalid if the project Guid is set. Easiest way to fix it is to remove outdated 'EnableGodotProjectTypeGuid' and other Guid references

(cherry picked from commit a119365d4e)
2023-10-03 20:45:35 +02:00
Rémi Verschelde 6b37ad40d7
Web: Disable raycast module by default (no occlusion culling)
This means no CPU occlusion culling (and not compiling Embree), unless
you compile custom export templates with `module_raycast_enabled=yes`.

This reduces the memory footprint significantly, and binary size.

Fixes #70621.

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
(cherry picked from commit 8c40edf8c0)
2023-10-03 20:45:35 +02:00
Rémi Verschelde df0ebc6dfc
SCons: Fix Python 3.12 SyntaxError with regex escape sequences
(cherry picked from commit b362976504)
2023-10-03 20:45:35 +02:00
bruvzg 9308d20d1b
[iOS] Fix build with Xcode 15.
(cherry picked from commit e1c7104e46)
2023-10-03 20:45:32 +02:00
Rémi Verschelde c966bdf358
i18n: Sync translations with Weblate (last 4.1 sync) 2023-10-02 17:01:20 +02:00
Yuri Sizov d5fab0ec4c Fix leak when closing theme editor preview tabs
(cherry picked from commit 5e3229b7ed)
2023-09-27 21:03:23 +02:00
Michael Alexsander 9bf09194cc Make hovered tabs be drawn with the unselected's width at minimum
(cherry picked from commit decae848a8)
2023-09-27 17:48:41 +02:00
Rémi Verschelde 58f0cae4af
mbedtls: Fix MSVC ARM build after 2.28.3 enabled AES-NI intrinsics
(cherry picked from commit d63c1a3953)
2023-09-21 22:13:23 +02:00
DeeJayLSP 2edd2f0202
libwebp: Sync with upstream 1.3.2
(cherry picked from commit 56cfeda7d2)
2023-09-21 22:12:29 +02:00
Rémi Verschelde 089ecc0a82
Merge pull request #82057 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.2) - 2nd batch
2023-09-21 20:09:13 +02:00
Yuri Sizov 71ff34eaee Update changelog for 4.1.2 2023-09-21 17:15:18 +02:00
A Thousand Ships c941715850 Remove leftover debug print in `FileSystemDock`
(cherry picked from commit 1589efb350)
2023-09-21 15:48:10 +02:00
bruvzg 140eb6886f [RTL] Use list iterators for item/paragraph removal.
(cherry picked from commit 88177a5a58)
2023-09-21 15:45:49 +02:00
ajreckof 265fe750a8 Fix CodeEdit completion being very slow in certain cases
(cherry picked from commit 1eb3d99ff7)
2023-09-21 15:44:36 +02:00
Tyler fed41ae520 Fix Windows console wrapper and icon being swapped
Fixes #80238.

(cherry picked from commit 3cf1e04579)
2023-09-21 15:43:10 +02:00
Ben Rog-Wilhelm f8cf6eb567 Fix NavMesh `map_update_id` returning 0 results in errors
(cherry picked from commit d0564f2466)
2023-09-21 15:41:49 +02:00
Fabio Alessandrelli 4355bf9cf3 [Web] Update npm packages
(cherry picked from commit 61e7d47344)
2023-09-21 15:39:16 +02:00
Chia-Hsiang Cheng e65172237c Avoid duplicating the 'Filters' section
(cherry picked from commit e0cbbe4bbd)
2023-09-21 15:28:24 +02:00
Adam Scott 6318354212 Fix integer value for GL_MAX_UNIFORM_BLOCK_SIZE overflowing
(cherry picked from commit 9c7db7397f)
2023-09-21 15:28:24 +02:00
Fabio Alessandrelli dabd733c4c [ENet] Properly set transfer flags when using custom channels
(cherry picked from commit b96d247ba2)
2023-09-21 15:28:24 +02:00
Sami Kalliomäki c26722badf Do not call Array default constructor when not necessary.
This fixes a bug where Array would get registered twice with the
DisposablesTracker causing an exception on shutdown.

Fixes #81231

(cherry picked from commit 43a6748dfd)
2023-09-21 15:28:24 +02:00
Haoyu Qiu cdc26082aa Make blend file importer warnings translatable
(cherry picked from commit b35a847109)
2023-09-21 15:28:24 +02:00
bitsawer 8d22e58063 Fix GLES3 multimesh rendering when using colors or custom data
(cherry picked from commit 9897f1cfb9)
2023-09-21 15:28:24 +02:00
kleonc 3b3f7efadb Fix CanvasModulate logic for updating canvas modulate
(cherry picked from commit f12164d311)
2023-09-21 15:28:24 +02:00
Silc Lizard (Tokage) Renew bb4ad56e95 Fix NodeTransition with negative time scale
(cherry picked from commit 1ac2bdd97b)
2023-09-21 15:28:24 +02:00
Chia-Hsiang Cheng bad5e93945 Remove animation tracks with correct indices
(cherry picked from commit 3d7facd21c)
2023-09-21 15:28:24 +02:00
Hugo Locurcio 89dd2d066f Document `RenderingServer.get_video_adapter_name()` may report a fixed name
Firefox will always report the user's GPU as a GeForce GTX 980 in
an attempt to make fingerprinting more difficult.
This is not the case in Chromium-based browsers though.

(cherry picked from commit c751f190c9)
2023-09-21 15:28:24 +02:00
Hugo Locurcio 9812dfd450 Document ScrollContainer signals being emitted for touch events only
(cherry picked from commit d01184fbb7)
2023-09-21 15:28:24 +02:00
Nikola Bunjevac 3b4748f6b5 Fix RichTextLabel character line and paragraph index getters
(cherry picked from commit e2536d0643)
2023-09-21 15:28:23 +02:00
trollodel 5e8654decb Make the single window mode check more strict
Check the "interface/editor/single_window_mode" editor settings.

(cherry picked from commit 0f6327b59b)
2023-09-21 15:28:23 +02:00
Ricardo Subtil 788ee7938b Ensure `joy_connection_changed` is emitted on the main thread
(cherry picked from commit 1bb73b0689)
2023-09-21 15:28:23 +02:00
Dario fc130b26f8 Fix motion vectors being corrupted when using precision=double and resulting in the TAA pass being completely broken.
See Issue #69528. When building with precision=double, the TAA pass would break due to the motion vectors being corrupted. It was apparent the origin of the camera itself was corrupted in the UBO for the previous frame because the camera origin was only being split correctly for the current block but not for the previous block (to effectively support the double precision float on the shader).

(cherry picked from commit 77776f5313)
2023-09-21 15:28:23 +02:00
bruvzg 21da3f3847 [X11] Do not fail DisplayServer init if non-essential extensions are missing.
(cherry picked from commit acff87ffda)
2023-09-21 15:28:23 +02:00
Spencer Chang c339abe1aa Added path to output of missing import texture metadata
(cherry picked from commit 57d9e3bb0e)
2023-09-21 15:14:04 +02:00
jsjtxietian 1238554f05 Use ui_text_submit to confirm and close text prompts
Fix press space when enter editor layout name will
confirm and save layout, same in theme editor

(cherry picked from commit ba41910967)
2023-09-21 15:14:04 +02:00
David Snopek 113cfdfc69 Fix overriding _export_begin, _export_file and _export_end from GDExtension
(cherry picked from commit d09843c5ae)
2023-09-21 15:14:04 +02:00
Ninni Pipping 4734295fd1 Fix version check for GDExtension
(cherry picked from commit 97ef4a0536)
2023-09-21 15:14:04 +02:00
Markus Sauermann 45718ef635 Fix superfluous `"` in error message
(cherry picked from commit fa8fec2cc1)
2023-09-21 15:14:04 +02:00
jsjtxietian 2e71f6a806 fix glMapBufferRange return null when r_index + last_item_index > max_instances
(cherry picked from commit d48b95a305)
2023-09-21 15:12:59 +02:00
Ninni Pipping dfdb6e576c Fix some mixups between 2D/3D in documentation
(cherry picked from commit 7512d88e22)
2023-09-21 15:12:58 +02:00
ocean (they/them) 0b38cf8a8d Add error message when a GDScript resource fails to load.
Currently, GDScripts who are only loaded through `ResourceLoader::load()`,
like Autoloads, do not have a pathway to announce there is an error in their
code. This contributes to significant confusion in error projects when
autoloads are involved. At least partially closes #78230.

(cherry picked from commit cca57171c1)
2023-09-21 15:12:58 +02:00
Lyuma 58e3dd6999 Add missing is_deprecated flag on the SurfaceTool.generate_lod function.
(cherry picked from commit 8153739df9)
2023-09-21 15:12:58 +02:00
Raul Santos a07b83a2dc C#: Hide hostfxr not found error
Godot tries to find hostfxr in two locations, the method that tries
to retrieve the location printed an error when it was not found.
So when the first location fails it was printing an error, even if
the second location succeeded, and users were left confused thinking
there was something wrong with their installation.

Now the error will only be printed when stdout verbose is enabled.
Users will still get an error later if hostfxr is not found in any
of the two locations.

(cherry picked from commit 394c0eb225)
2023-09-21 14:57:13 +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
Emmanouil Papadeas 252d816459 Fix `JavaScriptBridge.eval()` never returning PackedByteArray
It wrongly returned 20 on array buffers, which used to be the enumerator
value of Godot 3.x's type PoolByteArray, and now is the value of type Color,
while it should return 29 which is the enumerator value for PackedByteArray.

(cherry picked from commit c662491bd4)
2023-09-21 14:57:13 +02:00
Chia-Hsiang Cheng cdc0e00557 Draw separators before selected style boxes
(cherry picked from commit 749db00227)
2023-09-21 14:57:13 +02:00
Eoin O'Neill 58ff96b8b7 Prevent double input events on gamepad when running through steam input
During GDC and general testing on Steam Deck units, we found that single
gamepads would often register inputs twice under certain circumstances.
This was caused by SteamInput creating a new virtual device, which Godot
registers as a second gamepad. This resulted in two gamepad devices
reporting the same button presses, often leading to buggy input response
on games with no multi-device logic and other-wise could cause intended
Steam rebindings to not work as intended (for example, swapping o and x
on a playstation pad if that feature isn't supported by the game.)

SDL gets around this by taking in a list of devices that are to be
ignored. When valve sees a controller that wants to be rebound via
SteamInput, they push a new VID/PID entry onto the environment
variable `SDL_GAMECONTROLLER_IGNORE_DEVICES` for the original gamepad
so that all game inputs can be read from the virtual gamepad instead.

This leverages the same logic as we are already using SDL gamepad
related HID mappings.

(cherry picked from commit 8de98dbf21)
2023-09-21 14:57:13 +02:00
Hugo Locurcio 2d480eb632 Uncollapse favorites by default in the editor FileSystem dock
(cherry picked from commit 075bd4b281)
2023-09-21 14:57:13 +02:00
Dario 29bcc51734 Add half-pixel offset to lightmapper rasterization.
Add half-pixel offset to lightmapper to fix issues where the ray would be generated from the wrong spot corresponding to the pixel and causing light leaks. Fixes Issue #69126.

(cherry picked from commit ddc3126bbf)
2023-09-21 14:57:13 +02:00
Dario 1bcb77fb15 Add motion vector support for GPU 3D Particles.
Add the capability of resizing the transforms buffer for particles to be double its size and alternate where the current output is written to. Only works for particles that use index as their draw order.

(cherry picked from commit 293302ccd8)
2023-09-21 14:20:04 +02:00
Dario 1f18125652 Fix incorrect error checking and notifications introduced in PR #80414.
There was an error in the other branch of the refactored function where the size of the array was not properly multiplied by the size of the float to check against the buffer size. This was only an error in the error-checking itself and not the functionality. There was also an error where the proper notification was not emitted whenever the buffer for the multimesh is recreated to invalidate the previous references the renderer might've created to it. This fixes CPU Particles getting corrupted when they're created without emission being enabled.

(cherry picked from commit 420f3890b0)
2023-09-21 14:20:04 +02:00
Dario b447e1baaf Improve handling of motion vectors for multimesh instances.
Fixes #67287. There was a subtle error where due to how enabling motion vectors for multi-meshes was handled, only the first instance would have a valid transforms buffer and the rest would point to an invalid buffer. This change moves over the responsibility of enabling motion vectors only when changes happen to the individual 3D transforms or the entire buffer itself. It also fixes an unnecessary download of the existing buffer that'd get overwritten by the current cache if it exists. Another fix is handling the case where the buffer was not set, and enabling motion vectors would not cause the buffer to be recreated correctly.

(cherry picked from commit 5155870d64)
2023-09-21 14:20:04 +02:00
Matias N. Goldberg efbe9237cc Fix integer underflow when rounding up in VoxelGI
The code wanted to divide and round up:
 - 0 / 64 = 0
 - 63 / 64 = 1
 - 64 / 64 = 1
 - 65 / 64 = 2

However when the dividend was exactly 0 it would underflow and produce
67108864 instead.

This caused TDRs on empty scenes or extremely slow performance

Fix #80286

(cherry picked from commit e783e32108)
2023-09-21 14:09:19 +02:00
Yogendra Manawat a90aac5415 Fix TabContainer's font_hovered_color theme property
(cherry picked from commit d7bf05b490)
2023-09-21 14:09:19 +02:00
bitsawer 904582b4a8 Fix Vulkan texture update
(cherry picked from commit 3daa19dd95)
2023-09-21 14:09:19 +02:00
bitsawer bc95b36fbf Clear SDFGI textures when created
(cherry picked from commit 09c887ce82)
2023-09-21 14:09:19 +02:00
Haoyu Qiu 9dfb3ddad5 Fix ItemList not update when icon scale changes
(cherry picked from commit 1bf4c12c0a)
2023-09-21 14:09:19 +02:00
Hugo Locurcio a972686972 Clamp Volumetric Fog Length property to prevent rendering issues
A length of 0 units doesn't make sense anyway.

(cherry picked from commit 8041cff865)
2023-09-21 14:09:19 +02:00
Haoyu Qiu de5a7b3764 Fix Button text when overrun is not trim nothing
(cherry picked from commit 7f70ac56a0)
2023-09-21 14:09:19 +02:00
Danil Alexeev 102f93b8b8 GDScript: Fix conflict between property and group names
(cherry picked from commit bf8f996212)
2023-09-21 14:09:19 +02:00
A Thousand Ships c4be3487ca Make editor camera speed indicator use `m/s` and `m`
(cherry picked from commit 8d7a2c615c)
2023-09-21 14:09:19 +02:00
A Thousand Ships 485d53133d Add check to ensure registered classes are declared
Checks that all classes registered to `ClassDB` have been properly
declared with `GDCLASS`

(cherry picked from commit c638238fae)
2023-09-21 13:50:25 +02:00
clayjohn 5261d12a66 Enable depth writes during shadow pass and depth pass. Disable during color pass
This fixes an unreported performance bug. Basically, without this change, the depth prepass did nothing

(cherry picked from commit b986afed46)
2023-09-21 13:50:25 +02:00
Yuri Sizov 08bd6ba734 Check the native base of scripts when resolving icons
(cherry picked from commit 21c5f86d5d)
2023-09-21 13:35:31 +02:00
kobewi a5b59b596f Don't grab theme icons for scripts
(cherry picked from commit 51f92d1100)
2023-09-21 13:34:46 +02:00
Adam Scott 4f59255059 Fix file permissions for the web platform
(cherry picked from commit b6faccccd5)
2023-09-21 13:34:46 +02:00
Rémi Verschelde daedd124ac
Merge pull request #82004 from dalexeev/4.1-gds-fix-pot-gen-crash-on-assignee-with-index
[4.1] GDScript: Fix POT generator crash on assignee with index
2023-09-20 23:35:18 +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
Rémi Verschelde 8be838481d Allow unbundling OpenXR (for Linux distros)
Copy XrMatrix4x4f_CreateProjectionFov to our OpenXRUtil, instead of relying
on a private header.

(cherry picked from commit 34a07b81ae)
2023-09-20 22:44:05 +02:00
bruvzg a4c041b6b6 [macOS] Workaround Xcode 15 linker bug.
(cherry picked from commit 6da8c7a662)
2023-09-20 22:44:05 +02:00
Valery Zhuk 94dfa4eaf9 fix build options configuration for Visual Studio projects
(cherry picked from commit 6158578087)
2023-09-20 22:44:04 +02:00
Dario 5f7685c831 Carry over the windows_subsystem setting to the generated vsproj if it's not the default.
Even if you specify the subsystem to be the console one, the vsproj doesn't carry over the setting, which makes working with this mode in the IDE a bit annoying since it'll regenerate the vsproj right afterwards. Since there's only two options and 'gui' is the default, we only carry over the 'console' setting.

(cherry picked from commit cda4b4ebf3)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 12aeb83043 Web: Fix version check for missing scalbnf LTO workaround
The check needs to happen after we set `env["CXX"]`.
Follow-up to #81340.

(cherry picked from commit 50161808c2)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 6122cf3178 Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.

(cherry picked from commit b064008c07)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 9fb23c4e56 CI: Bump version for `actions/checkout@v4` and `actions/setup-dotnet@v3`
(cherry picked from commit de14f1d295)
2023-09-20 22:44:04 +02:00
ocean (they/them) cd2e003a05 Build system: add option for MSVC incremental linking.
(cherry picked from commit bbafe14970)
2023-09-20 22:44:04 +02:00
bruvzg d3265cf518 [Windows] Add main executable to the console wrapper dependencies to prevent simultaneous linking.
(cherry picked from commit f37ace7036)
2023-09-20 22:44:04 +02:00
Rémi Verschelde e30ff075ce CI: Propagated error code when glue generation fails
This used to be ignored as we ran the X11 version with Vulkan software renderer and xvfb-run, which could crash at the time. Now that we have headless mode, this is not a problem anymore.

(cherry picked from commit 5eb8253fc0)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 21adf29b8e SCons: Enable `/WX` on LINKFLAGS for MSVC with `werror=yes`
(cherry picked from commit 30bdb23f03)
2023-09-20 22:44:04 +02:00
Rémi Verschelde cdce948473 Fix GCC -Wmaybe-uninitialized warnings
(cherry picked from commit efdff9cbc2)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 32b7664371 SCons: Disable misbehaving MSVC incremental linking
Fixes #77968.

(cherry picked from commit bc1aef88ee)
2023-09-20 22:44:04 +02:00
bruvzg ee009d26da Fix API validation script on macOS.
(cherry picked from commit 231c07d1af)
2023-09-20 22:44:04 +02:00
Rémi Verschelde 3076f2f9c9 CI: Make extension API compatibility check mandatory
This means that any PR which breaks the extension API should
handle it properly, that is:

- Add compatibility methods to ensure that existing function hashes work
- Document the changes in the relevant misc/extension_api_validation/ file

(cherry picked from commit a890457693)
2023-09-20 22:44:04 +02:00
kobewi ef1d0cda30 Automatically add path to built-in scripts
(cherry picked from commit ed6ad376c6)
2023-09-20 22:44:04 +02:00
William Edwards 9332a2b387 Fix dumping of signal API parameters
(cherry picked from commit 188132884d)
2023-09-20 22:44:04 +02:00
Dario f6f2b0897a Propagate error correctly when max texture size for lightmaps is too small.
Add error handling for BAKE_ERROR_LIGHTMAP_TOO_SMALL, which was previously ignored. Fixes #81453.

(cherry picked from commit 7dfb854556)
2023-09-20 22:44:04 +02:00
jsjtxietian f2b6eda210 Fix a crash when enable a plugin uses `make_mesh_previews`
The bug happens when plugin tree is propagating mouse events
(so it is blocked), but EditorProgress's dtor will make main editor
focused and call update_plugins immediately
 which will update the blocked tree.

(cherry picked from commit 7e3a762369)
2023-09-20 22:44:04 +02:00
Danil Alexeev 6d5127d34b Core: Fix recursion level check for `VariantWriter::write()` with objects
(cherry picked from commit 5d689ad560)
2023-09-20 22:44:04 +02:00
bitsawer 3c5f715053 Fix Vulkan crash with many Omni/SpotLights, Decals or ReflectionProbes
(cherry picked from commit d6f45e4f14)
2023-09-20 22:44:04 +02:00
A Thousand Ships 4e539028fb Fix memory access error for `MultiMesh` with GLES3
Buffer was incorrectly assigned when invalid data was provided

(cherry picked from commit 6cb28e481f)
2023-09-20 22:44:04 +02:00
HolonProduction 96b8861c9d Fix crash when hiding subwindow during popup of new subwindow
(cherry picked from commit e2cea458a3)
2023-09-20 22:44:04 +02:00
clayjohn 2c9901af36 Remove GPU readback from NoiseTexture3D.get_format
(cherry picked from commit 60d5571d6c)
2023-09-20 22:44:04 +02:00
Lyuma 6fa4270d71 Use image index instead of texture index for source_images
(cherry picked from commit f67b6c158c)
2023-09-20 22:44:04 +02:00
Ninni Pipping f54cbe6b76 Prevent crash when accessing `Node` Multiplayer from thread
(cherry picked from commit 7bd3a3a5e5)
2023-09-20 22:44:03 +02:00
Hrvoje Varga 8f32e968b8 Fix scene tab close
(cherry picked from commit 51923fc528)
2023-09-20 22:44:03 +02:00
Rindbee 5f46bca824 Fix history mismatch
Set the properties of the resource's proxy instead of setting the resource's
properties directly. (For action "Set ...")

Update the path of the edited scene when saving the scene. (For action "Add
atlas source")

(cherry picked from commit 28db5e7649)
2023-09-20 22:44:03 +02:00
Fabian Keller 76f61b3960 bugfix for audio stream generators getting killed accidentally by audio server
(cherry picked from commit 4eac548202)
2023-09-20 22:44:03 +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
kleonc bf15d20e56 Enable transparent background for GUI tooltips
(cherry picked from commit c66dfd2cfe)
2023-09-20 22:44:03 +02:00
bitsawer 3920b2db05 Fix empty shader resource loading
(cherry picked from commit 15eec2450a)
2023-09-20 22:44:03 +02:00
bitsawer a606b03fd7 Fix Shader and ShaderInclude resource loading
(cherry picked from commit 26e3443eef)
2023-09-20 22:44:03 +02:00
Danil Alexeev c57d6c9371 Core: Fix recursion level check for array stringification
(cherry picked from commit bb40bd9aaa)
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
Danil Alexeev 18f69e9ee1 GUI: Fix text overlapping icon in `Tree`
(cherry picked from commit 07d23489f4)
2023-09-20 22:13:23 +02:00
Danil Alexeev 676013ce96
[4.1] GDScript: Fix POT generator crash on assignee with index 2023-09-20 22:12:10 +03:00
Danil Alexeev 75db138533 GUI: Fix `Tree` performance regression by using cache
(cherry picked from commit 5fb975e4a5)
2023-09-20 18:40:36 +02:00
Fabio Alessandrelli 5eabd5e04a [Web] Always return -1 as body length in HTTPClientWeb.
Body length cannot be reliably retrieved from the web.
Reading the "content-length" value will return a meaningless value when
the response is compressed, as reading will return uncompressed chunks
in any case, resulting in a mismatch between the detected body size and
the actual size returned by repeatedly calling read_response_body_chunk.

Additionally, while "content-length" is considered a safe CORS header,
"content-encoding" is not, so using the "content-encoding" to decide if
"content-length" is meaningful is not an option either.

We simply must accept the fact that browsers are awful when it comes to
networking APIs.

(cherry picked from commit f4713d235a)
2023-09-20 18:40:36 +02:00
Rémi Verschelde f2c8eea60e
i18n: Sync translations with Weblate 2023-09-08 12:10:22 +02:00
Rémi Verschelde f2644f0cb0
Merge pull request #81245 from AThousandShips/future_proof_4_1
[4.1] Future proof links in docs
2023-09-06 18:44:33 +02:00
A Thousand Ships 8e9852fa43 Future proof links in docs 2023-09-02 10:51:58 +02:00
Rémi Verschelde a43c625d4e
Merge pull request #81202 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.2) - 1st batch
2023-09-01 16:28:30 +02:00
Malcolm Nixon d7f7c92f61 Unbind the framebuffer when updating meshes.
While the vertex shaders used to update the meshes aren't actually rendering to the framebuffer, they may still refuse to run with some framebuffers bound - such as XR with multiple views.

(cherry picked from commit 679f5bf410)
2023-08-31 20:19:31 +02:00
LRFLEW e47abd790a GLES3: Don't call glTexParameter* for invalid filter and repeat modes
(cherry picked from commit 3e9173f11a)
2023-08-31 20:19:31 +02:00
Markus Sauermann 2d607d7c5c Include Display Server Type in Copy System Info
Add info about X11 or Wayland to System Information on LinuxBSD.

(cherry picked from commit 1712b78e18)
2023-08-31 20:19:31 +02:00
MewPurPur 2c154348fc Make Help.svg not look disabled
(cherry picked from commit 963a63708e)
2023-08-31 20:19:31 +02:00
kleonc 053538c125 Fix byte to float color conversion in DisplayServerWindows::screen_get_pixel
(cherry picked from commit 9d45dd812f)
2023-08-31 20:19:31 +02:00
kleonc e34241a809 Fix arg count checks in SceneDebugger
(cherry picked from commit 95809e58d5)
2023-08-31 20:19:31 +02:00
Septian 5360058d1c Fix documentation for consistency
(cherry picked from commit 377cbaba43)
2023-08-31 20:19:31 +02:00
Adam Scott f3302b8089 Fix Camera2D crash when edited scene root is null
(cherry picked from commit deb45c0cab)
2023-08-31 20:19:31 +02:00
LRFLEW f8ffad873a GLES3: reset anisotropic filtering when changing texture filtering mode
(cherry picked from commit 90f0e97eb9)
2023-08-31 20:19:31 +02:00
univeous 7627337d63 Fix crash when calling get_video_adapter_* in a thread
co-authored-by: Clay John <claynjohn@gmail.com>
(cherry picked from commit 0a64abe891)
2023-08-31 20:19:30 +02:00
Fabio Alessandrelli dc1c3d03da [ENet] Update to upstream master.
(cherry picked from commit 35b70681e7)
2023-08-31 20:19:30 +02:00
Fabio Alessandrelli f6e436c34c [Net] Explicitly handle buffer errors in send/recv
(cherry picked from commit 28001b9ef6)
2023-08-31 20:19:30 +02:00
Ninni Pipping 5641ad49e9 Fix `root_node_layout_direction` setting not enum
(cherry picked from commit 1cac72999b)
2023-08-31 20:19:30 +02:00
Geoffroy Warin da5cf99a34 Add missing useModelFront parameter to GodotSharp Basis and Transform
To LookAt methods.
Also adds Vector3 Model constants.

These were not added after #76082 was merged.

(cherry picked from commit 6c6e5c482c)
2023-08-31 20:19:30 +02:00
Matt Diener 88f5f815e6 C# Fix deserialization of delegates that are 0-parameter overloads
Co-authored-by: Raul Santos <raulsntos@gmail.com>
(cherry picked from commit 783facf60b)
2023-08-31 20:19:30 +02:00
kleonc c6c5b5bf78 Fix Animation::subtract_variant for affine transforms
(cherry picked from commit 87935ca837)
2023-08-31 20:19:30 +02:00
smix8 605f1c0936 Make NavigationRegion3D baking NavMesh on the main thread not finish deferred
Makes NavigationRegion3D baking NavMesh on the main thread not finish deferred.

(cherry picked from commit bb5f16033d)
2023-08-31 20:19:30 +02:00
smix8 663f45ba4e Add more hints to navigation map cell size errors
Adds more hints to navigation map cell size errors.

(cherry picked from commit 90e2d9fa7e)
2023-08-31 20:19:30 +02:00
bruvzg e67b6e0d0f [macOS] Fix uncapped frame rate for windows in the non-active workspaces.
(cherry picked from commit 2ee45dc293)
2023-08-31 20:19:30 +02:00
Bastiaan Olij ed9216d1d8 Fix issue with accessing hand tracking without timing info
(cherry picked from commit 72bd997fe8)
2023-08-31 20:19:30 +02:00
Haoyu Qiu 5e7a5cd2b1 Update OptionButton min size when disabling Fit to Longest Item
(cherry picked from commit 5384c1a579)
2023-08-31 20:19:30 +02:00
Aaron Franke 6ecf741b7a Change property hint range for camera attributes exposure multiplier
(cherry picked from commit 59e7e8c795)
2023-08-31 19:48:17 +02:00
kobewi 56a0004478 Don't use splash minimum display time in editor
(cherry picked from commit 5ee6d33d49)
2023-08-31 19:48:17 +02:00
Ninni Pipping a31b866793 Fix range error for `Array.slice`
(cherry picked from commit 7752a0d8d1)
2023-08-31 19:48:16 +02:00
Haoyu Qiu b0ceeb2341 Hide explicitly specified flag value in Inspector
(cherry picked from commit de83b7166c)
2023-08-31 19:48:16 +02:00
Haoyu Qiu 71ba2aca63 Fix Button clipping when internal margins exist
(cherry picked from commit 71430cdd48)
2023-08-31 19:48:16 +02:00
smix8 cd7411c58d Fix NavigationObstacle2D debug position
Fixes NavigationObstacle2D debug position.

(cherry picked from commit 2512157294)
2023-08-31 19:48:16 +02:00
bitsawer 143963d122 Fix shader type detection
(cherry picked from commit 905c10bc54)
2023-08-31 19:48:16 +02:00
George Marques 01511caaf1 GDScript: Properly track extents of constants and patterns
Even in the case of errors.

(cherry picked from commit cbfe2b61b6)
2023-08-31 19:48:16 +02:00
Michael Alexsander 3bb05da45f Fix delay on tab resizing when (un)hovering tabs
(cherry picked from commit 7ffad29df8)
2023-08-31 19:48:16 +02:00
MineBill 4ec566fae2 Set the VoxelGIData path before saving, otherwise the ResourceSave will revert it to an empty String
(cherry picked from commit c34d5627fb)
2023-08-31 19:48:16 +02:00
Hayden Leete a9a27c7ea5 Add autocomplete for filter/repeat hints on uniform arrays
(cherry picked from commit fc7063b2e2)
2023-08-31 19:48:16 +02:00
kobewi 271e08e543 Allow more hint types for uniform arrays
(cherry picked from commit 8ae2e6681e)
2023-08-31 19:48:16 +02:00
bruvzg f346b8133e [Android] Set `echo` property for the physical keyboard events.
(cherry picked from commit c687bfa697)
2023-08-31 19:48:16 +02:00
Rémi Verschelde b47d786921 miniupnpc: Update to version 2.2.5
No change for the files we ship, so just bumping the version number.

(cherry picked from commit 74f21cb666)
2023-08-31 19:26:49 +02:00
Rémi Verschelde af6e5b9f0d libpng: Update to upstream 1.6.40
(cherry picked from commit 0baca62734)
2023-08-31 19:26:49 +02:00
Rémi Verschelde fc63a8d349 libpng: Enable intrinsics on x86/SSE2, ppc64/VSX, and all arm/NEON
(cherry picked from commit 2c9b7fc7a8)
2023-08-31 19:26:49 +02:00
Rémi Verschelde 8d30a9f2a5 libwebp: Sync with upstream 1.3.1
https://chromium.googlesource.com/webm/libwebp/+/1.3.1/NEWS
(cherry picked from commit 2529ad6a64)
2023-08-31 19:26:49 +02:00
Rémi Verschelde 4c354b4977 mbedtls: Update to upstream version 2.28.4
(cherry picked from commit 1f6340bc46)
2023-08-31 19:26:49 +02:00
Rémi Verschelde 023e154cb4 tinyexr: Sync with upstream 1.0.7
(cherry picked from commit b70e2af3b7)
2023-08-31 19:26:49 +02:00
Rémi Verschelde 894d4ca769 openxr: Sync with upstream 1.0.28
(cherry picked from commit d756169881)
2023-08-31 19:26:49 +02:00
bruvzg c1ba321815 ICU4C: Update to version 73.2
(cherry picked from commit 1061912c7f)
2023-08-31 19:26:48 +02:00
Rémi Verschelde 346d0bba07 FreeType: Update to version 2.13.2
Remove freetype's copy of zlib again, as we don't use it.

(cherry picked from commit 54c4c8dfa5)
2023-08-31 19:26:48 +02:00
bruvzg 9ed12c884a FreeType: Update to version 2.13.1
(cherry picked from commit 008d3de1e9)
2023-08-31 19:26:48 +02:00
Rémi Verschelde 7a86ffc034
i18n: Sync translations with Weblate 2023-08-17 13:23:50 +02:00
Rémi Verschelde caa8c82567 CI: Allow skipping our GHA workflows with `DISABLE_GODOT_CI` variable
Useful for custom forks of Godot which don't want to run our CI for any
reason.

This is configured in `settings/variables/actions` for the repository,
setting it to any value aside from an empty string will skip all jobs.

(cherry picked from commit 4646762c81)
2023-08-02 18:42:29 +02:00
Yuri Sizov e1a12879e9 CI: Extract godot-cpp testing into its own job
This ensures that the godot-cpp job has plenty of resources
to run its build and avoid being affected by the main build.

Additionally:
- Extract test tasks into dedicated actions.
- Upload artifacts as early as possible.
- Ensure that we check master cache before random cache.

(cherry picked from commit deb6025781)
2023-08-02 17:10:30 +02:00
Rémi Verschelde e9cdd1bf08 CI: Free disk space on Linux runners
Removing the Android toolchain saves 14 GiB, which gives us more room
for growth and to avoid running into out-of-space errors in the Linux
sanitizers + debug symbols builds.

Related to #79919, though the caches were just one part of the problem,
the real issue is that our Linux sanitizers builds take 12 GiB, and
adding godot-cpp on top with 2 GiB leaves only a few GiB left for the
cache itself.

(cherry picked from commit 611123f7fd)
2023-08-02 17:07:11 +02:00
Yuri Sizov 6884be6b17 Bump version to 4.1.2-rc 2023-07-17 15:36:23 +02:00
Yuri Sizov bd6af8e0ea
Merge pull request #79576 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.1) - 2nd batch
2023-07-17 14:17:04 +02:00
Yuri Sizov e94d355366 Bump version to 4.1.1-stable 2023-07-17 12:15:23 +02:00
Yuri Sizov 80aef72ef3 Update the changelog for 4.1.1 2023-07-17 12:12:37 +02:00
kobewi b45e7f0f63 Emit history_changed on merged UndoRedo actions
(cherry picked from commit b6bb0d505d)
2023-07-17 12:05:43 +02:00
Septian a6b1c0edbb Fix `tween_property` on "Basis" to properly update its value
(cherry picked from commit eb7f87e9a8)
2023-07-17 12:05:43 +02:00
WiseNoodle 085b16b1bb Add missing word to text of the alert dialog
(cherry picked from commit d1c70cf7d4)
2023-07-17 12:05:42 +02:00
stmSi 74efa063cc Fix: ESC (ui_cancel) not closing FindReplaceBar
(cherry picked from commit 7eb517c27f)
2023-07-17 12:05:42 +02:00
Septian c1ddd0485b Fix dragged nodes have icon size
(cherry picked from commit 837df886f3)
2023-07-17 12:05:42 +02:00
kobewi 0a4067bdbf Clarify return value of get_dependencies()
(cherry picked from commit f567af413a)
2023-07-17 12:05:42 +02:00
Yuri Sizov e709ad4d64
Merge pull request #79297 from YuriSizov/4.1-cherrypicks
Cherry-picks for the 4.1 branch (future 4.1.1) - 1st batch
2023-07-11 15:55:57 +02:00
Yuri Sizov 92cf616f63 Add changelog for 4.1.1 2023-07-11 13:45:48 +02:00
kleonc 2796b629e9 Hide/show AcceptDialog's button spacer on button visibility changed
(cherry picked from commit 30a9c90785)
2023-07-11 13:21:07 +02:00
Rémi Verschelde 30ab0e2cf4 Fix Linux `move_to_trash` wrongly reporting files as not found
We can't rely on the error code from `gio` or `kioclient5`, in my
rudimentary testing they return `1` for both missing files and other
situations like not having a Trash can on the mounted volume.

Fixes #79108.

(cherry picked from commit a6e75f3971)
2023-07-11 12:21:28 +02:00
Rémi Verschelde 6ec2d6d7d0 Linux: Fix build with `use_sowrap=no` and various warnings/errors
(cherry picked from commit dcd16a5750)
2023-07-11 12:21:28 +02:00
Aaron Franke e3cfc023b4 Improve text in popup warning, remove "upgrade or downgrade" text
(cherry picked from commit 95ccbdea4b)
2023-07-11 12:21:28 +02:00
Ninni Pipping 1e2bfdc9bb Improve error message for `Node.set_owner`
(cherry picked from commit 0183340012)
2023-07-11 12:21:27 +02:00
Haoyu Qiu 167b02d942 Clarify EditorExportPlugin::add_file only remaps in _export_file
(cherry picked from commit df1d354d36)
2023-07-11 12:21:27 +02:00
HolonProduction 438a598713 Update FileDialog button activity when file_mode is changed.
(cherry picked from commit cfac7c9a9a)
2023-07-10 18:09:59 +02:00
Aaron Franke 5729e40035 Improve user-friendliness of project version mismatch message
(cherry picked from commit 3b8a81d361)
2023-07-10 18:09:58 +02:00
Aaron Franke ec6d258db0 Fix property hint class name type string restriction and replace mode
(cherry picked from commit 58a65591f5)
2023-07-10 18:09:58 +02:00
kobewi a79160ebd2 Collapse bottom panel if there is no active tab
(cherry picked from commit 59ae7e2445)
2023-07-10 18:09:58 +02:00
Pedro J. Estébanez b3a56228b1 Fix zero-sized WorkerThreadPool not processing group tasks
(cherry picked from commit 28d0d56a69)
2023-07-10 18:09:58 +02:00
Emmanouil Papadeas 2f32a3454c Fix `Camera2D.rotating` not being converted and reversed properly
Godot 3's Camera2D `rotating = true` and `rotating = false` are supposed to be converted and reversed to `ignore_rotation = false` and `ignore_rotation = true` respectively, but this wasn't the case before this PR, as the project converted was failing to properly read the `true` and `false` strings, thus resulting in `ignore_rotation = true` in all cases.

(cherry picked from commit 256b99ca40)
2023-07-10 18:09:58 +02:00
Rémi Verschelde 29b4ee3d97 Change explicit 'Godot 4.0' references to 'Godot 4'
Fixes #79276.

(cherry picked from commit 8a06ec979e)
2023-07-10 18:09:58 +02:00
Chinmay Awale 4f4052581b add 3.x compatibility for animation loop mode
(cherry picked from commit 1686a7a1a2)
2023-07-10 18:09:58 +02:00
NiskashY 36ce14a826 Fix disabled slider highlighting
(cherry picked from commit 4394936392)
2023-07-10 18:09:58 +02:00
Rindbee 1c1d4f6264 Fix `PackedScene::get_last_modified_time()` always returns `0`
The variables operated by `PackedScene::set_last_modified_time()`
and `PackedScene::get_last_modified_time()` are different.

(cherry picked from commit 22edef14c3)
2023-07-10 18:09:58 +02:00
clayjohn d6d8f6a637 Unify error condition for particles trail lifetime
(cherry picked from commit 78ecdb17f9)
2023-07-10 18:09:57 +02:00
Chris Bradfield 55ae2a3297 Fix rigid body property description
(cherry picked from commit 6d85481670)
2023-07-10 18:09:57 +02:00
smix8 0d51fec22b Fix closest possible navigation path position
Fixes closest possible navigation path position.

(cherry picked from commit e5c24f7118)
2023-07-10 18:09:57 +02:00
smix8 bbfdfab748 Add performance note for parsing source geometry
Adds performance note for parsing source geometry.

(cherry picked from commit 976f5338c5)
2023-07-10 18:09:57 +02:00
Kamil Brzoskowski 6becf94f49 Fix formatting of dlopen error message on Windows
And harmonize the format for all platforms.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit 3cd865dbe8)
2023-07-10 18:09:57 +02:00
clayjohn 7447946dd1 Avoid freeze when interacting with menus on Wayland by re-aquiring next swapchain image after updating swapchain
(cherry picked from commit df021b5063)
2023-07-10 18:09:57 +02:00
Septian 5576f5ab81 Fix various typos in documentation
(cherry picked from commit 486609eccf)
2023-07-10 17:46:09 +02:00
RedworkDE 3f334cb144 C#: Fix command line exporting
(cherry picked from commit f3f3365abd)
2023-07-10 17:46:09 +02:00
Markus Sauermann 42b8ae50d2 Fix `Node::add_sibling` parent check
Replace `data.blocked > 0` by `data.parent->data.blocked > 0` in order
to check if the parent is busy.

(cherry picked from commit b02dff6e1c)
2023-07-10 17:46:09 +02:00
Septian add7c218d1 fix typo on TLSOptions.xml and library_godot_display.js
(cherry picked from commit b88b6b4f48)
2023-07-10 17:46:09 +02:00
Arman Elgudzhyan 361c0d53f3 Clear specular buffer if bg mode is canvas and ss effects are used
Explicitly clear the separate specular buffer when the background mode is canvas and screen space effects (and thus a separate specular buffer) are used.

(cherry picked from commit af9d1743f3)
2023-07-10 17:46:09 +02:00
Aaron Franke c8b50871fe Fix incorrect documentation for `Engine.get_architecture_name()`
(cherry picked from commit ebc6ec1692)
2023-07-10 17:46:09 +02:00
MewPurPur a4547db15b Fix erroneous pad_zeros warning
(cherry picked from commit cc5500f7de)
2023-07-10 17:46:09 +02:00
Ninni Pipping fb8e21bd6d Fix `rpc` calls with binds
(cherry picked from commit 7d174c8dfe)
2023-07-10 17:46:09 +02:00
Ninni Pipping 90b4a3fa75 Add compatibility properties to `TouchScreenButton`
Added support for `3.x` properties:
* `normal` -> `texture_normal`
* `pressed` -> `texture_pressed`

(cherry picked from commit c7e4b3bf5f)
2023-07-10 17:46:08 +02:00
Yadnesh Kulkarni 09c245fd74 Fixed grid disappearance
(cherry picked from commit a8dde286ce)
2023-07-10 17:46:08 +02:00
Joe Marshall fa6fb0ac70 fix threading bug in vulkan rendering device
(cherry picked from commit c52fadbe75)
2023-07-10 17:46:08 +02:00
Angad Kambli cdeddffee7 Check parameter validity in `Object::set_script`
Fixes #46120.

(cherry picked from commit 9c6c2f09e0)
2023-07-10 17:46:08 +02:00
Rémi Verschelde 4c1c26979b Linux: Link libsquish directly when unbundling, .pc file unreliable
(cherry picked from commit b3b4f4c1c9)
2023-07-10 17:46:08 +02:00
bruvzg fa45bb63c6 [Windows] Fix setting initial non-exclusive window mode.
(cherry picked from commit db0109b237)
2023-07-10 17:46:08 +02:00
bruvzg 393076a4b3 [macOS/iOS] Set MoltenVK logging level based on `--verbose` flag.
(cherry picked from commit 75d0fcea16)
2023-07-10 17:46:08 +02:00
Ivan Shakhov c9b1d99cae Update the RiderPathLocator to support the JetBrains Toolbox 2.0
(cherry picked from commit bf3af9fd48)
2023-07-10 17:46:08 +02:00
Florian Kothmeier 240701f95a Fix invalid minimum size for translated messages in option button
(cherry picked from commit c33748d954)
2023-07-10 17:46:08 +02:00
Hugo Locurcio ac87b5df75 Mention Xbox menu button by name in Start button description
Microsoft officially calls it the Menu button:

https://support.xbox.com/en-US/help/hardware-network/controller/get-to-know-your-xbox-series-x-s-controller
(cherry picked from commit 1621b4e2b1)
2023-07-10 17:46:08 +02:00
Hugo Locurcio fe8e7a0b22 Use bullet points in shader editor creation dialog
This is consistent with the script creation dialog.

(cherry picked from commit bce2985615)
2023-07-10 17:46:07 +02:00
Hugo Locurcio e32330473a Remove uses of `vformat()` with no placeholders
This is identical to passing the string directly.

(cherry picked from commit dcc92c174e)
2023-07-10 17:46:07 +02:00
lewiji a084f0568f Return shader parse error when using 'hint_normal_roughness_texture' and not using the Forward+ backend
(cherry picked from commit 2a93681334)
2023-07-10 17:46:07 +02:00
Dawid Marzec 87b4143f3b Fix cursor behaviour in Tree while holding CTRL
(cherry picked from commit 9abbdea95e)
2023-07-10 17:26:15 +02:00
Rémi Verschelde 1875ecb776 Project converter: Use same rendering driver as Project Manager
Which means by default OpenGL 3, but it can still be overridden from the command line.
Fixes #76303.

(cherry picked from commit 53c78b2cac)
2023-07-10 17:26:15 +02:00
jpcerrone 2ba192e803 Fix comments and indentation in .gdshaderinc files
Fixes #78205
The handling of comments and indentation in the shader editor
wasn't considering shader include files.

(cherry picked from commit 71b8a9d274)
2023-07-10 17:26:15 +02:00
MewPurPur 8cefce591a Improve string printing in the tiledata editor
(cherry picked from commit 1649dcad0b)
2023-07-10 17:26:15 +02:00
MewPurPur ab14aa9f16 Fix enum tooltip with no description
(cherry picked from commit c0453a544d)
2023-07-10 17:26:15 +02:00
Aaron Franke 4cec4bd32f Sort project tags before saving
(cherry picked from commit d667402461)
2023-07-10 17:26:15 +02:00
kobewi ffc87b2bb1 Focus current node after connecting
(cherry picked from commit d17c522991)
2023-07-10 17:26:15 +02:00
Bauke Conijn 3fd5fecfc1 Fix Camera3D project_* methods not accounting for frustum offset
This does not fix Camera3D::project_ray_normal().
Adds Camera3D::get_camera_projection() and exposes it to GDScript

(cherry picked from commit 47e63bc55f)
2023-07-10 17:26:15 +02:00
bruvzg 221535c33c [Windows] Flash both the window caption and taskbar button on `request_attention`.
(cherry picked from commit 49af2582c4)
2023-07-10 17:26:14 +02:00
Markus Sauermann 4e84660b50 Fix that `_drop_physics_mouseover` only happens when necessary
Previously the call was executed every time, because in the
`_drop_mouse_over();` a few lines above, `gui.mouse_over = nullptr;`
was set.

(cherry picked from commit 37a96d3957)
2023-07-10 17:26:14 +02:00
RedworkDE 69948f7489 C#: Add null check before calling `UnregisterGodotObject`
(cherry picked from commit 693e6e036b)
2023-07-10 17:26:14 +02:00
mb4c 6018ff49d6 Add tooltip description wrapping in scene tree and plugin settings
(cherry picked from commit d007be2d14)
2023-07-10 17:26:14 +02:00
Alfonso J. Ramos 8cea540eba Do not change a node unique name to the same name
(cherry picked from commit b2bef8c47b)
2023-07-10 17:26:14 +02:00
Silc Lizard (Tokage) Renew ed9c091a92 Fix infinity loop state can't break
(cherry picked from commit fc40ba21cd)
2023-07-10 17:26:14 +02:00
bitsawer f5addd583d Make shader preprocessor keyword colors consistent
(cherry picked from commit a5d6152949)
2023-07-10 17:26:14 +02:00
bitsawer 0dec3d6485 Fix shader language float literal precision truncation
(cherry picked from commit 356297f909)
2023-07-10 17:26:14 +02:00
ocean (they/them) a0366f1cea Fix regression with enum descriptions now showing up in documentation.
(cherry picked from commit d48636c3bf)
2023-07-10 17:26:14 +02:00
kobewi 705c1d6bdf Fix dropping files from res:// to res://
(cherry picked from commit 1d970cd6ca)
2023-07-10 17:26:14 +02:00
Rindbee 836913ce7a Make sure the shortcut key respects the context in `TileSetAtlasSourceEditor`
(cherry picked from commit fec731bf33)
2023-07-10 17:26:13 +02:00
Raul Santos 80105226c2 C#: Compare symbol names without null flow state
(cherry picked from commit 671a5b4ea5)
2023-07-10 17:26:13 +02:00
nklbdev 2bfeb29bc6 Potencially fix nan's on octahedral tangents in RenderingServer
(cherry picked from commit 1d16704faf)
2023-07-10 17:26:13 +02:00
nklbdev 92040e85e2 Fix wrong type casting for octahedral tangents
(cherry picked from commit c022f52f11)
2023-07-10 17:26:13 +02:00
Haoyu Qiu 545e37cf77 Translate "No match" message in FindReplaceBar
(cherry picked from commit ac454ce2a7)
2023-07-10 17:26:13 +02:00
Haoyu Qiu a8bfdd8bea Fix error when non-ASCII characters in resource pack path
(cherry picked from commit df5c68af99)
2023-07-10 17:11:22 +02:00
Ben Rog-Wilhelm 371b31c85f Fix: Incorrect property names in FontFile::_get_property_list().
(cherry picked from commit 7ee916a259)
2023-07-10 17:11:22 +02:00
Amir-Rasteg 7a8ac69862 Fix a typo in the `String.to_float` description
(cherry picked from commit 9744657bb8)
2023-07-10 17:11:22 +02:00
RedworkDE 03e82be503 Fix export options of scripted EditorExportPlugins
(cherry picked from commit fa84d09542)
2023-07-10 17:11:22 +02:00
Bastiaan Olij 89e64da028 Take eye offset into account for depth in StandardMaterial3D
(cherry picked from commit 581d081ded)
2023-07-10 17:11:22 +02:00
Rémi Verschelde da1e511f11 Linux: Allow unbundling brotli to use system library
(cherry picked from commit 153c4a4c4f)
2023-07-10 17:11:22 +02:00
Yuri Roubinski 6255a64e03 Fix using uint suffix at the hex number declaration in shaders
(cherry picked from commit 1994c25701)
2023-07-10 17:11:22 +02:00
clayjohn bc9bc236c0 Initialize particles instance buffer in case it is used before being updated
(cherry picked from commit 35ed7c770b)
2023-07-10 17:11:22 +02:00
Markus Sauermann 0ec599473d Revert "Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`"
This reverts commit 7f547fcf09.

(cherry picked from commit bfa7497c1b)
2023-07-10 17:11:22 +02:00
Daylily-Zeleen 71d5827228 Fixed the fallback logic of OS::shell_show_in_file_manager
(cherry picked from commit 9dd9818c88)
2023-07-10 17:11:21 +02:00
RedworkDE ce5c6151fc
C#: Automatically generate version defines
(cherry picked from commit fe7c27b086)
2023-07-05 22:16:02 +02:00
Rémi Verschelde 529a55bab2
Bump version to 4.1.1-rc 2023-07-05 22:14:15 +02:00
1229 changed files with 142595 additions and 67772 deletions

View File

@ -15,3 +15,39 @@
# Style: clang-format: Disable AllowShortIfStatementsOnASingleLine
e956e80c1fa1cc8aefcb1533e5acf5cf3c8ffdd9
# One Copyright Update to rule them all
d95794ec8a7c362b06a9cf080e2554ef77adb667
# Update copyright statements to 2022
fe52458154c64fb1b741df4f7bd10106395f7cbd
# Update copyright statements to 2021
b5334d14f7a471f94bcbd64d5bae2ad853d0b7f1
# Update copyright statements to 2020
a7f49ac9a107820a62677ee3fb49d38982a25165
# Update copyright statements to 2019
b16c309f82c77d606472c3c721a1857e323a09e7
# Update copyright statements to 2018
b50a9114b105dafafdda8248a38653bca314a6f3
# Welcome in 2017, dear changelog reader!
c7bc44d5ad9aae4902280012f7654e2318cd910e
# Update copyright to 2016 in headers
5be9ff7b6715a661e85f99b108f96340de7ef435
# Updated copyright year in all headers
fdaa2920eb21fff3320a17e9239e04dfadecdb00
# Add missing copyright headers and fix formatting
e4213e66b2dd8f5a87d8cf5015ac83ba3143279d
# Use HTTPS URL for Godot's website in the headers
bd282ff43f23fe845f29a3e25c8efc01bd65ffb0
# Add "Godot Engine contributors" copyright line
df61dc4b2bd54a5a40c515493c76f5a458e5b541

3
.github/CODEOWNERS vendored
View File

@ -139,10 +139,9 @@ doc_classes/* @godotengine/documentation
/platform/android/ @godotengine/android
/platform/ios/ @godotengine/ios
/platform/javascript/ @godotengine/html5
/platform/linuxbsd/ @godotengine/linux-bsd
/platform/macos/ @godotengine/macos
/platform/uwp/ @godotengine/uwp
/platform/web/ @godotengine/web
/platform/windows/ @godotengine/windows
# Scene

View File

@ -0,0 +1,18 @@
name: Download Godot artifact
description: Download the Godot artifact.
inputs:
name:
description: The artifact name.
default: "${{ github.job }}"
path:
description: The path to download and extract to.
required: true
default: "./"
runs:
using: "composite"
steps:
- name: Download Godot Artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}

View File

@ -0,0 +1,24 @@
name: Dump Godot API
description: Dump Godot API for GDExtension
inputs:
bin:
description: The path to the Godot executable
required: true
runs:
using: "composite"
steps:
# Dump GDExtension interface and API
- name: Dump GDExtension interface and API for godot-cpp build
shell: sh
run: |
${{ inputs.bin }} --headless --dump-gdextension-interface --dump-extension-api
mkdir godot-api
cp -f gdextension_interface.h godot-api/
cp -f extension_api.json godot-api/
- name: Upload API dump
uses: ./.github/actions/upload-artifact
with:
name: 'godot-api-dump'
path: './godot-api/*'

View File

@ -12,11 +12,24 @@ runs:
steps:
# Upload cache on completion and check it out now
- name: Load .scons_cache directory
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{inputs.scons-cache}}
key: ${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
# We try to match an existing cache to restore from it. Each potential key is checked against
# all existing caches as a prefix. E.g. 'linux-template-minimal' would match any cache that
# starts with "linux-template-minimal", such as "linux-template-minimal-master-refs/heads/master-6588a4a29af1621086feac0117d5d4d37af957fd".
#
# We check these prefixes in this order:
#
# 1. The exact match, including the base branch, the commit reference, and the SHA hash of the commit.
# 2. A partial match for the same base branch and the same commit reference.
# 3. A partial match for the same base branch and the base branch commit reference.
# 4. A partial match for the same base branch only (not ideal, matches any PR with the same base branch).
restore-keys: |
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}-refs/heads/${{env.GODOT_BASE_BRANCH}}
${{inputs.cache-name}}-${{env.GODOT_BASE_BRANCH}}

View File

@ -0,0 +1,18 @@
name: Test Godot project converter
description: Test the Godot project converter.
inputs:
bin:
description: The path to the Godot executable
required: true
runs:
using: "composite"
steps:
- name: Test 3-to-4 conversion
shell: sh
run: |
mkdir converter_test
cd converter_test
touch project.godot
../${{ inputs.bin }} --headless --validate-conversion-3to4
cd ..
rm converter_test -rf

View File

@ -12,7 +12,7 @@ runs:
steps:
# Use python 3.x release (works cross platform)
- name: Set up Python 3.x
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
# Semantic version range syntax or exact version of a Python version
python-version: ${{ inputs.python-version }}

View File

@ -0,0 +1,37 @@
name: Test Godot project
description: Run the test Godot project.
inputs:
bin:
description: The path to the Godot executable
required: true
runs:
using: "composite"
steps:
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
- name: Download test project
shell: sh
run: |
wget https://github.com/godotengine/regression-test-project/archive/4.0.zip
unzip 4.0.zip
mv "regression-test-project-4.0" "test_project"
# Editor is quite complicated piece of software, so it is easy to introduce bug here.
- name: Open and close editor (Vulkan)
shell: sh
run: |
xvfb-run ${{ inputs.bin }} --audio-driver Dummy --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
- name: Open and close editor (GLES3)
shell: sh
run: |
DRI_PRIME=0 xvfb-run ${{ inputs.bin }} --audio-driver Dummy --rendering-driver opengl3 --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
# Run test project
- name: Run project
shell: sh
run: |
xvfb-run ${{ inputs.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt

View File

@ -12,7 +12,7 @@ runs:
using: "composite"
steps:
- name: Upload Godot Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.name }}
path: ${{ inputs.path }}

View File

@ -5,7 +5,7 @@ on:
# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
concurrency:
@ -18,10 +18,10 @@ jobs:
name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Java 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 11

54
.github/workflows/godot_cpp_test.yml vendored Normal file
View File

@ -0,0 +1,54 @@
name: 🪲 Godot CPP
on:
workflow_call:
# Global Settings
env:
# Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.1'
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-cpp-tests
cancel-in-progress: true
jobs:
godot-cpp-tests:
runs-on: "ubuntu-20.04"
name: "Build and test Godot CPP"
steps:
- uses: actions/checkout@v4
- name: Setup python and scons
uses: ./.github/actions/godot-deps
# Checkout godot-cpp
- name: Checkout godot-cpp
uses: actions/checkout@v4
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_BASE_BRANCH }}
submodules: 'recursive'
path: 'godot-cpp'
# Download generated API dump
- name: Download GDExtension interface and API dump
uses: ./.github/actions/download-artifact
with:
name: 'godot-api-dump'
path: './godot-api'
# Extract and override existing files with generated files
- name: Extract GDExtension interface and API dump
run: |
cp -f godot-api/gdextension_interface.h godot-cpp/gdextension/
cp -f godot-api/extension_api.json godot-cpp/gdextension/
# TODO: Add caching to the scons build and store it for CI via the godot-cache
# action.
# Build godot-cpp test extension
- name: Build godot-cpp test extension
run: |
cd godot-cpp/test
scons target=template_debug dev_build=yes
cd ../..

View File

@ -5,7 +5,7 @@ on:
# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
concurrency:
@ -18,7 +18,7 @@ jobs:
name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache

View File

@ -4,8 +4,8 @@ on:
# Global Settings
env:
# Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@ -25,57 +25,56 @@ jobs:
- name: Editor w/ Mono (target=editor)
cache-name: linux-editor-mono
target: editor
tests: false # Disabled due freeze caused by mix Mono build and CI
sconsflags: module_mono_enabled=yes
doc-test: true
bin: "./bin/godot.linuxbsd.editor.x86_64.mono"
build-mono: true
tests: false # Disabled due freeze caused by mix Mono build and CI
doc-test: true
proj-conv: true
api-compat: true
artifact: true
compat: true
- name: Editor with doubles and GCC sanitizers (target=editor, tests=yes, dev_build=yes, scu_build=yes, precision=double, use_asan=yes, use_ubsan=yes, linker=gold)
cache-name: linux-editor-double-sanitizers
target: editor
tests: true
# Debug symbols disabled as they're huge on this build and we hit the 14 GB limit for runners.
sconsflags: dev_build=yes scu_build=yes debug_symbols=no precision=double use_asan=yes use_ubsan=yes linker=gold
proj-test: true
# Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test: true
bin: "./bin/godot.linuxbsd.editor.dev.double.x86_64.san"
build-mono: false
tests: true
proj-test: true
# Generate an API dump for godot-cpp tests.
api-dump: true
# Skip 2GiB artifact speeding up action.
artifact: false
- name: Editor with clang sanitizers (target=editor, tests=yes, dev_build=yes, use_asan=yes, use_ubsan=yes, use_llvm=yes, linker=lld)
cache-name: linux-editor-llvm-sanitizers
target: editor
tests: true
sconsflags: dev_build=yes use_asan=yes use_ubsan=yes use_llvm=yes linker=lld
bin: "./bin/godot.linuxbsd.editor.dev.x86_64.llvm.san"
build-mono: false
tests: true
# Skip 2GiB artifact speeding up action.
artifact: false
- name: Template w/ Mono (target=template_release)
cache-name: linux-template-mono
target: template_release
tests: false
sconsflags: module_mono_enabled=yes
build-mono: false
tests: false
artifact: true
- name: Minimal template (target=template_release, everything disabled)
cache-name: linux-template-minimal
target: template_release
tests: false
sconsflags: modules_enabled_by_default=no disable_3d=yes disable_advanced_gui=yes deprecated=no minizip=no
tests: false
artifact: true
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
# Need newer mesa for lavapipe to work properly.
- name: Linux dependencies for tests
@ -85,6 +84,12 @@ jobs:
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get install -qq mesa-vulkan-drivers
- name: Free disk space on runner
run: |
echo "Disk usage before:" && df -h
sudo rm -rf /usr/local/lib/android
echo "Disk usage after:" && df -h
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
@ -95,7 +100,7 @@ jobs:
uses: ./.github/actions/godot-deps
- name: Set up .NET Sdk
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
if: ${{ matrix.build-mono }}
with:
dotnet-version: '6.0.x'
@ -114,100 +119,13 @@ jobs:
- name: Generate C# glue
if: ${{ matrix.build-mono }}
run: |
${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue || true
${{ matrix.bin }} --headless --generate-mono-glue ./modules/mono/glue
- name: Build .NET solutions
if: ${{ matrix.build-mono }}
run: |
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin --godot-platform=linuxbsd
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test --headless
# Check class reference
- name: Check for class reference updates
if: ${{ matrix.doc-test }}
run: |
echo "Running --doctool to see if this changes the public API without updating the documentation."
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
# Test 3.x -> 4.x project converter
- name: Test project converter
if: ${{ matrix.proj-conv }}
run: |
mkdir converter_test
cd converter_test
touch project.godot
../${{ matrix.bin }} --headless --validate-conversion-3to4
cd ..
rm converter_test -rf
# Download and extract zip archive with project, folder is renamed to be able to easy change used project
- name: Download test project
if: ${{ matrix.proj-test }}
run: |
wget https://github.com/godotengine/regression-test-project/archive/4.0.zip
unzip 4.0.zip
mv "regression-test-project-4.0" "test_project"
# Editor is quite complicated piece of software, so it is easy to introduce bug here
- name: Open and close editor (Vulkan)
if: ${{ matrix.proj-test }}
run: |
xvfb-run ${{ matrix.bin }} --audio-driver Dummy --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
- name: Open and close editor (GLES3)
if: ${{ matrix.proj-test }}
run: |
DRI_PRIME=0 xvfb-run ${{ matrix.bin }} --audio-driver Dummy --rendering-driver opengl3 --editor --quit --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
# Run test project
- name: Run project
if: ${{ matrix.proj-test }}
run: |
xvfb-run ${{ matrix.bin }} 40 --audio-driver Dummy --path test_project 2>&1 | tee sanitizers_log.txt || true
misc/scripts/check_ci_log.py sanitizers_log.txt
# Checkout godot-cpp
- name: Checkout godot-cpp
if: ${{ matrix.godot-cpp-test }}
uses: actions/checkout@v3
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_BASE_BRANCH }}
submodules: 'recursive'
path: 'godot-cpp'
# Dump GDExtension interface and API
- name: Dump GDExtension interface and API for godot-cpp build
if: ${{ matrix.godot-cpp-test }}
run: |
${{ matrix.bin }} --headless --dump-gdextension-interface --dump-extension-api
cp -f gdextension_interface.h godot-cpp/gdextension/
cp -f extension_api.json godot-cpp/gdextension/
# Build godot-cpp test extension
- name: Build godot-cpp test extension
if: ${{ matrix.godot-cpp-test }}
run: |
cd godot-cpp/test
scons target=template_debug dev_build=yes
cd ../..
- name: Check for GDExtension compatibility
if: ${{ matrix.compat }}
run: |
./misc/scripts/validate_extension_api.sh "${{ matrix.bin }}" || true # don't fail the CI for now
- name: Prepare artifact
if: ${{ matrix.artifact }}
run: |
@ -219,3 +137,46 @@ jobs:
if: ${{ matrix.artifact }}
with:
name: ${{ matrix.cache-name }}
- name: Dump Godot API
uses: ./.github/actions/godot-api-dump
if: ${{ matrix.api-dump }}
with:
bin: ${{ matrix.bin }}
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --headless --test --force-colors
# Check class reference
- name: Check for class reference updates
if: ${{ matrix.doc-test }}
run: |
echo "Running --doctool to see if this changes the public API without updating the documentation."
echo -e "If a diff is shown, it means that your code/doc changes are incomplete and you should update the class reference with --doctool.\n\n"
${{ matrix.bin }} --doctool --headless 2>&1 > /dev/null || true
git diff --color --exit-code && ! git ls-files --others --exclude-standard | sed -e 's/^/New doc file missing in PR: /' | grep 'xml$'
# Check API backwards compatibility
- name: Check for GDExtension compatibility
if: ${{ matrix.api-compat }}
run: |
./misc/scripts/validate_extension_api.sh "${{ matrix.bin }}"
# Download and run the test project
- name: Test Godot project
uses: ./.github/actions/godot-project-test
if: ${{ matrix.proj-test }}
with:
bin: ${{ matrix.bin }}
# Test the project converter
- name: Test project converter
uses: ./.github/actions/godot-converter-test
if: ${{ matrix.proj-conv }}
with:
bin: ${{ matrix.bin }}

View File

@ -5,7 +5,7 @@ on:
# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
concurrency:
@ -24,7 +24,7 @@ jobs:
cache-name: macos-editor
target: editor
tests: true
bin: "./bin/godot.macos.editor.x86_64"
bin: "./bin/godot.macos.editor.universal"
- name: Template (target=template_release)
cache-name: macos-template
@ -33,7 +33,7 @@ jobs:
sconsflags: debug_symbols=no
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
@ -48,24 +48,26 @@ jobs:
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Compilation
- name: Compilation (x86_64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
sconsflags: ${{ env.SCONSFLAGS }} arch=x86_64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test
- name: Compilation (arm64)
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} arch=arm64
platform: macos
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
- name: Prepare artifact
run: |
lipo -create ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64 -output ./bin/godot.macos.${{ matrix.target }}.universal
rm ./bin/godot.macos.${{ matrix.target }}.x86_64 ./bin/godot.macos.${{ matrix.target }}.arm64
strip bin/godot.*
chmod +x bin/godot.*
@ -73,3 +75,11 @@ jobs:
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test --force-colors

View File

@ -6,36 +6,60 @@ concurrency:
cancel-in-progress: true
jobs:
# First stage: Only static checks, fast and prevent expensive builds from running.
static-checks:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 📊 Static checks
uses: ./.github/workflows/static_checks.yml
# Second stage: Run all the builds and some of the tests.
android-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🤖 Android
needs: static-checks
uses: ./.github/workflows/android_builds.yml
ios-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🍏 iOS
needs: static-checks
uses: ./.github/workflows/ios_builds.yml
linux-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🐧 Linux
needs: static-checks
uses: ./.github/workflows/linux_builds.yml
macos-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🍎 macOS
needs: static-checks
uses: ./.github/workflows/macos_builds.yml
windows-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🏁 Windows
needs: static-checks
uses: ./.github/workflows/windows_builds.yml
web-build:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🌐 Web
needs: static-checks
uses: ./.github/workflows/web_builds.yml
# Third stage: Run auxiliary tests using build artifacts from previous jobs.
# Can be turned off for PRs that intentionally break compat with godot-cpp,
# until both the upstream PR and the matching godot-cpp changes are merged.
godot-cpp-test:
if: ${{ vars.DISABLE_GODOT_CI == '' }}
name: 🪲 Godot CPP
# This can be changed to depend on another platform, if we decide to use it for
# godot-cpp instead. Make sure to move the .github/actions/godot-api-dump step
# appropriately.
needs: linux-build
uses: ./.github/workflows/godot_cpp_test.yml

View File

@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2
@ -32,7 +32,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
files=$(git diff-tree --no-commit-id --name-only -r HEAD^1..HEAD 2> /dev/null || true)
elif [ "${{ github.event_name }}" == "push" -a "${{ github.event.forced }}" == "false" -a "${{ github.event.created }}" == "false" ]; then
files=$(git diff-tree --no-commit-id --name-only -r ${{ github.event.before }}..${{ github.event.after }} 2> /dev/null || true)
fi
@ -106,5 +106,5 @@ jobs:
uses: codespell-project/actions-codespell@v2
with:
skip: "./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json"
ignore_words_list: "curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,vai"
ignore_words_list: "breaked,checkin,curvelinear,doubleclick,expct,findn,gird,hel,inout,labelin,lod,mis,nd,numer,ot,pointin,requestor,te,textin,thirdparty,vai"
path: ${{ env.CHANGED_FILES }}

View File

@ -5,9 +5,9 @@ on:
# Global Settings
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no
EM_VERSION: 3.1.18
EM_VERSION: 3.1.39
EM_CACHE_FOLDER: "emsdk-cache"
concurrency:
@ -16,17 +16,18 @@ concurrency:
jobs:
web-template:
runs-on: "ubuntu-20.04"
runs-on: "ubuntu-22.04"
name: Template (target=template_release)
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v12
uses: mymindstorm/setup-emsdk@v14
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
cache-key: emsdk-${{ matrix.cache-name }}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
- name: Verify Emscripten setup
run: |

View File

@ -6,7 +6,7 @@ on:
# SCONS_CACHE for windows must be set in the build environment
env:
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: master
GODOT_BASE_BRANCH: '4.1'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
SCONS_CACHE_MSVC_CONFIG: true
@ -38,7 +38,7 @@ jobs:
sconsflags: debug_symbols=no
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
@ -60,14 +60,6 @@ jobs:
target: ${{ matrix.target }}
tests: ${{ matrix.tests }}
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test
- name: Prepare artifact
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force
@ -76,3 +68,11 @@ jobs:
uses: ./.github/actions/upload-artifact
with:
name: ${{ matrix.cache-name }}
# Execute unit tests for the editor
- name: Unit tests
if: ${{ matrix.tests }}
run: |
${{ matrix.bin }} --version
${{ matrix.bin }} --help
${{ matrix.bin }} --test --force-colors

22
.gitignore vendored
View File

@ -132,23 +132,13 @@ cppcheck-cppcheck-build-dir/
*.pydevproject
*.launch
# Gcov and Lcov code coverage
*.gcno
# Emacs
\#*\#
.\#*
# GCOV code coverage
*.gcda
*.gcov.html
*.func.html
*.func-sort-c.html
*index-sort-f.html
*index-sort-l.html
*index.html
godot.info
amber.png
emerald.png
glass.png
ruby.png
snow.png
updown.png
gcov.css
*.gcno
# Geany
*.geany

View File

@ -1,7 +0,0 @@
extraction:
cpp:
after_prepare:
- pip3 install scons
- PATH="/opt/work/.local/bin:$PATH"
index:
build_command: scons -j2

View File

@ -4,6 +4,843 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [4.1.4] - 2024-04-17
### Added
#### C#/.NET
- Implemented `{project}` placeholder for external dotnet editor ([GH-81847](https://github.com/godotengine/godot/pull/81847)).
#### Documentation
- Add an example for `Dictionary.merge()`, mention lack of recursion ([GH-81622](https://github.com/godotengine/godot/pull/81622)).
- Add docs for DRAW_ORDER_REVERSE_LIFETIME constant ([GH-82866](https://github.com/godotengine/godot/pull/82866)).
- Fill out Material documentation and clarify `render_priority` and `next_pass` sorting ([GH-83931](https://github.com/godotengine/godot/pull/83931)).
- Document changing the window's resizable status at runtime ([GH-84886](https://github.com/godotengine/godot/pull/84886)).
- Add description for rendering/limits/spatial_indexer/threaded_cull_minimum_instances ([GH-86246](https://github.com/godotengine/godot/pull/86246)).
- Add missing descriptions to TextServer's constants ([GH-86895](https://github.com/godotengine/godot/pull/86895)).
- Add missing descriptions for Image's documentation ([GH-86997](https://github.com/godotengine/godot/pull/86997)).
- Add missing descriptions to PrimitiveMesh and SoftBody3D ([GH-87011](https://github.com/godotengine/godot/pull/87011)).
#### Editor
- "Whole Words" search can detect word boundaries inside the search term ([GH-82694](https://github.com/godotengine/godot/pull/82694)).
#### GUI
- Translate TextEdit placeholder ([GH-83946](https://github.com/godotengine/godot/pull/83946)).
#### Import
- Support unspecified linear size in DDS files ([GH-86336](https://github.com/godotengine/godot/pull/86336)).
#### Porting
- Linux: Handle export preset forward compat with 4.3+ platform name ([GH-89047](https://github.com/godotengine/godot/pull/89047)).
- Android: Add `POST_NOTIFICATIONS` permission to the list of permissions available in the Export dialog ([GH-90377](https://github.com/godotengine/godot/pull/90377)).
#### XR
- Compile OpenXR into MacOS build ([GH-79614](https://github.com/godotengine/godot/pull/79614)).
### Changed
#### 3D
- Hide CSGShape's `debug_collision_shape` when it is invisible ([GH-84174](https://github.com/godotengine/godot/pull/84174)).
#### Animation
- Improve retarget auto-mapping algorithm ([GH-81843](https://github.com/godotengine/godot/pull/81843)).
#### Audio
- Only warn once about OGG seeking issues ([GH-81704](https://github.com/godotengine/godot/pull/81704)).
#### Buildsystem
- SCons: Re-disable exceptions for Android, iOS, and Web ([GH-84328](https://github.com/godotengine/godot/pull/84328)).
- Use Python venv if detected when building VS project ([GH-84593](https://github.com/godotengine/godot/pull/84593)).
- Add unsigned char cast ifdef to work around `-Wtype-limits` warnings ([GH-85500](https://github.com/godotengine/godot/pull/85500)).
- Web: Pin Emscripten to 3.1.39 on CI ([GH-84717](https://github.com/godotengine/godot/pull/84717)).
#### Core
- Set language encoding flag when using `ZIPPacker` ([GH-78732](https://github.com/godotengine/godot/pull/78732)).
- Do not replace starting digit with underscore when making identifier ([GH-82786](https://github.com/godotengine/godot/pull/82786)).
#### Documentation
- Clarify `PackedByteArray.decompress*` limitations with external data ([GH-81689](https://github.com/godotengine/godot/pull/81689)).
- Specify the behavior of `get_tree()` when the node is not in the scene tree ([GH-82863](https://github.com/godotengine/godot/pull/82863)).
- Clarify `NOTIFICATION_SCROLL_BEGIN/END` behavior ([GH-83636](https://github.com/godotengine/godot/pull/83636)).
- Improve and clarify texture filtering documentation ([GH-83907](https://github.com/godotengine/godot/pull/83907)).
- Clarify behavior of RayCast when `get_collision_point()` is used inside a collision shape ([GH-84085](https://github.com/godotengine/godot/pull/84085)).
- Update `add_submenu_item` doc to mention that submenu should already exist ([GH-84283](https://github.com/godotengine/godot/pull/84283)).
- Improve documentation for `CameraAttributesPhysical.exposure_shutter_speed` ([GH-85599](https://github.com/godotengine/godot/pull/85599)).
- Remove pointer to deprecated class page from Skeleton3D ([GH-86326](https://github.com/godotengine/godot/pull/86326)).
- Improve RichTextLabel `install_effect()` documentation ([GH-86331](https://github.com/godotengine/godot/pull/86331)).
- Mention `CollisionPolygon2D.polygon` is local to the given CollisionPolygon2D ([GH-87024](https://github.com/godotengine/godot/pull/87024)).
- Include `animation.length` in Animation example ([GH-87180](https://github.com/godotengine/godot/pull/87180)).
#### Editor
- Ensure binds are duplicated with `Node` signals ([GH-75382](https://github.com/godotengine/godot/pull/75382)).
- Ignore directory entries in TPZ ([GH-79374](https://github.com/godotengine/godot/pull/79374)).
- Don't apply frame delay project setting to the editor ([GH-82929](https://github.com/godotengine/godot/pull/82929)).
- Enable new addon after hiding ProjectSettings ([GH-83576](https://github.com/godotengine/godot/pull/83576)).
- Remove margins from editor scrollbars ([GH-83868](https://github.com/godotengine/godot/pull/83868)).
- Provide more context when scene fails to load ([GH-85083](https://github.com/godotengine/godot/pull/85083)).
#### Export
- Improve headings for the export mode in the Export dialog ([GH-79725](https://github.com/godotengine/godot/pull/79725)).
- Update the validation logic for the package name ([GH-84676](https://github.com/godotengine/godot/pull/84676)).
- Preserve the output from the gradle build command ([GH-84779](https://github.com/godotengine/godot/pull/84779)).
#### GUI
- Enable scrolling of output with UI scale changes ([GH-82079](https://github.com/godotengine/godot/pull/82079)).
- SystemFont: Check name when selecting the best matching face from a collection ([GH-82712](https://github.com/godotengine/godot/pull/82712)).
- Redraw `TreeItem` on more changes ([GH-87415](https://github.com/godotengine/godot/pull/87415)).
#### Rendering
- Make the rendering method dropdown also affect mobile if compatible ([GH-72461](https://github.com/godotengine/godot/pull/72461)).
- Clamp ReflectionProbe Max Distance to 262,144 to fix rendering issues ([GH-82415](https://github.com/godotengine/godot/pull/82415)).
- Apply some low-hanging fruit optimizations to Vulkan RD ([GH-85532](https://github.com/godotengine/godot/pull/85532)).
#### Thirdparty
- Sync controller mappings DB with SDL2 community repo.
- CA root certificates updated to 2024-03-11 bundle from Mozilla.
- mbedTLS updated to version 2.28.8.
- r128: Update to include latest fix for intrinsics being incorrect included ([GH-84537](https://github.com/godotengine/godot/pull/84537)).
- zlib/minizip updated to version 1.3.1.
### Removed
#### GDExtension
- Remove Android specific abis from the export preset feature list ([GH-84720](https://github.com/godotengine/godot/pull/84720)).
### Fixed
#### 2D
- Fix UV editor not using texture transform ([GH-84076](https://github.com/godotengine/godot/pull/84076)).
#### 3D
- Fix PlaneMesh tangents for 'Face X' orientation ([GH-84097](https://github.com/godotengine/godot/pull/84097)).
- Fix CSGShape `debug_collision_shape` crash ([GH-84338](https://github.com/godotengine/godot/pull/84338)).
#### Animation
- Fix rename animation in SpriteFramesEditor ([GH-79600](https://github.com/godotengine/godot/pull/79600)).
- Fix crash when clicking on "Interpolation Mode" with nonexistent node path ([GH-81779](https://github.com/godotengine/godot/pull/81779)).
- Fix invalid return from some more `_get/_set` ([GH-84060](https://github.com/godotengine/godot/pull/84060)).
- Fix invalid 3-to-4 renames of `add_animation` to `add_animation_library` ([GH-86647](https://github.com/godotengine/godot/pull/86647)).
- Fix spurious infinite loop warnings in AnimationStateMachine ([GH-89575](https://github.com/godotengine/godot/pull/89575)).
#### Audio
- Fix Dummy audio driver initialization issue on WASAPI output device initialization failure ([GH-87010](https://github.com/godotengine/godot/pull/87010)).
#### Buildsystem
- Fix invalid Python escape sequences ([GH-85818](https://github.com/godotengine/godot/pull/85818)).
- macOS: Fix MoltenVK SDK detection after file location changes in 1.3.275.0 ([GH-87305](https://github.com/godotengine/godot/pull/87305)).
#### C#/.NET
- Fix `Transform3D.InterpolateWith` applying rotation before scale ([GH-89843](https://github.com/godotengine/godot/pull/89843)).
#### Core
- Fix allocation size overflow check in `CowData` ([GH-81917](https://github.com/godotengine/godot/pull/81917)).
- Fix invalid return from some `_get/_set` ([GH-84054](https://github.com/godotengine/godot/pull/84054)).
- Prevent `encode_variant` doing `memcpy` from `nullptr` ([GH-84155](https://github.com/godotengine/godot/pull/84155)).
- Prevent crash on conversion of invalid data in `Image` ([GH-84782](https://github.com/godotengine/godot/pull/84782)).
- Fix translation remapping check for imported resources ([GH-84791](https://github.com/godotengine/godot/pull/84791)).
- Prevent read-after-free in the queued CallableCustomStaticMethodPointer, fixes `slot >= slot_max` errors in release templates ([GH-85280](https://github.com/godotengine/godot/pull/85280)).
- Fix crash when hashing empty `CharString` ([GH-85389](https://github.com/godotengine/godot/pull/85389)).
- Prevent infinite recursion when printing errors ([GH-85397](https://github.com/godotengine/godot/pull/85397)).
#### Documentation
- Fix description of `Animation::copy_track` ([GH-83441](https://github.com/godotengine/godot/pull/83441)).
- Fix typo in ConcavePolygonShape2D/3D description ([GH-84111](https://github.com/godotengine/godot/pull/84111)).
- Fix several reported issues in String's documentation ([GH-86639](https://github.com/godotengine/godot/pull/86639)).
- Fix incorrect VehicleWheel3D Roll Influence description ([GH-86672](https://github.com/godotengine/godot/pull/86672)).
#### Editor
- Fix missing arrows in integer vector properties ([GH-79021](https://github.com/godotengine/godot/pull/79021)).
- Fix undo methods for DELETE in EditorAutoloadSettings ([GH-79832](https://github.com/godotengine/godot/pull/79832)).
- Fix wrong shader rename in 3-to-4 project converter ([GH-83708](https://github.com/godotengine/godot/pull/83708)).
- Fix UV editor not showing polygon correctly ([GH-84116](https://github.com/godotengine/godot/pull/84116)).
- Fix texture region editor not selecting restored snap mode ([GH-84762](https://github.com/godotengine/godot/pull/84762)).
#### GDScript
- Fix `_get_debug_tooltip` crash if tooltip string is too large ([GH-81018](https://github.com/godotengine/godot/pull/81018)).
- Fix DAP breakpoints being cleared on closed scripts ([GH-84898](https://github.com/godotengine/godot/pull/84898)).
#### GUI
- Fix storing invalid item height values in `ItemList` ([GH-82660](https://github.com/godotengine/godot/pull/82660)).
- Ensure input event is valid in `PopupMenu::activate_item_by_event` ([GH-83952](https://github.com/godotengine/godot/pull/83952)).
- Fix remapped font reloading on locale change ([GH-84873](https://github.com/godotengine/godot/pull/84873)).
- VideoPlayer: Fix reloading translation remapped stream ([GH-84794](https://github.com/godotengine/godot/pull/84794)).
#### Import
- Fix memory corruption and assert failures in convex decomposition ([GH-85631](https://github.com/godotengine/godot/pull/85631)).
- Prevent overriding file info of another file when reimport creates extra files ([GH-85922](https://github.com/godotengine/godot/pull/85922)).
- Fix `BasisUniversal` ETC RA as RG transcoding ([GH-86916](https://github.com/godotengine/godot/pull/86916)).
- GLTF: Fix three bugs which prevented extracted textures from being refreshed ([GH-86504](https://github.com/godotengine/godot/pull/86504)).
- Fix crash when previewing a scene with a mesh as the root node ([GH-87781](https://github.com/godotengine/godot/pull/87781)).
- Fix setting animation save paths on import breaking on Windows ([GH-90003](https://github.com/godotengine/godot/pull/90003)).
#### Input
- Android: Fix joypad trigger value range ([GH-81322](https://github.com/godotengine/godot/pull/81322)).
#### Multiplayer
- Fix `complete_auth` notifying the wrong peer ([GH-86257](https://github.com/godotengine/godot/pull/86257)).
#### Navigation
- Fix NavigationObstacle elevation ([GH-84830](https://github.com/godotengine/godot/pull/84830)).
- Fix NavigationObstacle height ([GH-84857](https://github.com/godotengine/godot/pull/84857)).
#### Networking
- Fix missing return in `StreamPeerTCP::poll` when connection is `STATUS_CONNECTED` ([GH-90741](https://github.com/godotengine/godot/pull/90741)).
#### Particles
- Fix several Material texture parameter updates ([GH-84303](https://github.com/godotengine/godot/pull/84303)).
#### Physics
- Fix body leaving area gravity influence ([GH-82961](https://github.com/godotengine/godot/pull/82961)).
- Fix CollisionObject3D Gizmo not updated after calling `shape_owner_*` functions ([GH-84610](https://github.com/godotengine/godot/pull/84610)).
#### Porting
- Fix bug where maximized->fullscreen->windowed mode stays maximized ([GH-84504](https://github.com/godotengine/godot/pull/84504)).
- Android: Fix editor crash issue when pressing Back ([GH-84414](https://github.com/godotengine/godot/pull/84414)).
- Android: Fix disabling splash screen Show Image ([GH-84491](https://github.com/godotengine/godot/pull/84491)).
- Linux: Fix size_t template issue on OpenBSD by using int consistently ([GH-84017](https://github.com/godotengine/godot/pull/84017)).
#### Rendering
- Fix transparent viewport backgrounds with custom clear color ([GH-79876](https://github.com/godotengine/godot/pull/79876)).
- Fix clear color on mobile renderer ([GH-80933](https://github.com/godotengine/godot/pull/80933)).
- Fix VoxelGI MultiMesh and CSG mesh baking ([GH-81616](https://github.com/godotengine/godot/pull/81616)).
- Fix bad parameter for `rendering_method` crashes Godot ([GH-84241](https://github.com/godotengine/godot/pull/84241)).
- Transform mesh's AABB to skeleton's space when calculating mesh's bounds ([GH-84451](https://github.com/godotengine/godot/pull/84451)).
- Prevent crash in `_nvapi_disable_threaded_optimization` when attached to renderdoc ([GH-85121](https://github.com/godotengine/godot/pull/85121)).
- Fix typo in BaseMaterial3D conversion from 3.x SpatialMaterial ([GH-85269](https://github.com/godotengine/godot/pull/85269)).
- Fix Polygon2D to Skeleton2D transform calculation ([GH-86557](https://github.com/godotengine/godot/pull/86557)).
- Disable scissor test after rendering batches in compatibility renderer ([GH-87489](https://github.com/godotengine/godot/pull/87489)).
- GLES3: Avoid freeing proxy textures clearing owner's data ([GH-82430](https://github.com/godotengine/godot/pull/82430)).
- GLES3: Fix iOS Simulator by removing incorrect `system_fbo` overwrite ([GH-84955](https://github.com/godotengine/godot/pull/84955)).
- GLES3: Skip batches with zero instance count while rendering canvas ([GH-85778](https://github.com/godotengine/godot/pull/85778)).
#### Shaders
- Fix int to uint implicit cast error when use mat3 uniform in compatibility renderer ([GH-81494](https://github.com/godotengine/godot/pull/81494)).
## [4.1.3] - 2023-11-01
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-1-3) for details.
### Added
#### Core
- Support loading of translations on threads ([GH-78747](https://github.com/godotengine/godot/pull/78747)).
#### Documentation
- Add missing RenderingDevice method descriptions ([GH-80716](https://github.com/godotengine/godot/pull/80716)).
#### GDScript
- Add check for `super()` methods not being implemented ([GH-81808](https://github.com/godotengine/godot/pull/81808)).
#### Input
- Add missing YEN, SECTION and OPENURL names to keycode mappings ([GH-81054](https://github.com/godotengine/godot/pull/81054)).
- Add XInput device ID for wireless Series 2 Elite controller ([GH-82508](https://github.com/godotengine/godot/pull/82508)).
#### Rendering
- Mobile: Uncomment code required for fog rendering on clear color ([GH-79776](https://github.com/godotengine/godot/pull/79776)).
### Changed
#### 2D
- Allow using floating-point bone sizes and outline widths in the 2D editor ([GH-79434](https://github.com/godotengine/godot/pull/79434)).
- Convert TileSet Atlas Merge input images to RGBA8 to match output, if needed ([GH-80943](https://github.com/godotengine/godot/pull/80943)).
#### 3D
- Make CSGShape follow curve's tilt in Path mode ([GH-79355](https://github.com/godotengine/godot/pull/79355)).
- Initialize View Frame Time estimates to match 120 FPS ([GH-80124](https://github.com/godotengine/godot/pull/80124)).
#### Animation
- Improve and clarify paused Tweens ([GH-79879](https://github.com/godotengine/godot/pull/79879)).
- Avoid emitting signals if the animation is not ready to be processed ([GH-80367](https://github.com/godotengine/godot/pull/80367)).
- Ensure methods skipped by `AnimationPlayer::seek` are not called ([GH-80708](https://github.com/godotengine/godot/pull/80708)).
#### Buildsystem
- Updated compiler version detection ([GH-82325](https://github.com/godotengine/godot/pull/82325), [GH-82352](https://github.com/godotengine/godot/pull/82352)).
- SCons: Use CXXFLAGS to disable exceptions ([GH-83618](https://github.com/godotengine/godot/pull/83618)).
#### Editor
- Always double-quote path when launching Windows File Explorer ([GH-78963](https://github.com/godotengine/godot/pull/78963)).
#### Import
- Limit mesh complexity in LOD generation to prevent crashing ([GH-80467](https://github.com/godotengine/godot/pull/80467)).
- Update Blender export flags for 3.6 ([GH-81194](https://github.com/godotengine/godot/pull/81194)).
#### Thirdparty
- mbedTLS updated to version 2.18.5.
- zlib/minizip updated to version 1.3.
- Sync controller mappings DB with SDL2 community repo.
### Fixed
#### 2D
- Fix "a number is required" error when printing RID ([GH-80122](https://github.com/godotengine/godot/pull/80122)).
- Fix TileMap editor so that pressing control deselects cells correctly ([GH-81925](https://github.com/godotengine/godot/pull/81925)).
- Fix animated tile time-slice calculation accumulating float errors ([GH-82360](https://github.com/godotengine/godot/pull/82360)).
#### 3D
- GridMap: Ensure the visibility is updated when entering the tree ([GH-81106](https://github.com/godotengine/godot/pull/81106)).
#### Animation
- Fix incorrect cast when animating `int` ([GH-81296](https://github.com/godotengine/godot/pull/81296)).
- Fix animation keyframes being skipped when played backwards ([GH-81452](https://github.com/godotengine/godot/pull/81452)).
- Fix BoneAttachment3D signal connection ([GH-81695](https://github.com/godotengine/godot/pull/81695)).
- Fix `SkeletonIK3D` editor preview when changing active node ([GH-82391](https://github.com/godotengine/godot/pull/82391)).
#### Audio
- Fix pausing stream on entering tree ([GH-83779](https://github.com/godotengine/godot/pull/83779)).
#### C#/.NET
- Fix line in OpenInExternalEditor ([GH-79404](https://github.com/godotengine/godot/pull/79404)).
- Fix an error in `Vector3.BezierDerivative` ([GH-82664](https://github.com/godotengine/godot/pull/82664)).
#### Core
- Clear the previously set state when configuring for a new scene root node ([GH-79201](https://github.com/godotengine/godot/pull/79201)).
- Fix example for `Object._set` documentation ([GH-80475](https://github.com/godotengine/godot/pull/80475)).
- Fix comparison of `Callable`s with binds ([GH-81131](https://github.com/godotengine/godot/pull/81131)).
- Fix for non-deterministic behavior in PCKPacker ([GH-81280](https://github.com/godotengine/godot/pull/81280)).
- Fix not being able to set Node process priority in certain cases ([GH-82358](https://github.com/godotengine/godot/pull/82358)).
#### Editor
- Fix conversion of hex color strings in project converter ([GH-74026](https://github.com/godotengine/godot/pull/74026)).
- Fix indentation in script templates ([GH-78675](https://github.com/godotengine/godot/pull/78675)).
- Fix "Go to parent folder" in `EditorFileDialog` ([GH-80821](https://github.com/godotengine/godot/pull/80821)).
- Fix paste value emptying an array on some right click location ([GH-80977](https://github.com/godotengine/godot/pull/80977)).
- Fix missing dependency warning popup ([GH-82244](https://github.com/godotengine/godot/pull/82244), [GH-83024](https://github.com/godotengine/godot/pull/83024)).
- Fix garbled text in editor toasters ([GH-82913](https://github.com/godotengine/godot/pull/82913)).
- AssetLib: Fix long plugin names breaking the UI ([GH-80555](https://github.com/godotengine/godot/pull/80555)).
#### Export
- iOS: Fix build on Xcode 14 and older ([GH-83088](https://github.com/godotengine/godot/pull/83088)).
#### GDExtension
- Fix incorrect virtual function in `VideoStream.set_paused` ([GH-79710](https://github.com/godotengine/godot/pull/79710)).
- Fix `variant_iter_get()` actually calling `iter_next()` ([GH-83681](https://github.com/godotengine/godot/pull/83681)).
#### GDScript
- Check `get_node()` shorthand in static functions ([GH-78552](https://github.com/godotengine/godot/pull/78552)).
- Fix completion option location not found ([GH-80283](https://github.com/godotengine/godot/pull/80283)).
- Fix `get_method` from named lambda ([GH-80506](https://github.com/godotengine/godot/pull/80506)).
- Fix `GDScriptCache::get_full_script` eating parsing errors because of early exit ([GH-83540](https://github.com/godotengine/godot/pull/83540)).
- LSP: Fix connection error when launched in a separate thread ([GH-80686](https://github.com/godotengine/godot/pull/80686)).
- LSP: Fix autocomplete quote handling ([GH-81833](https://github.com/godotengine/godot/pull/81833)).
#### GUI
- Fix native popups auto-closing when interacting with non-client area ([GH-79456](https://github.com/godotengine/godot/pull/79456)).
- Fix scrolling `PopupMenu` on keyboard/controller input ([GH-80271](https://github.com/godotengine/godot/pull/80271)).
- Fix `OptionButton` minimum size when "Fit Longest Item" is enabled ([GH-80366](https://github.com/godotengine/godot/pull/80366)).
- Fix 2D/3D viewport context switching issues when script editor is floating ([GH-80647](https://github.com/godotengine/godot/pull/80647)).
- Fix `TreeItem` range slider not working properly ([GH-81174](https://github.com/godotengine/godot/pull/81174)).
#### Import
- Fix reimporting scene with default values selected ([GH-79907](https://github.com/godotengine/godot/pull/79907)).
- Fix grayscale DDS loading ([GH-81134](https://github.com/godotengine/godot/pull/81134)).
- Fix ImporterMesh bone weight handling during lightmap unwrap ([GH-81854](https://github.com/godotengine/godot/pull/81854)).
- Avoid crash when generating LODs on meshes with non-finite vertices ([GH-82285](https://github.com/godotengine/godot/pull/82285)).
#### Multiplayer
- Fix watch properties not being correctly removed ([GH-81033](https://github.com/godotengine/godot/pull/81033)).
#### Navigation
- Fix pathfinding funnel adding unwanted point ([GH-79228](https://github.com/godotengine/godot/pull/79228)).
#### Particles
- Fix particle shader deterministic random values ([GH-80638](https://github.com/godotengine/godot/pull/80638)).
- Fix `GPUParticles2D` offset stutter ([GH-80984](https://github.com/godotengine/godot/pull/80984)).
- Fix errors when freeing GPUParticles ([GH-82431](https://github.com/godotengine/godot/pull/82431)).
#### Physics
- Fix missing clear for some `set_exclude*` query parameter methods ([GH-82043](https://github.com/godotengine/godot/pull/82043)).
#### Porting
- Android: Fix input routing logic when using a hardware keyboard ([GH-80932](https://github.com/godotengine/godot/pull/80932)).
- Android: Fix logic for deferred window input events being inverted ([GH-83301](https://github.com/godotengine/godot/pull/83301)).
- Android: Update the `launchMode` for the `GodotApp` activity ([GH-83954](https://github.com/godotengine/godot/pull/83954)).
- Linux: Use EWMH for `DisplayServerX11::_window_minimize_check()` implementation ([GH-80036](https://github.com/godotengine/godot/pull/80036)).
- macOS: Fix borderless mode on macOS 13.6+ ([GH-82357](https://github.com/godotengine/godot/pull/82357)).
- Web: Fix JavaScript callback memory leak issue ([GH-81105](https://github.com/godotengine/godot/pull/81105)).
- Windows: Do not force redraw window background on mouse pass-through region change ([GH-80153](https://github.com/godotengine/godot/pull/80153)).
- Windows: Fix not applying NVIDIA profile to new executables ([GH-81251](https://github.com/godotengine/godot/pull/81251)).
#### Rendering
- Initialize MSDF parameters in BaseMaterial3D with default ([GH-79983](https://github.com/godotengine/godot/pull/79983)).
- Fix validation error when enabling SSIL alone ([GH-80315](https://github.com/godotengine/godot/pull/80315)).
- Ensure `POINT_SIZE` takes effect in the canvas item shader ([GH-80323](https://github.com/godotengine/godot/pull/80323)).
- Fix volumetric fog NaN values in textures from starting at a zero Vector2 ([GH-80992](https://github.com/godotengine/godot/pull/80992)).
- Fix VoxelGI CameraAttributes exposure normalization handling ([GH-81067](https://github.com/godotengine/godot/pull/81067)).
- Fix special case of cluster render ([GH-81081](https://github.com/godotengine/godot/pull/81081)).
- Fix VoxelGI static light pairing ([GH-81124](https://github.com/godotengine/godot/pull/81124)).
- Fix LightmapGI baking with GridMap ([GH-81545](https://github.com/godotengine/godot/pull/81545)).
- Fix `SubViewport` with `UPDATE_WHEN_VISIBLE` not working properly in exported project ([GH-81607](https://github.com/godotengine/godot/pull/81607)).
- Fix massive validation errors when enabling TAA + MSAA ([GH-81775](https://github.com/godotengine/godot/pull/81775)).
- Fix LightmapGI shading sometimes being unlit or black ([GH-81951](https://github.com/godotengine/godot/pull/81951)).
- Fix ShaderGlobalsOverride property handling ([GH-82100](https://github.com/godotengine/godot/pull/82100)).
- Fix cluster artifacts and negative light ([GH-82546](https://github.com/godotengine/godot/pull/82546)).
- Fix undeclared identifier `global_variables` in the fog shader ([GH-82877](https://github.com/godotengine/godot/pull/82877)).
- Avoid default fallback material when using `world_vertex_coords` ([GH-82886](https://github.com/godotengine/godot/pull/82886)).
- Fix VoxelGI bake memory leak ([GH-83035](https://github.com/godotengine/godot/pull/83035)).
- Fix disabling depth prepass break opaque materials ([GH-83371](https://github.com/godotengine/godot/pull/83371)).
- GLES3: Fix clear color's alpha value will affects 2D editor ([GH-81395](https://github.com/godotengine/godot/pull/81395)).
- GLES3: Fix instanced rendering color and custom data defaults ([GH-81575](https://github.com/godotengine/godot/pull/81575)).
- Mobile: Fix issue with four subpasses always been requested ([GH-80368](https://github.com/godotengine/godot/pull/80368)).
- Mobile: Fix missing decal mask ([GH-80911](https://github.com/godotengine/godot/pull/80911)).
- Vulkan: Fix multithreaded compute list and GPU particle processing ([GH-79849](https://github.com/godotengine/godot/pull/79849)).
#### XR
- Properly skip frame render when the XR runtime is not yet ready ([GH-82752](https://github.com/godotengine/godot/pull/82752)).
- Fix `GPUParticles3D` on the Meta Quest 2 with OpenGL renderer ([GH-83756](https://github.com/godotengine/godot/pull/83756)).
## [4.1.2] - 2023-10-04
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-1-2) for details.
### Added
#### Core
- Add check to ensure registered classes are declared ([GH-81020](https://github.com/godotengine/godot/pull/81020)).
#### Rendering
- Add motion vector support for GPU 3D Particles ([GH-80688](https://github.com/godotengine/godot/pull/80688)).
#### Shaders
- Allow more hint types for uniform arrays ([GH-79100](https://github.com/godotengine/godot/pull/79100)).
- Add autocomplete for filter/repeat hints on uniform arrays ([GH-79402](https://github.com/godotengine/godot/pull/79402)).
### Changed
#### 3D
- Change property hint range for camera attributes exposure multiplier ([GH-79138](https://github.com/godotengine/godot/pull/79138)).
#### Buildsystem
- Disable C++ exception handling (off by default in 4.1) ([GH-80612](https://github.com/godotengine/godot/pull/80612)).
- libpng: Enable intrinsics on x86/SSE2, ppc64/VSX, and all arm/NEON ([GH-78325](https://github.com/godotengine/godot/pull/78325)).
- Linux: Allow unbundling OpenXR ([GH-73443](https://github.com/godotengine/godot/pull/73443)).
- MSVC: Pass build options configuration to Visual Studio projects ([GH-79238](https://github.com/godotengine/godot/pull/79238)).
- MSVC: Make incremental linking optional ([GH-80482](https://github.com/godotengine/godot/pull/80482), [GH-81144](https://github.com/godotengine/godot/pull/81144)).
- MSVC: Enable `/WX` on LINKFLAGS for MSVC with `werror=yes` ([GH-80711](https://github.com/godotengine/godot/pull/80711)).
#### C#/.NET
- Hide hostfxr not found error ([GH-81690](https://github.com/godotengine/godot/pull/81690)).
#### Editor
- Don't use splash minimum display time in editor ([GH-79388](https://github.com/godotengine/godot/pull/79388)).
- Automatically add path to built-in scripts ([GH-79920](https://github.com/godotengine/godot/pull/79920)).
- Uncollapse favorites by default in the editor FileSystem dock ([GH-79971](https://github.com/godotengine/godot/pull/79971)).
- Use `ui_text_submit` instead of `ui_accept` to confirm and close text prompts ([GH-81189](https://github.com/godotengine/godot/pull/81189)).
- Make editor camera speed indicator use `m/s` and `m` ([GH-81810](https://github.com/godotengine/godot/pull/81810)).
#### GUI
- Enable transparent background for GUI tooltips ([GH-81669](https://github.com/godotengine/godot/pull/81669)).
#### Input
- Prevent double input events on gamepad when running through steam input ([GH-76045](https://github.com/godotengine/godot/pull/76045)).
- Ensure `joy_connection_changed` is emitted on the main thread ([GH-80432](https://github.com/godotengine/godot/pull/80432)).
- Android: Set `echo` property for the physical keyboard events ([GH-79089](https://github.com/godotengine/godot/pull/79089)).
#### Networking
- Web: Always return -1 as body length in HTTPClientWeb ([GH-79846](https://github.com/godotengine/godot/pull/79846)).
#### Porting
- Web: Disable raycast module by default (no occlusion culling) ([GH-81716](https://github.com/godotengine/godot/pull/81716)).
- X11: Do not fail DisplayServer init if non-essential extensions are missing ([GH-80240](https://github.com/godotengine/godot/pull/80240)).
#### Rendering
- Enable depth writes during shadow pass and depth pass, disable during color pass ([GH-80070](https://github.com/godotengine/godot/pull/80070)).
- Remove GPU readback from `NoiseTexture3D.get_format()` ([GH-80407](https://github.com/godotengine/godot/pull/80407)).
- Clamp Volumetric Fog Length property to prevent rendering issues ([GH-80485](https://github.com/godotengine/godot/pull/80485)).
- Propagate error correctly when max texture size for lightmaps is too small ([GH-81543](https://github.com/godotengine/godot/pull/81543)).
- GLES3: Reset anisotropic filtering when changing texture filtering mode ([GH-79568](https://github.com/godotengine/godot/pull/79568)).
- GLES3: Don't call `glTexParameter*` for invalid filter and repeat modes ([GH-79685](https://github.com/godotengine/godot/pull/79685)).
#### Thirdparty
- FreeType updated to version 2.13.2.
- ICU4C updated to version 73.2.
- libpng updated to version 1.6.40.
- libwebp updated to version 1.3.2.
- mbedtls updated to version 2.28.4.
- miniupnpc updated to version 2.2.5.
- openxr updated to version 1.0.28.
- tinyexr updated to version 1.0.7.
### Fixed
#### 2D
- Fix Camera2D crash when edited scene root is null ([GH-79645](https://github.com/godotengine/godot/pull/79645)).
- Fix `CanvasModulate` logic for modulating the canvas ([GH-79747](https://github.com/godotengine/godot/pull/79747)).
#### 3D
- Fix VoxelGI saving VoxelGIData as a built-in file, despite being prompted to save it to an external file ([GH-78772](https://github.com/godotengine/godot/pull/78772)).
- Fix Curve3D baking up vectors for nontrivial curves ([GH-81885](https://github.com/godotengine/godot/pull/81885)).
#### Animation
- Fix `Animation::subtract_variant` for affine transforms ([GH-79279](https://github.com/godotengine/godot/pull/79279)).
- Fix `AnimationNodeTransition` with negative time scale ([GH-79403](https://github.com/godotengine/godot/pull/79403)).
- Remove animation tracks with correct indices ([GH-81651](https://github.com/godotengine/godot/pull/81651)).
#### Audio
- Fix audio stream generators getting freed accidentally ([GH-81508](https://github.com/godotengine/godot/pull/81508)).
#### Buildsystem
- Fix Python 3.12 SyntaxError with regex escape sequences ([GH-82290](https://github.com/godotengine/godot/pull/82290)).
- macOS/iOS: Workaround build issue with new Xcode 15 linker ([GH-81968](https://github.com/godotengine/godot/pull/81968), [GH-82458](https://github.com/godotengine/godot/pull/82458)).
- Web: Workaround Emscripten 3.1.42+ LTO regression ([GH-81340](https://github.com/godotengine/godot/pull/81340)).
#### C#/.NET
- Fix deserialization of delegates that are 0-parameter overloads ([GH-78877](https://github.com/godotengine/godot/pull/78877)).
- Add missing `useModelFront` parameter to GodotSharp Basis and Transform ([GH-79082](https://github.com/godotengine/godot/pull/79082)).
- Fix double unregistration on dispose of Array ([GH-81230](https://github.com/godotengine/godot/pull/81230)).
- Fix Visual Studio 2022 for Mac compatibility ([GH-81802](https://github.com/godotengine/godot/pull/81802)).
#### Core
- Fix range error for `Array.slice` ([GH-79103](https://github.com/godotengine/godot/pull/79103)).
- Fix byte to float color conversion in `DisplayServerWindows::screen_get_pixel` ([GH-79350](https://github.com/godotengine/godot/pull/79350)).
- Fix recursion level check for array stringification ([GH-79370](https://github.com/godotengine/godot/pull/79370)).
- Fix global transform validity for `Node2D` and `Control` ([GH-80105](https://github.com/godotengine/godot/pull/80105)).
- Fix recursion level check for `VariantWriter::write()` with objects ([GH-81123](https://github.com/godotengine/godot/pull/81123)).
- Fix string conversion for -0.0 float values ([GH-81328](https://github.com/godotengine/godot/pull/81328)).
- Crypto: Fix `generate_random_bytes` for large chunks ([GH-81884](https://github.com/godotengine/godot/pull/81884)).
#### Editor
- Fix history mismatch ([GH-78827](https://github.com/godotengine/godot/pull/78827)).
- Improve resolution of script type icons ([GH-79203](https://github.com/godotengine/godot/pull/79203), [GH-81336](https://github.com/godotengine/godot/pull/81336)).
- Fix arg count checks in `SceneDebugger` ([GH-79655](https://github.com/godotengine/godot/pull/79655)).
- Make the single window mode check more strict ([GH-79793](https://github.com/godotengine/godot/pull/79793)).
- Fix crash when using "Close All Tabs" ([GH-79917](https://github.com/godotengine/godot/pull/79917)).
- Fix a crash when plugin tries to call `make_mesh_previews` on enable ([GH-81121](https://github.com/godotengine/godot/pull/81121)).
#### Export
- Fix Windows console wrapper and icon being swapped ([GH-80357](https://github.com/godotengine/godot/pull/80357)).
#### GDExtension
- Fix version check for GDExtension ([GH-80591](https://github.com/godotengine/godot/pull/80591)).
- Fix overriding `_export_begin`, `_export_file` and `_export_end` from GDExtension ([GH-80999](https://github.com/godotengine/godot/pull/80999)).
#### GDScript
- Fix conflict between property and group names ([GH-78254](https://github.com/godotengine/godot/pull/78254)).
- Properly track extents of constants ([GH-79301](https://github.com/godotengine/godot/pull/79301)).
- Fix dumping of signal API parameters ([GH-81599](https://github.com/godotengine/godot/pull/81599)).
#### GUI
- Fix RichTextLabel character line and paragraph index getters ([GH-76759](https://github.com/godotengine/godot/pull/76759)).
- Fix text overlapping icon in `Tree` ([GH-78756](https://github.com/godotengine/godot/pull/78756)).
- Fix delay on tab resizing when (un)hovering tabs ([GH-78777](https://github.com/godotengine/godot/pull/78777)).
- Fix `Tree` performance regression by using cache ([GH-79325](https://github.com/godotengine/godot/pull/79325)).
- Fix Button clipping when internal margins exist ([GH-79455](https://github.com/godotengine/godot/pull/79455)).
- Make `OptionButton`` resize when disabling "Fit to Longest Item" ([GH-79494](https://github.com/godotengine/godot/pull/79494)).
- Fix `root_node_layout_direction` project setting being incorrectly exposed as a range ([GH-79611](https://github.com/godotengine/godot/pull/79611)).
- Fix `Button` text when the overrun behavior is other than "No Trimming" ([GH-80402](https://github.com/godotengine/godot/pull/80402)).
- Fix `CodeEdit` completion being very slow in certain cases ([GH-80472](https://github.com/godotengine/godot/pull/80472)).
- Fix crash when hiding subwindow during popup of new subwindow ([GH-80780](https://github.com/godotengine/godot/pull/80780)).
- RTL: Improve performance by using list iterators for item/paragraph removal ([GH-80857](https://github.com/godotengine/godot/pull/80857)).
- Fix setting TabContainer's `font_hovered_color` theme property ([GH-81040](https://github.com/godotengine/godot/pull/81040)).
- Fix ItemList not updating when icon scale changes ([GH-81268](https://github.com/godotengine/godot/pull/81268)).
#### Import
- Use image index instead of texture index for `source_images` ([GH-80314](https://github.com/godotengine/godot/pull/80314)).
#### Navigation
- Fix NavigationObstacle2D debug position ([GH-79392](https://github.com/godotengine/godot/pull/79392)).
- Make NavigationRegion3D baking NavMesh on the main thread not finish deferred ([GH-79465](https://github.com/godotengine/godot/pull/79465)).
- Fix NavMesh `map_update_id` returning 0 results in errors ([GH-80189](https://github.com/godotengine/godot/pull/80189)).
#### Networking
- Prevent crash when accessing `Node` Multiplayer from thread ([GH-79332](https://github.com/godotengine/godot/pull/79332)).
- ENet: Better handle truncated socket messages ([GH-79699](https://github.com/godotengine/godot/pull/79699)).
- ENet: Properly set transfer flags when using custom channels ([GH-80293](https://github.com/godotengine/godot/pull/80293)).
#### Porting
- macOS: Fix uncapped frame rate for windows in the non-active workspaces ([GH-79572](https://github.com/godotengine/godot/pull/79572)).
- Web: Fix file permissions for the web platform (affects every Unix-like platform) ([GH-79866](https://github.com/godotengine/godot/pull/79866)).
- Web: Fix `JavaScriptBridge.eval()` never returning PackedByteArray ([GH-81015](https://github.com/godotengine/godot/pull/81015)).
#### Rendering
- Fix crash when calling `get_video_adapter_*` in a thread ([GH-79528](https://github.com/godotengine/godot/pull/79528)).
- Unbind the framebuffer when updating meshes ([GH-79772](https://github.com/godotengine/godot/pull/79772)).
- Fix motion vectors being corrupted when using `precision=double` ([GH-80257](https://github.com/godotengine/godot/pull/80257)).
- Fix integer underflow when rounding up in VoxelGI ([GH-80356](https://github.com/godotengine/godot/pull/80356)).
- Improve handling of motion vectors for multimesh instances ([GH-80414](https://github.com/godotengine/godot/pull/80414)).
- Clear SDFGI textures when created ([GH-80889](https://github.com/godotengine/godot/pull/80889)).
- Fix integer value for `GL_MAX_UNIFORM_BLOCK_SIZE` overflowing ([GH-80909](https://github.com/godotengine/godot/pull/80909)).
- Add half-pixel offset to lightmapper rasterization ([GH-81872](https://github.com/godotengine/godot/pull/81872)).
- GLES3: Fix multimesh rendering when using colors or custom data ([GH-79660](https://github.com/godotengine/godot/pull/79660)).
- GLES3: Fix memory access error for `MultiMesh` ([GH-80788](https://github.com/godotengine/godot/pull/80788)).
- GLES3: Fix `glMapBufferRange` return null when `r_index + last_item_index > max_instance` ([GH-81036](https://github.com/godotengine/godot/pull/81036)).
- Vulkan: Fix texture update ([GH-80781](https://github.com/godotengine/godot/pull/80781)).
- Vulkan: Fix crash with many Omni/SpotLights, Decals or ReflectionProbes ([GH-80845](https://github.com/godotengine/godot/pull/80845)).
#### Shaders
- Fix shader type detection ([GH-79287](https://github.com/godotengine/godot/pull/79287)).
- Fix Shader and ShaderInclude resource loading ([GH-80705](https://github.com/godotengine/godot/pull/80705)).
- Fix empty shader resource loading ([GH-81300](https://github.com/godotengine/godot/pull/81300)).
#### XR
- Fix issue with accessing hand tracking without timing info ([GH-78817](https://github.com/godotengine/godot/pull/78817)).
## [4.1.1] - 2023-07-17
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-1-1) for details.
### Added
#### Animation
- Add 3.x compatibility for animation loop mode ([GH-79155](https://github.com/godotengine/godot/pull/79155)).
#### GUI
- Add compatibility properties to `TouchScreenButton` ([GH-78940](https://github.com/godotengine/godot/pull/78940)).
### Changed
#### 2D
- Improve string drawing in the tiledata editor ([GH-78522](https://github.com/godotengine/godot/pull/78522)).
- Make sure the shortcut key respects the context in `TileSetAtlasSourceEditor` ([GH-78920](https://github.com/godotengine/godot/pull/78920)).
#### Buildsystem
- Linux: Allow unbundling brotli to use system library ([GH-79101](https://github.com/godotengine/godot/pull/79101)).
- Linux: Link libsquish directly when unbundling, .pc file unreliable ([GH-79105](https://github.com/godotengine/godot/pull/79105)).
#### C#/.NET
- Update the RiderPathLocator to support the JetBrains Toolbox 2.0 ([GH-78832](https://github.com/godotengine/godot/pull/78832)).
- Compare symbol names without null flow state ([GH-79094](https://github.com/godotengine/godot/pull/79094)).
- Add null check before calling `UnregisterGodotObject` ([GH-79151](https://github.com/godotengine/godot/pull/79151)).
#### Core
- Check parameter validity in `Object::set_script` ([GH-46125](https://github.com/godotengine/godot/pull/46125)).
- Improve error message for `Node.set_owner` ([GH-79000](https://github.com/godotengine/godot/pull/79000)).
#### Editor
- Focus current node after connecting ([GH-54071](https://github.com/godotengine/godot/pull/54071)).
- Fix tooltip of enum value without description ([GH-78524](https://github.com/godotengine/godot/pull/78524)).
- Use bullet points in shader editor creation dialog ([GH-78631](https://github.com/godotengine/godot/pull/78631)).
- Sort project tags before saving ([GH-78775](https://github.com/godotengine/godot/pull/78775)).
- Project converter: Use same rendering driver as Project Manager ([GH-78795](https://github.com/godotengine/godot/pull/78795)).
- Add tooltip description wrapping in scene tree and plugin settings ([GH-79090](https://github.com/godotengine/godot/pull/79090)).
- Improve user-friendliness of project version mismatch messages ([GH-79118](https://github.com/godotengine/godot/pull/79118), [GH-79299](https://github.com/godotengine/godot/pull/79299)).
#### GUI
- Ensure that `_drop_physics_mouseover` only happens when necessary ([GH-78078](https://github.com/godotengine/godot/pull/78078)).
- Update FileDialog button activity when `file_mode` is changed ([GH-79211](https://github.com/godotengine/godot/pull/79211)).
- Hide/show `AcceptDialog`'s button spacer on button visibility changed ([GH-79274](https://github.com/godotengine/godot/pull/79274)).
#### Porting
- macOS/iOS: Set MoltenVK logging level based on `--verbose` flag ([GH-79061](https://github.com/godotengine/godot/pull/79061)).
- Windows: Flash both the window caption and taskbar button on `request_attention` ([GH-78263](https://github.com/godotengine/godot/pull/78263)).
#### Rendering
- Clear specular buffer if sky mode is canvas and screen space effects are used ([GH-78624](https://github.com/godotengine/godot/pull/78624)).
- Take eye offset into account for depth in StandardMaterial3D ([GH-79049](https://github.com/godotengine/godot/pull/79049)).
### Fixed
#### 2D
- Fix `Camera2D.rotating` not being converted and reversed properly ([GH-79264](https://github.com/godotengine/godot/pull/79264)).
#### 3D
- Fix Camera3D `project_*` methods not accounting for frustum offset ([GH-75806](https://github.com/godotengine/godot/pull/75806)).
- Fix 3D viewport grid disappearing on scene tab changes ([GH-78694](https://github.com/godotengine/godot/pull/78694)).
#### Animation
- Fix infinite loop state check in `AnimationStateMachine` ([GH-79141](https://github.com/godotengine/godot/pull/79141)).
- Fix `tween_property` on `Basis` to properly update its value ([GH-79426](https://github.com/godotengine/godot/pull/79426)).
#### Buildsystem
- Linux: Fix build with `use_sowrap=no` and various warnings/errors ([GH-79097](https://github.com/godotengine/godot/pull/79097)).
#### C#/.NET
- Fix command line exporting ([GH-79173](https://github.com/godotengine/godot/pull/79173)).
#### Core
- Fix zero-sized WorkerThreadPool not processing group tasks ([GH-78845](https://github.com/godotengine/godot/pull/78845)).
- Fix `Node::add_sibling` parent check ([GH-78847](https://github.com/godotengine/godot/pull/78847)).
- Fix error when non-ASCII characters in resource pack path ([GH-78935](https://github.com/godotengine/godot/pull/78935)).
- Fix erroneous `pad_zeros()` warning ([GH-79202](https://github.com/godotengine/godot/pull/79202)).
- Fix `PackedScene::get_last_modified_time()` always returns `0` ([GH-79237](https://github.com/godotengine/godot/pull/79237)).
#### Editor
- Fix dropping files from `res://` to `res://` ([GH-78914](https://github.com/godotengine/godot/pull/78914)).
- Do not change a node unique name to the same name ([GH-78925](https://github.com/godotengine/godot/pull/78925)).
- Collapse bottom panel if there is no active tab ([GH-79078](https://github.com/godotengine/godot/pull/79078)).
- Fix `ui_cancel` action not closing `FindReplaceBar` ([GH-79079](https://github.com/godotengine/godot/pull/79079)).
- Emit `history_changed` on merged UndoRedo actions ([GH-79484](https://github.com/godotengine/godot/pull/79484)).
#### Export
- Fix export options of scripted `EditorExportPlugin`s ([GH-79025](https://github.com/godotengine/godot/pull/79025)).
#### GDScript
- Fix regression with GDScript enum descriptions now showing up in documentation ([GH-78953](https://github.com/godotengine/godot/pull/78953)).
#### GUI
- Fix cursor behavior for multiselect in Tree while holding CTRL ([GH-71024](https://github.com/godotengine/godot/pull/71024)).
- Fix disabled slider highlighting ([GH-78776](https://github.com/godotengine/godot/pull/78776)).
- Fix invalid minimum size for translated messages in option button ([GH-78835](https://github.com/godotengine/godot/pull/78835)).
- Fix incorrect property names in `FontFile::_get_property_list()` ([GH-78907](https://github.com/godotengine/godot/pull/78907)).
- Revert "Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`" ([GH-79084](https://github.com/godotengine/godot/pull/79084)).
#### Import
- Fix property hint class name type string restriction and replace mode ([GH-79139](https://github.com/godotengine/godot/pull/79139)).
#### Navigation
- Fix closest possible navigation path position ([GH-79004](https://github.com/godotengine/godot/pull/79004)).
#### Networking
- Fix `rpc` calls with binds ([GH-78551](https://github.com/godotengine/godot/pull/78551)).
#### Particles
- Initialize particles instance buffer in case it is used before being updated ([GH-78852](https://github.com/godotengine/godot/pull/78852)).
- Unify error condition for particles trail lifetime ([GH-79270](https://github.com/godotengine/godot/pull/79270)).
#### Physics
- Fix rigid body `contact_monitor` property description ([GH-79250](https://github.com/godotengine/godot/pull/79250)).
#### Porting
- Fix formatting of `dlopen` error messages ([GH-78802](https://github.com/godotengine/godot/pull/78802)).
- Fix the fallback logic of `OS::shell_show_in_file_manager` ([GH-79087](https://github.com/godotengine/godot/pull/79087)).
- Linux/BSD: Avoid freeze when interacting with menus on Wayland ([GH-79143](https://github.com/godotengine/godot/pull/79143)).
- Linux/BSD: Fix `move_to_trash` wrongly reporting files as not found ([GH-79284](https://github.com/godotengine/godot/pull/79284)).
- Windows: Fix setting initial non-exclusive window mode ([GH-79016](https://github.com/godotengine/godot/pull/79016)).
#### Rendering
- Fix threading bug in Vulkan rendering device ([GH-78794](https://github.com/godotengine/godot/pull/78794)).
- Fix sanitizers reports about octahedral tangents in RenderingServer ([GH-78902](https://github.com/godotengine/godot/pull/78902)).
#### Shaders
- Fix invalid shader compilation when using `hint_normal_roughness_texture` in mobile backend ([GH-78839](https://github.com/godotengine/godot/pull/78839)).
- Fix using uint suffix at the hex number declaration in shaders ([GH-78906](https://github.com/godotengine/godot/pull/78906)).
- Fix shader language float literal precision truncation ([GH-78972](https://github.com/godotengine/godot/pull/78972)).
- Fix comments and indentation in `.gdshaderinc` files ([GH-79158](https://github.com/godotengine/godot/pull/79158)).
## [4.1] - 2023-07-06
See the [release announcement](https://godotengine.org/article/godot-4-1-is-here) for details.
@ -161,6 +998,7 @@ See the [release announcement](https://godotengine.org/article/godot-4-1-is-here
#### Core
- The strings returned by `ResourceLoader::get_dependencies()` now include paths in addition to UIDs ([GH-73131](https://github.com/godotengine/godot/pull/73131)).
- Optimize Node children management ([GH-75627](https://github.com/godotengine/godot/pull/75627)).
- Deprecate `NOTIFICATION_MOVED_IN_PARENT` for `NOTIFICATION_CHILD_ORDER_CHANGED` ([GH-75701](https://github.com/godotengine/godot/pull/75701)).
- Optimize `Node::add_child` validation ([GH-75760](https://github.com/godotengine/godot/pull/75760)).
@ -2876,6 +3714,9 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.
[4.1.3]: https://github.com/godotengine/godot/compare/4.1.2-stable...4.1.3-stable
[4.1.2]: https://github.com/godotengine/godot/compare/4.1.1-stable...4.1.2-stable
[4.1.1]: https://github.com/godotengine/godot/compare/4.1-stable...4.1.1-stable
[4.1]: https://github.com/godotengine/godot/compare/4.0-stable...4.1-stable
[4.0]: https://github.com/godotengine/godot/compare/3.2-stable...4.0-stable
[3.5]: https://github.com/godotengine/godot/compare/3.4-stable...3.5-stable

View File

@ -204,7 +204,7 @@ License: OFL-1.1
Files: ./thirdparty/freetype/
Comment: The FreeType Project
Copyright: 1996-2022, David Turner, Robert Wilhelm, and Werner Lemberg.
Copyright: 1996-2023, David Turner, Robert Wilhelm, and Werner Lemberg.
License: FTL
Files: ./thirdparty/glad/
@ -263,8 +263,8 @@ License: BSD-3-clause
Files: ./thirdparty/libpng/
Comment: libpng
Copyright: 1995-2019, The PNG Reference Library Authors.
2018-2019, Cosmin Truta.
Copyright: 1995-2024, The PNG Reference Library Authors.
2018-2024, Cosmin Truta.
2000-2002, 2004, 2006-2018 Glenn Randers-Pehrson.
1996-1997, Andreas Dilger.
1995-1996, Guy Eric Schalnat, Group 42, Inc.
@ -302,7 +302,7 @@ License: CC0-1.0
Files: ./thirdparty/miniupnpc/
Comment: MiniUPnP Project
Copyright: 2005-2022, Thomas Bernard
Copyright: 2005-2023, Thomas Bernard
License: BSD-3-clause
Files: ./thirdparty/minizip/
@ -409,7 +409,7 @@ License: Apache-2.0
Files: ./thirdparty/openxr/
Comment: OpenXR Loader
Copyright: 2020-2022, The Khronos Group Inc.
Copyright: 2020-2023, The Khronos Group Inc.
License: Apache-2.0
Files: ./thirdparty/pcre2/
@ -487,7 +487,7 @@ License: Expat
Files: ./thirdparty/zlib/
Comment: zlib
Copyright: 1995-2022, Jean-loup Gailly and Mark Adler
Copyright: 1995-2024, Jean-loup Gailly and Mark Adler
License: Zlib
Files: ./thirdparty/zstd/

View File

@ -152,7 +152,7 @@ env_base["x86_libtheora_opt_gcc"] = False
env_base["x86_libtheora_opt_vc"] = False
# avoid issues when building with different versions of python out of the same directory
env_base.SConsignFile(".sconsign{0}.dblite".format(pickle.HIGHEST_PROTOCOL))
env_base.SConsignFile(File("#.sconsign{0}.dblite".format(pickle.HIGHEST_PROTOCOL)).abspath)
# Build options
@ -193,6 +193,7 @@ opts.Add(BoolVariable("vulkan", "Enable the vulkan rendering driver", True))
opts.Add(BoolVariable("opengl3", "Enable the OpenGL/GLES3 rendering driver", True))
opts.Add(BoolVariable("openxr", "Enable the OpenXR driver", True))
opts.Add(BoolVariable("use_volk", "Use the volk library to load the Vulkan loader dynamically", True))
opts.Add(BoolVariable("disable_exceptions", "Force disabling exception handling code", False))
opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "")
opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True))
@ -222,6 +223,7 @@ opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise e
opts.Add(BoolVariable("scu_build", "Use single compilation unit build", False))
# Thirdparty libraries
opts.Add(BoolVariable("builtin_brotli", "Use the built-in Brotli library", True))
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True))
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
@ -239,6 +241,7 @@ opts.Add(BoolVariable("builtin_libwebp", "Use the built-in libwebp library", Tru
opts.Add(BoolVariable("builtin_wslay", "Use the built-in wslay library", True))
opts.Add(BoolVariable("builtin_mbedtls", "Use the built-in mbedTLS library", True))
opts.Add(BoolVariable("builtin_miniupnpc", "Use the built-in miniupnpc library", True))
opts.Add(BoolVariable("builtin_openxr", "Use the built-in OpenXR library", True))
opts.Add(BoolVariable("builtin_pcre2", "Use the built-in PCRE2 library", True))
opts.Add(BoolVariable("builtin_pcre2_with_jit", "Use JIT compiler for the built-in PCRE2 library", True))
opts.Add(BoolVariable("builtin_recastnavigation", "Use the built-in Recast navigation library", True))
@ -296,21 +299,21 @@ else:
if selected_platform in ["macos", "osx"]:
if selected_platform == "osx":
# Deprecated alias kept for compatibility.
print('Platform "osx" has been renamed to "macos" in Godot 4.0. Building for platform "macos".')
print('Platform "osx" has been renamed to "macos" in Godot 4. Building for platform "macos".')
# Alias for convenience.
selected_platform = "macos"
if selected_platform in ["ios", "iphone"]:
if selected_platform == "iphone":
# Deprecated alias kept for compatibility.
print('Platform "iphone" has been renamed to "ios" in Godot 4.0. Building for platform "ios".')
print('Platform "iphone" has been renamed to "ios" in Godot 4. Building for platform "ios".')
# Alias for convenience.
selected_platform = "ios"
if selected_platform in ["linux", "bsd", "x11"]:
if selected_platform == "x11":
# Deprecated alias kept for compatibility.
print('Platform "x11" has been renamed to "linuxbsd" in Godot 4.0. Building for platform "linuxbsd".')
print('Platform "x11" has been renamed to "linuxbsd" in Godot 4. Building for platform "linuxbsd".')
# Alias for convenience.
selected_platform = "linuxbsd"
@ -698,6 +701,16 @@ if selected_platform in platform_list:
)
Exit(255)
# Disable exception handling. Godot doesn't use exceptions anywhere, and this
# saves around 20% of binary size and very significant build time (GH-80513).
if env["disable_exceptions"]:
if env.msvc:
env.Append(CPPDEFINES=[("_HAS_EXCEPTIONS", 0)])
else:
env.Append(CXXFLAGS=["-fno-exceptions"])
elif env.msvc:
env.Append(CXXFLAGS=["/EHsc"])
# Configure compiler warnings
if env.msvc: # MSVC
if env["warnings"] == "no":
@ -727,11 +740,9 @@ if selected_platform in platform_list:
]
)
# Set exception handling model to avoid warnings caused by Windows system headers.
env.Append(CCFLAGS=["/EHsc"])
if env["werror"]:
env.Append(CCFLAGS=["/WX"])
env.Append(LINKFLAGS=["/WX"])
else: # GCC, Clang
common_warnings = []
@ -957,7 +968,7 @@ if selected_platform in platform_list:
print("Error: The `vsproj` option is only usable on Windows with Visual Studio.")
Exit(255)
env["CPPPATH"] = [Dir(path) for path in env["CPPPATH"]]
methods.generate_vs_project(env, GetOption("num_jobs"), env["vsproj_name"])
methods.generate_vs_project(env, ARGUMENTS, env["vsproj_name"])
methods.generate_cpp_hint_file("cpp.hint")
# Check for the existence of headers

View File

@ -65,7 +65,7 @@ thirdparty_misc_sources = [thirdparty_misc_dir + file for file in thirdparty_mis
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_misc_sources)
# Brotli
if env["brotli"]:
if env["brotli"] and env["builtin_brotli"]:
thirdparty_brotli_dir = "#thirdparty/brotli/"
thirdparty_brotli_sources = [
"common/constants.c",
@ -97,7 +97,6 @@ if env["builtin_zlib"]:
"compress.c",
"crc32.c",
"deflate.c",
"infback.c",
"inffast.c",
"inflate.c",
"inftrees.c",

View File

@ -819,7 +819,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S
if (!p_custom_features.is_empty()) {
file->store_32(count + 1);
//store how many properties are saved, add one for custom featuers, which must always go first
// Store how many properties are saved, add one for custom features, which must always go first.
String key = CoreStringNames::get_singleton()->_custom_features;
file->store_pascal_string(key);
@ -1344,7 +1344,7 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF_RST(PropertyInfo(Variant::INT, "rendering/occlusion_culling/bvh_build_quality", PROPERTY_HINT_ENUM, "Low,Medium,High"), 2);
GLOBAL_DEF(PropertyInfo(Variant::INT, "memory/limits/multithreaded_server/rid_pool_prealloc", PROPERTY_HINT_RANGE, "0,500,1"), 60); // No negative and limit to 500 due to crashes.
GLOBAL_DEF_RST("internationalization/rendering/force_right_to_left_layout_direction", false);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "internationalization/rendering/root_node_layout_direction", PROPERTY_HINT_RANGE, "Based on Locale,Left-to-Right,Right-to-Left"), 0);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "internationalization/rendering/root_node_layout_direction", PROPERTY_HINT_ENUM, "Based on Locale,Left-to-Right,Right-to-Left"), 0);
GLOBAL_DEF(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000);

View File

@ -420,6 +420,10 @@ void register_global_constants() {
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHD);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, LAUNCHF);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, GLOBE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KEYBOARD);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_EISU);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_KANA);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, UNKNOWN);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, SPACE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, EXCLAM);
@ -492,10 +496,6 @@ void register_global_constants() {
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, ASCIITILDE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, YEN);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, SECTION);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, GLOBE);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, KEYBOARD);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_EISU);
BIND_CORE_ENUM_CLASS_CONSTANT(Key, KEY, JIS_KANA);
BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(KeyModifierMask, KEY_CODE_MASK, CODE_MASK);
BIND_CORE_BITFIELD_CLASS_FLAG_CUSTOM(KeyModifierMask, KEY_MODIFIER_MASK, MODIFIER_MASK);

View File

@ -730,6 +730,16 @@ void _err_flush_stdout();
} else \
((void)0)
/**
* Warns about `m_msg` only when verbose mode is enabled.
*/
#define WARN_VERBOSE(m_msg) \
{ \
if (is_print_verbose_enabled()) { \
WARN_PRINT(m_msg); \
} \
}
// Print deprecated warning message macros.
/**

View File

@ -603,12 +603,13 @@ Ref<Resource> GDExtensionResourceLoader::load(const String &p_path, const String
}
bool compatible = true;
if (VERSION_MAJOR < compatibility_minimum[0]) {
compatible = false;
} else if (VERSION_MINOR < compatibility_minimum[1]) {
compatible = false;
} else if (VERSION_PATCH < compatibility_minimum[2]) {
compatible = false;
// Check version lexicographically.
if (VERSION_MAJOR != compatibility_minimum[0]) {
compatible = VERSION_MAJOR > compatibility_minimum[0];
} else if (VERSION_MINOR != compatibility_minimum[1]) {
compatible = VERSION_MINOR > compatibility_minimum[1];
} else {
compatible = VERSION_PATCH >= compatibility_minimum[2];
}
if (!compatible) {
if (r_error) {

View File

@ -253,7 +253,7 @@ static void gdextension_variant_iter_get(GDExtensionConstVariantPtr p_self, GDEx
Variant *iter = (Variant *)r_iter;
bool valid;
memnew_placement(r_ret, Variant(self->iter_next(*iter, valid)));
memnew_placement(r_ret, Variant(self->iter_get(*iter, valid)));
*r_valid = valid;
}

File diff suppressed because it is too large Load Diff

View File

@ -113,6 +113,7 @@ void Input::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_joy_axis", "device", "axis"), &Input::get_joy_axis);
ClassDB::bind_method(D_METHOD("get_joy_name", "device"), &Input::get_joy_name);
ClassDB::bind_method(D_METHOD("get_joy_guid", "device"), &Input::get_joy_guid);
ClassDB::bind_method(D_METHOD("should_ignore_device", "vendor_id", "product_id"), &Input::should_ignore_device);
ClassDB::bind_method(D_METHOD("get_connected_joypads"), &Input::get_connected_joypads);
ClassDB::bind_method(D_METHOD("get_joy_vibration_strength", "device"), &Input::get_joy_vibration_strength);
ClassDB::bind_method(D_METHOD("get_joy_vibration_duration", "device"), &Input::get_joy_vibration_duration);
@ -472,7 +473,8 @@ void Input::joy_connection_changed(int p_idx, bool p_connected, String p_name, S
}
joy_names[p_idx] = js;
emit_signal(SNAME("joy_connection_changed"), p_idx, p_connected);
// Ensure this signal is emitted on the main thread, as some platforms (e.g. Linux) call this from a different thread.
call_deferred("emit_signal", SNAME("joy_connection_changed"), p_idx, p_connected);
}
Vector3 Input::get_gravity() const {
@ -1058,7 +1060,8 @@ void Input::joy_axis(int p_device, JoyAxis p_axis, float p_value) {
return;
}
JoyEvent map = _get_mapped_axis_event(map_db[joy.mapping], p_axis, p_value);
JoyAxisRange range;
JoyEvent map = _get_mapped_axis_event(map_db[joy.mapping], p_axis, p_value, range);
if (map.type == TYPE_BUTTON) {
bool pressed = map.value > 0.5;
@ -1098,7 +1101,7 @@ void Input::joy_axis(int p_device, JoyAxis p_axis, float p_value) {
if (map.type == TYPE_AXIS) {
JoyAxis axis = JoyAxis(map.index);
float value = map.value;
if (axis == JoyAxis::TRIGGER_LEFT || axis == JoyAxis::TRIGGER_RIGHT) {
if (range == FULL_AXIS && (axis == JoyAxis::TRIGGER_LEFT || axis == JoyAxis::TRIGGER_RIGHT)) {
// Convert to a value between 0.0f and 1.0f.
value = 0.5f + value / 2.0f;
}
@ -1204,7 +1207,7 @@ Input::JoyEvent Input::_get_mapped_button_event(const JoyDeviceMapping &mapping,
return event;
}
Input::JoyEvent Input::_get_mapped_axis_event(const JoyDeviceMapping &mapping, JoyAxis p_axis, float p_value) {
Input::JoyEvent Input::_get_mapped_axis_event(const JoyDeviceMapping &mapping, JoyAxis p_axis, float p_value, JoyAxisRange &r_range) {
JoyEvent event;
for (int i = 0; i < mapping.bindings.size(); i++) {
@ -1250,6 +1253,7 @@ Input::JoyEvent Input::_get_mapped_axis_event(const JoyDeviceMapping &mapping, J
case TYPE_AXIS:
event.index = (int)binding.output.axis.axis;
event.value = value;
r_range = binding.output.axis.range;
if (binding.output.axis.range != binding.input.axis.range) {
switch (binding.output.axis.range) {
case POSITIVE_HALF_AXIS:
@ -1498,6 +1502,11 @@ String Input::get_joy_guid(int p_device) const {
return joy_names[p_device].uid;
}
bool Input::should_ignore_device(int p_vendor_id, int p_product_id) const {
uint32_t full_id = (((uint32_t)p_vendor_id) << 16) | ((uint16_t)p_product_id);
return ignored_device_ids.has(full_id);
}
TypedArray<int> Input::get_connected_joypads() {
TypedArray<int> ret;
HashMap<int, Joypad>::Iterator elem = joy_names.begin();
@ -1542,6 +1551,27 @@ Input::Input() {
}
}
String env_ignore_devices = OS::get_singleton()->get_environment("SDL_GAMECONTROLLER_IGNORE_DEVICES");
if (!env_ignore_devices.is_empty()) {
Vector<String> entries = env_ignore_devices.split(",");
for (int i = 0; i < entries.size(); i++) {
Vector<String> vid_pid = entries[i].split("/");
if (vid_pid.size() < 2) {
continue;
}
print_verbose(vformat("Device Ignored -- Vendor: %s Product: %s", vid_pid[0], vid_pid[1]));
const uint16_t vid_unswapped = vid_pid[0].hex_to_int();
const uint16_t pid_unswapped = vid_pid[1].hex_to_int();
const uint16_t vid = BSWAP16(vid_unswapped);
const uint16_t pid = BSWAP16(pid_unswapped);
uint32_t full_id = (((uint32_t)vid) << 16) | ((uint16_t)pid);
ignored_device_ids.insert(full_id);
}
}
legacy_just_pressed_behavior = GLOBAL_DEF("input_devices/compatibility/legacy_just_pressed_behavior", false);
if (Engine::get_singleton()->is_editor_hint()) {
// Always use standard behavior in the editor.

View File

@ -154,6 +154,9 @@ private:
VelocityTrack mouse_velocity_track;
HashMap<int, VelocityTrack> touch_velocity_track;
HashMap<int, Joypad> joy_names;
HashSet<uint32_t> ignored_device_ids;
int fallback_mapping = -1;
CursorShape default_shape = CURSOR_ARROW;
@ -216,7 +219,7 @@ private:
Vector<JoyDeviceMapping> map_db;
JoyEvent _get_mapped_button_event(const JoyDeviceMapping &mapping, JoyButton p_button);
JoyEvent _get_mapped_axis_event(const JoyDeviceMapping &mapping, JoyAxis p_axis, float p_value);
JoyEvent _get_mapped_axis_event(const JoyDeviceMapping &mapping, JoyAxis p_axis, float p_value, JoyAxisRange &r_range);
void _get_mapped_hat_events(const JoyDeviceMapping &mapping, HatDir p_hat, JoyEvent r_events[(size_t)HatDir::MAX]);
JoyButton _get_output_button(String output);
JoyAxis _get_output_axis(String output);
@ -328,6 +331,7 @@ public:
bool is_joy_known(int p_device);
String get_joy_guid(int p_device) const;
bool should_ignore_device(int p_vendor_id, int p_product_id) const;
void set_fallback_mapping(String p_guid);
void flush_buffered_events();

View File

@ -1192,7 +1192,7 @@ static const char *_joy_button_descriptions[(size_t)JoyButton::SDL_MAX] = {
TTRC("Top Action, Sony Triangle, Xbox Y, Nintendo X"),
TTRC("Back, Sony Select, Xbox Back, Nintendo -"),
TTRC("Guide, Sony PS, Xbox Home"),
TTRC("Start, Nintendo +"),
TTRC("Start, Xbox Menu, Nintendo +"),
TTRC("Left Stick, Sony L3, Xbox L/LS"),
TTRC("Right Stick, Sony R3, Xbox R/RS"),
TTRC("Left Shoulder, Sony L1, Xbox LB"),

View File

@ -35,13 +35,13 @@
#include "thirdparty/misc/fastlz.h"
#ifdef BROTLI_ENABLED
#include "thirdparty/brotli/include/brotli/decode.h"
#endif
#include <zlib.h>
#include <zstd.h>
#ifdef BROTLI_ENABLED
#include <brotli/decode.h>
#endif
int Compression::compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size, Mode p_mode) {
switch (p_mode) {
case MODE_BROTLI: {

View File

@ -47,7 +47,7 @@ static void *godot_open(voidpf opaque, const char *p_fname, int mode) {
return nullptr;
}
Ref<FileAccess> f = FileAccess::open(p_fname, FileAccess::READ);
Ref<FileAccess> f = FileAccess::open(String::utf8(p_fname), FileAccess::READ);
ERR_FAIL_COND_V(f.is_null(), nullptr);
ZipData *zd = memnew(ZipData);

View File

@ -509,6 +509,7 @@ static void _convert(int p_width, int p_height, const uint8_t *p_src, uint8_t *p
}
void Image::convert(Format p_new_format) {
ERR_FAIL_INDEX_MSG(p_new_format, FORMAT_MAX, "The Image format specified (" + itos(p_new_format) + ") is out of range. See Image's Format enum.");
if (data.size() == 0) {
return;
}

View File

@ -1619,8 +1619,10 @@ Error encode_variant(const Variant &p_variant, uint8_t *r_buffer, int &r_len, bo
encode_uint32(datalen, buf);
buf += 4;
const uint8_t *r = data.ptr();
memcpy(buf, &r[0], datalen * datasize);
buf += datalen * datasize;
if (r) {
memcpy(buf, &r[0], datalen * datasize);
buf += datalen * datasize;
}
}
r_len += 4 + datalen * datasize;

View File

@ -205,7 +205,7 @@ Error PCKPacker::flush(bool p_verbose) {
int header_padding = _get_pad(alignment, file->get_position());
for (int i = 0; i < header_padding; i++) {
file->store_8(Math::rand() % 256);
file->store_8(0);
}
int64_t file_base = file->get_position();
@ -244,7 +244,7 @@ Error PCKPacker::flush(bool p_verbose) {
int pad = _get_pad(alignment, file->get_position());
for (int j = 0; j < pad; j++) {
file->store_8(Math::rand() % 256);
file->store_8(0);
}
count += 1;

View File

@ -270,7 +270,7 @@ Error RemoteFilesystemClient::_synchronize_with_server(const String &p_host, int
String file = temp_file_cache[i].path;
if (temp_file_cache[i].server_modified_time == 0 || server_disconnected) {
// File was removed, or server disconnected before tranferring it. Since it's no longer valid, remove anyway.
// File was removed, or server disconnected before transferring it. Since it's no longer valid, remove anyway.
_remove_file(file);
continue;
}

View File

@ -44,8 +44,8 @@ protected:
String _get_cache_path() { return cache_path; }
struct FileCache {
String path; // Local path (as in "folder/to/file.png")
uint64_t server_modified_time; // MD5 checksum.
uint64_t modified_time;
uint64_t server_modified_time = 0; // MD5 checksum.
uint64_t modified_time = 0;
};
virtual bool _is_configured() { return !cache_path.is_empty(); }
// Can be re-implemented per platform. If so, feel free to ignore get_cache_path()

View File

@ -226,6 +226,7 @@ void Resource::configure_for_local_scene(Node *p_for_scene, HashMap<Ref<Resource
List<PropertyInfo> plist;
get_property_list(&plist);
reset_local_to_scene();
local_scene = p_for_scene;
for (const PropertyInfo &E : plist) {
@ -386,6 +387,10 @@ void Resource::setup_local_to_scene() {
emit_signal(SNAME("setup_local_to_scene_requested"));
}
void Resource::reset_local_to_scene() {
// Restores the state as if setup_local_to_scene() hadn't been called.
}
Node *(*Resource::_get_local_scene_func)() = nullptr;
void (*Resource::_update_configuration_warning)() = nullptr;

View File

@ -86,6 +86,8 @@ protected:
void _set_path(const String &p_path);
void _take_over_path(const String &p_path);
virtual void reset_local_to_scene();
public:
static Node *(*_get_local_scene_func)(); //used by editor
static void (*_update_configuration_warning)(); //used by editor

View File

@ -506,20 +506,20 @@ Ref<ResourceLoader::LoadToken> ResourceLoader::_load_start(const String &p_path,
float ResourceLoader::_dependency_get_progress(const String &p_path) {
if (thread_load_tasks.has(p_path)) {
ThreadLoadTask &load_task = thread_load_tasks[p_path];
float current_progress = 0.0;
int dep_count = load_task.sub_tasks.size();
if (dep_count > 0) {
float dep_progress = 0;
for (const String &E : load_task.sub_tasks) {
dep_progress += _dependency_get_progress(E);
current_progress += _dependency_get_progress(E);
}
dep_progress /= float(dep_count);
dep_progress *= 0.5;
dep_progress += load_task.progress * 0.5;
return dep_progress;
current_progress /= float(dep_count);
current_progress *= 0.5;
current_progress += load_task.progress * 0.5;
} else {
return load_task.progress;
current_progress = load_task.progress;
}
load_task.max_reported_progress = MAX(load_task.max_reported_progress, current_progress);
return load_task.max_reported_progress;
} else {
return 1.0; //assume finished loading it so it no longer exists
}
@ -917,7 +917,7 @@ String ResourceLoader::_path_remap(const String &p_path, bool *r_translation_rem
}
// Fallback to p_path if new_path does not exist.
if (!FileAccess::exists(new_path)) {
if (!FileAccess::exists(new_path + ".import") && !FileAccess::exists(new_path)) {
WARN_PRINT(vformat("Translation remap '%s' does not exist. Falling back to '%s'.", new_path, p_path));
new_path = p_path;
}

View File

@ -168,7 +168,8 @@ private:
String remapped_path;
String dependent_path;
String type_hint;
float progress = 0.0;
float progress = 0.0f;
float max_reported_progress = 0.0f;
ThreadLoadStatus status = THREAD_LOAD_IN_PROGRESS;
ResourceFormatLoader::CacheMode cache_mode = ResourceFormatLoader::CACHE_MODE_REUSE;
Error error = OK;
@ -231,7 +232,11 @@ public:
// Loaders can safely use this regardless which thread they are running on.
static void notify_dependency_error(const String &p_path, const String &p_dependency, const String &p_type) {
if (dep_err_notify) {
callable_mp_static(dep_err_notify).bind(p_path, p_dependency, p_type).call_deferred();
if (Thread::get_caller_id() == Thread::get_main_id()) {
dep_err_notify(p_path, p_dependency, p_type);
} else {
callable_mp_static(dep_err_notify).bind(p_path, p_dependency, p_type).call_deferred();
}
}
}
static void set_dependency_error_notify_func(DependencyErrorNotify p_err_notify) {

View File

@ -51,6 +51,7 @@ Error StreamPeerTCP::poll() {
status = STATUS_ERROR;
return err;
}
return OK;
} else if (status != STATUS_CONNECTING) {
return OK;
}

View File

@ -105,8 +105,8 @@ class Delaunay3D {
};
_FORCE_INLINE_ static void circum_sphere_compute(const Vector3 *p_points, Simplex *p_simplex) {
// the only part in the algorithm where there may be precision errors is this one, so ensure that
// we do it as maximum precision as possible
// The only part in the algorithm where there may be precision errors is this one,
// so ensure that we do it with the maximum precision possible.
R128 v0_x = p_points[p_simplex->points[0]].x;
R128 v0_y = p_points[p_simplex->points[0]].y;
@ -121,7 +121,7 @@ class Delaunay3D {
R128 v3_y = p_points[p_simplex->points[3]].y;
R128 v3_z = p_points[p_simplex->points[3]].z;
//Create the rows of our "unrolled" 3x3 matrix
// Create the rows of our "unrolled" 3x3 matrix.
R128 row1_x = v1_x - v0_x;
R128 row1_y = v1_y - v0_y;
R128 row1_z = v1_z - v0_z;
@ -138,10 +138,10 @@ class Delaunay3D {
R128 sq_lenght2 = row2_x * row2_x + row2_y * row2_y + row2_z * row2_z;
R128 sq_lenght3 = row3_x * row3_x + row3_y * row3_y + row3_z * row3_z;
//Compute the determinant of said matrix
// Compute the determinant of said matrix.
R128 determinant = row1_x * (row2_y * row3_z - row3_y * row2_z) - row2_x * (row1_y * row3_z - row3_y * row1_z) + row3_x * (row1_y * row2_z - row2_y * row1_z);
// Compute the volume of the tetrahedron, and precompute a scalar quantity for re-use in the formula
// Compute the volume of the tetrahedron, and precompute a scalar quantity for reuse in the formula.
R128 volume = determinant / R128(6.f);
R128 i12volume = R128(1.f) / (volume * R128(12.f));
@ -149,8 +149,7 @@ class Delaunay3D {
R128 center_y = v0_y + i12volume * (-(row2_x * row3_z - row3_x * row2_z) * sq_lenght1 + (row1_x * row3_z - row3_x * row1_z) * sq_lenght2 - (row1_x * row2_z - row2_x * row1_z) * sq_lenght3);
R128 center_z = v0_z + i12volume * ((row2_x * row3_y - row3_x * row2_y) * sq_lenght1 - (row1_x * row3_y - row3_x * row1_y) * sq_lenght2 + (row1_x * row2_y - row2_x * row1_y) * sq_lenght3);
//Once we know the center, the radius is clearly the distance to any vertex
// Once we know the center, the radius is clearly the distance to any vertex.
R128 rel1_x = center_x - v0_x;
R128 rel1_y = center_y - v0_y;
R128 rel1_z = center_z - v0_z;

View File

@ -81,35 +81,27 @@ template <class T, class... P>
class CallableCustomMethodPointer : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
#ifdef DEBUG_ENABLED
uint64_t object_id;
#endif
void (T::*method)(P...);
} data;
public:
virtual ObjectID get_object() const {
#ifdef DEBUG_ENABLED
if (ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr) {
return ObjectID();
}
#endif
return data.instance->get_instance_id();
}
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_MSG(ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr, "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
#endif
ERR_FAIL_NULL_MSG(ObjectDB::get_instance(ObjectID(data.object_id)), "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
call_with_variant_args(data.instance, data.method, p_arguments, p_argcount, r_call_error);
}
CallableCustomMethodPointer(T *p_instance, void (T::*p_method)(P...)) {
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
data.instance = p_instance;
#ifdef DEBUG_ENABLED
data.object_id = p_instance->get_instance_id();
#endif
data.method = p_method;
_setup((uint32_t *)&data, sizeof(Data));
}
@ -135,36 +127,28 @@ template <class T, class R, class... P>
class CallableCustomMethodPointerRet : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
#ifdef DEBUG_ENABLED
uint64_t object_id;
#endif
R(T::*method)
(P...);
} data;
public:
virtual ObjectID get_object() const {
#ifdef DEBUG_ENABLED
if (ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr) {
return ObjectID();
}
#endif
return data.instance->get_instance_id();
}
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_MSG(ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr, "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
#endif
ERR_FAIL_NULL_MSG(ObjectDB::get_instance(ObjectID(data.object_id)), "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
call_with_variant_args_ret(data.instance, data.method, p_arguments, p_argcount, r_return_value, r_call_error);
}
CallableCustomMethodPointerRet(T *p_instance, R (T::*p_method)(P...)) {
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
data.instance = p_instance;
#ifdef DEBUG_ENABLED
data.object_id = p_instance->get_instance_id();
#endif
data.method = p_method;
_setup((uint32_t *)&data, sizeof(Data));
}
@ -190,36 +174,28 @@ template <class T, class R, class... P>
class CallableCustomMethodPointerRetC : public CallableCustomMethodPointerBase {
struct Data {
T *instance;
#ifdef DEBUG_ENABLED
uint64_t object_id;
#endif
R(T::*method)
(P...) const;
} data;
public:
virtual ObjectID get_object() const override {
#ifdef DEBUG_ENABLED
if (ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr) {
return ObjectID();
}
#endif
return data.instance->get_instance_id();
}
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override {
#ifdef DEBUG_ENABLED
ERR_FAIL_COND_MSG(ObjectDB::get_instance(ObjectID(data.object_id)) == nullptr, "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
#endif
ERR_FAIL_NULL_MSG(ObjectDB::get_instance(ObjectID(data.object_id)), "Invalid Object id '" + uitos(data.object_id) + "', can't call method.");
call_with_variant_args_retc(data.instance, data.method, p_arguments, p_argcount, r_return_value, r_call_error);
}
CallableCustomMethodPointerRetC(T *p_instance, R (T::*p_method)(P...) const) {
memset(&data, 0, sizeof(Data)); // Clear beforehand, may have padding bytes.
data.instance = p_instance;
#ifdef DEBUG_ENABLED
data.object_id = p_instance->get_instance_id();
#endif
data.method = p_method;
_setup((uint32_t *)&data, sizeof(Data));
}

View File

@ -187,6 +187,7 @@ public:
template <class T>
static void register_class(bool p_virtual = false) {
GLOBAL_LOCK_FUNCTION;
static_assert(TypesAreSame<typename T::self_type, T>::value, "Class not declared properly, please use GDCLASS.");
T::initialize_class();
ClassInfo *t = classes.getptr(T::get_class_static());
ERR_FAIL_COND(!t);
@ -201,6 +202,7 @@ public:
template <class T>
static void register_abstract_class() {
GLOBAL_LOCK_FUNCTION;
static_assert(TypesAreSame<typename T::self_type, T>::value, "Class not declared properly, please use GDCLASS.");
T::initialize_class();
ClassInfo *t = classes.getptr(T::get_class_static());
ERR_FAIL_COND(!t);
@ -221,6 +223,7 @@ public:
template <class T>
static void register_custom_instance_class() {
GLOBAL_LOCK_FUNCTION;
static_assert(TypesAreSame<typename T::self_type, T>::value, "Class not declared properly, please use GDCLASS.");
T::initialize_class();
ClassInfo *t = classes.getptr(T::get_class_static());
ERR_FAIL_COND(!t);

View File

@ -35,6 +35,8 @@
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include <stdio.h>
#ifdef DEV_ENABLED
// Includes sanity checks to ensure that a queue set as a thread singleton override
// is only ever called from the thread it was set for.
@ -93,7 +95,7 @@ Error CallQueue::push_callablep(const Callable &p_callable, const Variant **p_ar
if ((page_bytes[pages_used - 1] + room_needed) > uint32_t(PAGE_SIZE_BYTES)) {
if (pages_used == max_pages) {
ERR_PRINT("Failed method: " + p_callable + ". Message queue out of memory. " + error_text);
fprintf(stderr, "Failed method: %s. Message queue out of memory. %s\n", String(p_callable).utf8().get_data(), error_text.utf8().get_data());
statistics();
UNLOCK_MUTEX;
return ERR_OUT_OF_MEMORY;
@ -144,7 +146,7 @@ Error CallQueue::push_set(ObjectID p_id, const StringName &p_prop, const Variant
if (ObjectDB::get_instance(p_id)) {
type = ObjectDB::get_instance(p_id)->get_class();
}
ERR_PRINT("Failed set: " + type + ":" + p_prop + " target ID: " + itos(p_id) + ". Message queue out of memory. " + error_text);
fprintf(stderr, "Failed set: %s: %s target ID: %s. Message queue out of memory. %s\n", type.utf8().get_data(), String(p_prop).utf8().get_data(), itos(p_id).utf8().get_data(), error_text.utf8().get_data());
statistics();
UNLOCK_MUTEX;
@ -181,7 +183,7 @@ Error CallQueue::push_notification(ObjectID p_id, int p_notification) {
if ((page_bytes[pages_used - 1] + room_needed) > uint32_t(PAGE_SIZE_BYTES)) {
if (pages_used == max_pages) {
ERR_PRINT("Failed notification: " + itos(p_notification) + " target ID: " + itos(p_id) + ". Message queue out of memory. " + error_text);
fprintf(stderr, "Failed notification: %s target ID: %s. Message queue out of memory. %s\n", itos(p_notification).utf8().get_data(), itos(p_id).utf8().get_data(), error_text.utf8().get_data());
statistics();
UNLOCK_MUTEX;
return ERR_OUT_OF_MEMORY;

View File

@ -836,14 +836,16 @@ void Object::set_script(const Variant &p_script) {
return;
}
Ref<Script> s = p_script;
ERR_FAIL_COND_MSG(s.is_null() && !p_script.is_null(), "Invalid parameter, it should be a reference to a valid script (or null).");
script = p_script;
if (script_instance) {
memdelete(script_instance);
script_instance = nullptr;
}
script = p_script;
Ref<Script> s = script;
if (!s.is_null()) {
if (s->can_instantiate()) {
OBJ_DEBUG_LOCK

View File

@ -382,6 +382,7 @@ private:
friend class ::ClassDB; \
\
public: \
typedef m_class self_type; \
static constexpr bool _class_is_enabled = !bool(GD_IS_DEFINED(ClassDB_Disable_##m_class)) && m_inherits::_class_is_enabled; \
virtual String get_class() const override { \
if (_get_extension()) { \
@ -551,6 +552,8 @@ class ScriptInstance;
class Object {
public:
typedef Object self_type;
enum ConnectFlags {
CONNECT_DEFERRED = 1,
CONNECT_PERSIST = 2, // hint for scene to save this connection

View File

@ -416,7 +416,7 @@ Error WorkerThreadPool::wait_for_task_completion(TaskID p_task_id) {
WorkerThreadPool::GroupID WorkerThreadPool::_add_group_task(const Callable &p_callable, void (*p_func)(void *, uint32_t), void *p_userdata, BaseTemplateUserdata *p_template_userdata, int p_elements, int p_tasks, bool p_high_priority, const String &p_description) {
ERR_FAIL_COND_V(p_elements < 0, INVALID_TASK_ID);
if (p_tasks < 0) {
p_tasks = threads.size();
p_tasks = MAX(1u, threads.size());
}
task_mutex.lock();

View File

@ -146,6 +146,7 @@ static const _KeyCodeText _keycodes[] = {
{Key::FAVORITES ,"Favorites"},
{Key::SEARCH ,"Search"},
{Key::STANDBY ,"StandBy"},
{Key::OPENURL ,"OpenURL"},
{Key::LAUNCHMAIL ,"LaunchMail"},
{Key::LAUNCHMEDIA ,"LaunchMedia"},
{Key::LAUNCH0 ,"Launch0"},
@ -238,6 +239,8 @@ static const _KeyCodeText _keycodes[] = {
{Key::BAR ,"Bar"},
{Key::BRACERIGHT ,"BraceRight"},
{Key::ASCIITILDE ,"AsciiTilde"},
{Key::YEN ,"Yen"},
{Key::SECTION ,"Section"},
{Key::NONE ,nullptr}
/* clang-format on */
};

View File

@ -33,6 +33,8 @@
#include "core/string/ustring.h"
// Keep the values in this enum in sync with `_keycodes` in `keyboard.cpp`,
// and the bindings in `core_constants.cpp`.
enum class Key {
NONE = 0,
// Special key: The strategy here is similar to the one used by toolkits,

View File

@ -295,12 +295,14 @@ Error OS::shell_open(String p_uri) {
}
Error OS::shell_show_in_file_manager(String p_path, bool p_open_folder) {
if (!p_path.begins_with("file://")) {
p_path = String("file://") + p_path;
}
if (!p_path.ends_with("/")) {
p_path = p_path.trim_prefix("file://");
if (!DirAccess::dir_exists_absolute(p_path)) {
p_path = p_path.get_base_dir();
}
p_path = String("file://") + p_path;
return shell_open(p_path);
}
// implement these with the canvas?

View File

@ -82,6 +82,15 @@ void Translation::_set_messages(const Dictionary &p_messages) {
void Translation::set_locale(const String &p_locale) {
locale = TranslationServer::get_singleton()->standardize_locale(p_locale);
if (Thread::is_main_thread()) {
_notify_translation_changed_if_applies();
} else {
// Avoid calling non-thread-safe functions here.
callable_mp(this, &Translation::_notify_translation_changed_if_applies).call_deferred();
}
}
void Translation::_notify_translation_changed_if_applies() {
if (OS::get_singleton()->get_main_loop() && TranslationServer::get_singleton()->get_loaded_locales().has(get_locale())) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
@ -511,11 +520,11 @@ String TranslationServer::get_country_name(const String &p_country) const {
void TranslationServer::set_locale(const String &p_locale) {
locale = standardize_locale(p_locale);
ResourceLoader::reload_translation_remaps();
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
ResourceLoader::reload_translation_remaps();
}
String TranslationServer::get_locale() const {
@ -807,10 +816,11 @@ bool TranslationServer::is_pseudolocalization_enabled() const {
void TranslationServer::set_pseudolocalization_enabled(bool p_enabled) {
pseudolocalization_enabled = p_enabled;
ResourceLoader::reload_translation_remaps();
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
ResourceLoader::reload_translation_remaps();
}
void TranslationServer::set_editor_pseudolocalization(bool p_enabled) {
@ -827,10 +837,11 @@ void TranslationServer::reload_pseudolocalization() {
pseudolocalization_suffix = GLOBAL_GET("internationalization/pseudolocalization/suffix");
pseudolocalization_skip_placeholders_enabled = GLOBAL_GET("internationalization/pseudolocalization/skip_placeholders");
ResourceLoader::reload_translation_remaps();
if (OS::get_singleton()->get_main_loop()) {
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_TRANSLATION_CHANGED);
}
ResourceLoader::reload_translation_remaps();
}
StringName TranslationServer::pseudolocalize(const StringName &p_message) const {

View File

@ -47,6 +47,8 @@ class Translation : public Resource {
virtual Dictionary _get_messages() const;
virtual void _set_messages(const Dictionary &p_messages);
void _notify_translation_changed_if_applies();
protected:
static void _bind_methods();

View File

@ -305,7 +305,11 @@ void String::copy_from(const char *p_cstr) {
char32_t *dst = this->ptrw();
for (size_t i = 0; i <= len; i++) {
#if CHAR_MIN == 0
uint8_t c = p_cstr[i];
#else
uint8_t c = p_cstr[i] >= 0 ? p_cstr[i] : uint8_t(256 + p_cstr[i]);
#endif
if (c == 0 && i < len) {
print_unicode_error("NUL character", true);
dst[i] = _replacement_char;
@ -338,7 +342,11 @@ void String::copy_from(const char *p_cstr, const int p_clip_to) {
char32_t *dst = this->ptrw();
for (int i = 0; i < len; i++) {
#if CHAR_MIN == 0
uint8_t c = p_cstr[i];
#else
uint8_t c = p_cstr[i] >= 0 ? p_cstr[i] : uint8_t(256 + p_cstr[i]);
#endif
if (c == 0) {
print_unicode_error("NUL character", true);
dst[i] = _replacement_char;
@ -544,7 +552,11 @@ String &String::operator+=(const char *p_str) {
char32_t *dst = ptrw() + lhs_len;
for (size_t i = 0; i <= rhs_len; i++) {
#if CHAR_MIN == 0
uint8_t c = p_str[i];
#else
uint8_t c = p_str[i] >= 0 ? p_str[i] : uint8_t(256 + p_str[i]);
#endif
if (c == 0 && i < rhs_len) {
print_unicode_error("NUL character", true);
dst[i] = _replacement_char;
@ -1493,9 +1505,9 @@ String String::num(double p_num, int p_decimals) {
if (p_decimals < 0) {
p_decimals = 14;
const double abs_num = ABS(p_num);
const double abs_num = Math::abs(p_num);
if (abs_num > 10) {
// We want to align the digits to the above sane default, so we only
// We want to align the digits to the above reasonable default, so we only
// need to subtract log10 for numbers with a positive power of ten.
p_decimals -= (int)floor(log10(abs_num));
}
@ -1814,7 +1826,11 @@ Error String::parse_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
int skip = 0;
uint8_t c_start = 0;
while (ptrtmp != ptrtmp_limit && *ptrtmp) {
#if CHAR_MIN == 0
uint8_t c = *ptrtmp;
#else
uint8_t c = *ptrtmp >= 0 ? *ptrtmp : uint8_t(256 + *ptrtmp);
#endif
if (skip == 0) {
if (p_skip_cr && c == '\r') {
@ -1882,7 +1898,11 @@ Error String::parse_utf8(const char *p_utf8, int p_len, bool p_skip_cr) {
int skip = 0;
uint32_t unichar = 0;
while (cstr_size) {
#if CHAR_MIN == 0
uint8_t c = *p_utf8;
#else
uint8_t c = *p_utf8 >= 0 ? *p_utf8 : uint8_t(256 + *p_utf8);
#endif
if (skip == 0) {
if (p_skip_cr && c == '\r') {
@ -3945,24 +3965,22 @@ bool String::is_absolute_path() const {
}
}
static _FORCE_INLINE_ bool _is_valid_identifier_bit(int p_index, char32_t p_char) {
if (p_index == 0 && is_digit(p_char)) {
return false; // No start with number plz.
}
return is_ascii_identifier_char(p_char);
}
String String::validate_identifier() const {
if (is_empty()) {
return "_"; // Empty string is not a valid identifier;
}
String result = *this;
String result;
if (is_digit(operator[](0))) {
result = "_" + *this;
} else {
result = *this;
}
int len = result.length();
char32_t *buffer = result.ptrw();
for (int i = 0; i < len; i++) {
if (!_is_valid_identifier_bit(i, buffer[i])) {
if (!is_ascii_identifier_char(buffer[i])) {
buffer[i] = '_';
}
}
@ -3977,10 +3995,14 @@ bool String::is_valid_identifier() const {
return false;
}
if (is_digit(operator[](0))) {
return false;
}
const char32_t *str = &operator[](0);
for (int i = 0; i < len; i++) {
if (!_is_valid_identifier_bit(i, str[i])) {
if (!is_ascii_identifier_char(str[i])) {
return false;
}
}
@ -4281,12 +4303,13 @@ String String::pad_zeros(int p_digits) const {
begin++;
}
if (begin >= end) {
return s;
}
int zeros_to_add = p_digits - (end - begin);
return s.insert(begin, String("0").repeat(zeros_to_add));
if (zeros_to_add <= 0) {
return s;
} else {
return s.insert(begin, String("0").repeat(zeros_to_add));
}
}
String String::trim_prefix(const String &p_prefix) const {
@ -4868,8 +4891,8 @@ String String::sprintf(const Array &values, bool *error) const {
}
double value = values[value_index];
bool is_negative = (value < 0);
String str = String::num(ABS(value), min_decimals);
bool is_negative = signbit(value);
String str = String::num(Math::abs(value), min_decimals);
const bool is_finite = Math::is_finite(value);
// Pad decimals out.
@ -4931,7 +4954,7 @@ String String::sprintf(const Array &values, bool *error) const {
String str = "(";
for (int i = 0; i < count; i++) {
double val = vec[i];
String number_str = String::num(ABS(val), min_decimals);
String number_str = String::num(Math::abs(val), min_decimals);
const bool is_finite = Math::is_finite(val);
// Pad decimals out.

View File

@ -90,6 +90,10 @@ private:
}
_FORCE_INLINE_ bool _get_alloc_size_checked(size_t p_elements, size_t *out) const {
if (unlikely(p_elements == 0)) {
*out = 0;
return true;
}
#if defined(__GNUC__)
size_t o;
size_t p;
@ -101,13 +105,12 @@ private:
if (__builtin_add_overflow(o, static_cast<size_t>(32), &p)) {
return false; // No longer allocated here.
}
return true;
#else
// Speed is more important than correctness here, do the operations unchecked
// and hope for the best.
*out = _get_alloc_size(p_elements);
return true;
#endif
return *out;
}
void _unref(void *p_data);

View File

@ -310,7 +310,7 @@ struct HashMapHasherDefault {
static _FORCE_INLINE_ uint32_t hash(const char16_t p_uchar) { return hash_fmix32(p_uchar); }
static _FORCE_INLINE_ uint32_t hash(const char32_t p_uchar) { return hash_fmix32(p_uchar); }
static _FORCE_INLINE_ uint32_t hash(const RID &p_rid) { return hash_one_uint64(p_rid.get_id()); }
static _FORCE_INLINE_ uint32_t hash(const CharString &p_char_string) { return hash_djb2(p_char_string.ptr()); }
static _FORCE_INLINE_ uint32_t hash(const CharString &p_char_string) { return hash_djb2(p_char_string.get_data()); }
static _FORCE_INLINE_ uint32_t hash(const StringName &p_string_name) { return p_string_name.hash(); }
static _FORCE_INLINE_ uint32_t hash(const NodePath &p_path) { return p_path.hash(); }
static _FORCE_INLINE_ uint32_t hash(const ObjectID &p_id) { return hash_one_uint64(p_id); }

View File

@ -211,10 +211,10 @@ public:
size_mask = mask;
}
RingBuffer<T>(int p_power = 0) {
RingBuffer(int p_power = 0) {
resize(p_power);
}
~RingBuffer<T>() {}
~RingBuffer() {}
};
#endif // RING_BUFFER_H

View File

@ -146,7 +146,7 @@ public:
}
}
_ALWAYS_INLINE_ explicit SafeNumeric<T>(T p_value = static_cast<T>(0)) {
_ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast<T>(0)) {
set(p_value);
}
};

View File

@ -92,6 +92,7 @@
#undef Error
#undef OK
#undef CONNECT_DEFERRED // override from Windows SDK, clashes with Object enum
#undef MONO_FONT
#endif
// Make room for our constexpr's below by overriding potential system-specific macros.

View File

@ -454,17 +454,21 @@ Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const {
const int s = size();
int begin = CLAMP(p_begin, -s, s);
if (s == 0 || (p_begin < -s && p_step < 0) || (p_begin >= s && p_step > 0)) {
return result;
}
int begin = CLAMP(p_begin, -s, s - 1);
if (begin < 0) {
begin += s;
}
int end = CLAMP(p_end, -s, s);
int end = CLAMP(p_end, -s - 1, s);
if (end < 0) {
end += s;
}
ERR_FAIL_COND_V_MSG(p_step > 0 && begin > end, result, "Slice is positive, but bounds is decreasing.");
ERR_FAIL_COND_V_MSG(p_step < 0 && begin < end, result, "Slice is negative, but bounds is increasing.");
ERR_FAIL_COND_V_MSG(p_step > 0 && begin > end, result, "Slice step is positive, but bounds are decreasing.");
ERR_FAIL_COND_V_MSG(p_step < 0 && begin < end, result, "Slice step is negative, but bounds are increasing.");
int result_size = (end - begin) / p_step + (((end - begin) % p_step != 0) ? 1 : 0);
result.resize(result_size);

View File

@ -88,7 +88,7 @@ ObjectID CallableCustomBind::get_object() const {
}
const Callable *CallableCustomBind::get_base_comparator() const {
return &callable;
return callable.get_base_comparator();
}
int CallableCustomBind::get_bound_arguments_count() const {
@ -144,6 +144,18 @@ void CallableCustomBind::call(const Variant **p_arguments, int p_argcount, Varia
callable.callp(args, p_argcount + binds.size(), r_return_value, r_call_error);
}
Error CallableCustomBind::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
const Variant **args = (const Variant **)alloca(sizeof(const Variant **) * (binds.size() + p_argcount));
for (int i = 0; i < p_argcount; i++) {
args[i] = (const Variant *)p_arguments[i];
}
for (int i = 0; i < binds.size(); i++) {
args[i + p_argcount] = (const Variant *)&binds[i];
}
return callable.rpcp(p_peer_id, args, p_argcount + binds.size(), r_call_error);
}
CallableCustomBind::CallableCustomBind(const Callable &p_callable, const Vector<Variant> &p_binds) {
callable = p_callable;
binds = p_binds;
@ -210,7 +222,7 @@ ObjectID CallableCustomUnbind::get_object() const {
}
const Callable *CallableCustomUnbind::get_base_comparator() const {
return &callable;
return callable.get_base_comparator();
}
int CallableCustomUnbind::get_bound_arguments_count() const {
@ -242,6 +254,16 @@ void CallableCustomUnbind::call(const Variant **p_arguments, int p_argcount, Var
callable.callp(p_arguments, p_argcount - argcount, r_return_value, r_call_error);
}
Error CallableCustomUnbind::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
if (argcount > p_argcount) {
r_call_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_call_error.argument = 0;
r_call_error.expected = argcount;
return ERR_UNCONFIGURED;
}
return callable.rpcp(p_peer_id, p_arguments, p_argcount - argcount, r_call_error);
}
CallableCustomUnbind::CallableCustomUnbind(const Callable &p_callable, int p_argcount) {
callable = p_callable;
argcount = p_argcount;

View File

@ -51,6 +51,7 @@ public:
virtual StringName get_method() const override;
virtual ObjectID get_object() const override;
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;
virtual Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
virtual const Callable *get_base_comparator() const override;
virtual int get_bound_arguments_count() const override;
virtual void get_bound_arguments(Vector<Variant> &r_arguments, int &r_argcount) const override;
@ -78,6 +79,7 @@ public:
virtual StringName get_method() const override;
virtual ObjectID get_object() const override;
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;
virtual Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
virtual const Callable *get_base_comparator() const override;
virtual int get_bound_arguments_count() const override;
virtual void get_bound_arguments(Vector<Variant> &r_arguments, int &r_argcount) const override;

View File

@ -1754,11 +1754,10 @@ String Variant::stringify(int recursion_count) const {
case COLOR:
return operator Color();
case DICTIONARY: {
ERR_FAIL_COND_V_MSG(recursion_count > MAX_RECURSION, "{ ... }", "Maximum dictionary recursion reached!");
recursion_count++;
const Dictionary &d = *reinterpret_cast<const Dictionary *>(_data._mem);
if (recursion_count > MAX_RECURSION) {
ERR_PRINT("Maximum dictionary recursion reached!");
return "{ ... }";
}
// Add leading and trailing space to Dictionary printing. This distinguishes it
// from array printing on fonts that have similar-looking {} and [] characters.
@ -1768,7 +1767,6 @@ String Variant::stringify(int recursion_count) const {
Vector<_VariantStrPair> pairs;
recursion_count++;
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
_VariantStrPair sp;
sp.key = stringify_variant_clean(E->get(), recursion_count);
@ -1787,6 +1785,7 @@ String Variant::stringify(int recursion_count) const {
return str;
}
// Packed arrays cannot contain recursive structures, the recursion_count increment is not needed.
case PACKED_VECTOR2_ARRAY: {
return stringify_vector(operator Vector<Vector2>(), recursion_count);
}
@ -1815,13 +1814,10 @@ String Variant::stringify(int recursion_count) const {
return stringify_vector(operator Vector<double>(), recursion_count);
}
case ARRAY: {
Array arr = operator Array();
if (recursion_count > MAX_RECURSION) {
ERR_PRINT("Maximum array recursion reached!");
return "[...]";
}
ERR_FAIL_COND_V_MSG(recursion_count > MAX_RECURSION, "[...]", "Maximum array recursion reached!");
recursion_count++;
return stringify_vector(arr, recursion_count);
return stringify_vector(operator Array(), recursion_count);
}
case OBJECT: {
if (_get_obj().obj) {

View File

@ -1708,7 +1708,7 @@ static String rtos_fix(double p_value) {
}
}
Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud, EncodeResourceFunc p_encode_res_func, void *p_encode_res_ud, int recursion_count) {
Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud, EncodeResourceFunc p_encode_res_func, void *p_encode_res_ud, int p_recursion_count) {
switch (p_variant.get_type()) {
case Variant::NIL: {
p_store_string_func(p_store_string_ud, "null");
@ -1730,10 +1730,11 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
case Variant::STRING: {
String str = p_variant;
str = "\"" + str.c_escape_multiline() + "\"";
p_store_string_func(p_store_string_ud, str);
} break;
// Math types.
case Variant::VECTOR2: {
Vector2 v = p_variant;
p_store_string_func(p_store_string_ud, "Vector2(" + rtos_fix(v.x) + ", " + rtos_fix(v.y) + ")");
@ -1745,12 +1746,10 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
case Variant::RECT2: {
Rect2 aabb = p_variant;
p_store_string_func(p_store_string_ud, "Rect2(" + rtos_fix(aabb.position.x) + ", " + rtos_fix(aabb.position.y) + ", " + rtos_fix(aabb.size.x) + ", " + rtos_fix(aabb.size.y) + ")");
} break;
case Variant::RECT2I: {
Rect2i aabb = p_variant;
p_store_string_func(p_store_string_ud, "Rect2i(" + itos(aabb.position.x) + ", " + itos(aabb.position.y) + ", " + itos(aabb.size.x) + ", " + itos(aabb.size.y) + ")");
} break;
case Variant::VECTOR3: {
Vector3 v = p_variant;
@ -1771,17 +1770,14 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
case Variant::PLANE: {
Plane p = p_variant;
p_store_string_func(p_store_string_ud, "Plane(" + rtos_fix(p.normal.x) + ", " + rtos_fix(p.normal.y) + ", " + rtos_fix(p.normal.z) + ", " + rtos_fix(p.d) + ")");
} break;
case Variant::AABB: {
AABB aabb = p_variant;
p_store_string_func(p_store_string_ud, "AABB(" + rtos_fix(aabb.position.x) + ", " + rtos_fix(aabb.position.y) + ", " + rtos_fix(aabb.position.z) + ", " + rtos_fix(aabb.size.x) + ", " + rtos_fix(aabb.size.y) + ", " + rtos_fix(aabb.size.z) + ")");
} break;
case Variant::QUATERNION: {
Quaternion quaternion = p_variant;
p_store_string_func(p_store_string_ud, "Quaternion(" + rtos_fix(quaternion.x) + ", " + rtos_fix(quaternion.y) + ", " + rtos_fix(quaternion.z) + ", " + rtos_fix(quaternion.w) + ")");
} break;
case Variant::TRANSFORM2D: {
String s = "Transform2D(";
@ -1796,7 +1792,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, s + ")");
} break;
case Variant::BASIS: {
String s = "Basis(";
@ -1811,7 +1806,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, s + ")");
} break;
case Variant::TRANSFORM3D: {
String s = "Transform3D(";
@ -1845,30 +1839,23 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, s + ")");
} break;
// misc types
// Misc types.
case Variant::COLOR: {
Color c = p_variant;
p_store_string_func(p_store_string_ud, "Color(" + rtos_fix(c.r) + ", " + rtos_fix(c.g) + ", " + rtos_fix(c.b) + ", " + rtos_fix(c.a) + ")");
} break;
case Variant::STRING_NAME: {
String str = p_variant;
str = "&\"" + str.c_escape() + "\"";
p_store_string_func(p_store_string_ud, str);
} break;
case Variant::NODE_PATH: {
String str = p_variant;
str = "NodePath(\"" + str.c_escape() + "\")";
p_store_string_func(p_store_string_ud, str);
} break;
case Variant::RID: {
RID rid = p_variant;
if (rid == RID()) {
p_store_string_func(p_store_string_ud, "RID()");
} else {
@ -1885,6 +1872,13 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
} break;
case Variant::OBJECT: {
if (unlikely(p_recursion_count > MAX_RECURSION)) {
ERR_PRINT("Max recursion reached");
p_store_string_func(p_store_string_ud, "null");
return OK;
}
p_recursion_count++;
Object *obj = p_variant.get_validated_object();
if (!obj) {
@ -1934,21 +1928,20 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, "\"" + E.name + "\":");
write(obj->get(E.name), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud);
write(obj->get(E.name), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, p_recursion_count);
}
}
p_store_string_func(p_store_string_ud, ")\n");
} break;
case Variant::DICTIONARY: {
Dictionary dict = p_variant;
if (recursion_count > MAX_RECURSION) {
if (unlikely(p_recursion_count > MAX_RECURSION)) {
ERR_PRINT("Max recursion reached");
p_store_string_func(p_store_string_ud, "{}");
} else {
recursion_count++;
p_recursion_count++;
List<Variant> keys;
dict.get_key_list(&keys);
@ -1961,9 +1954,9 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, "{\n");
for (List<Variant>::Element *E = keys.front(); E; E = E->next()) {
write(E->get(), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, recursion_count);
write(E->get(), p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, p_recursion_count);
p_store_string_func(p_store_string_ud, ": ");
write(dict[E->get()], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, recursion_count);
write(dict[E->get()], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, p_recursion_count);
if (E->next()) {
p_store_string_func(p_store_string_ud, ",\n");
} else {
@ -1973,7 +1966,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, "}");
}
} break;
case Variant::ARRAY: {
@ -2009,11 +2001,11 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
p_store_string_func(p_store_string_ud, "](");
}
if (recursion_count > MAX_RECURSION) {
if (unlikely(p_recursion_count > MAX_RECURSION)) {
ERR_PRINT("Max recursion reached");
p_store_string_func(p_store_string_ud, "[]");
} else {
recursion_count++;
p_recursion_count++;
p_store_string_func(p_store_string_ud, "[");
int len = array.size();
@ -2021,7 +2013,7 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
if (i > 0) {
p_store_string_func(p_store_string_ud, ", ");
}
write(array[i], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, recursion_count);
write(array[i], p_store_string_func, p_store_string_ud, p_encode_res_func, p_encode_res_ud, p_recursion_count);
}
p_store_string_func(p_store_string_ud, "]");
@ -2030,7 +2022,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
if (array.get_typed_builtin() != Variant::NIL) {
p_store_string_func(p_store_string_ud, ")");
}
} break;
case Variant::PACKED_BYTE_ARRAY: {
@ -2048,7 +2039,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_INT32_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedInt32Array(");
@ -2065,7 +2055,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_INT64_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedInt64Array(");
@ -2082,7 +2071,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_FLOAT32_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedFloat32Array(");
@ -2098,7 +2086,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_FLOAT64_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedFloat64Array(");
@ -2114,7 +2101,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_STRING_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedStringArray(");
@ -2130,7 +2116,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_VECTOR2_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedVector2Array(");
@ -2146,7 +2131,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_VECTOR3_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedVector3Array(");
@ -2162,7 +2146,6 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
case Variant::PACKED_COLOR_ARRAY: {
p_store_string_func(p_store_string_ud, "PackedColorArray(");
@ -2178,8 +2161,8 @@ Error VariantWriter::write(const Variant &p_variant, StoreStringFunc p_store_str
}
p_store_string_func(p_store_string_ud, ")");
} break;
default: {
ERR_PRINT("Unknown variant type");
return ERR_BUG;

View File

@ -160,7 +160,7 @@ public:
typedef Error (*StoreStringFunc)(void *ud, const String &p_string);
typedef String (*EncodeResourceFunc)(void *ud, const Ref<Resource> &p_resource);
static Error write(const Variant &p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud, EncodeResourceFunc p_encode_res_func, void *p_encode_res_ud, int recursion_count = 0);
static Error write(const Variant &p_variant, StoreStringFunc p_store_string_func, void *p_store_string_ud, EncodeResourceFunc p_encode_res_func, void *p_encode_res_ud, int p_recursion_count = 0);
static Error write_to_string(const Variant &p_variant, String &r_string, EncodeResourceFunc p_encode_res_func = nullptr, void *p_encode_res_ud = nullptr);
};

View File

@ -341,7 +341,7 @@
- 1.0: Linear
- Greater than 1.0 (exclusive): Ease in
[/codeblock]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/ease_cheatsheet.png]ease() curve values cheatsheet[/url]
See also [method smoothstep]. If you need to perform more advanced transitions, use [method Tween.interpolate_value].
</description>
</method>
@ -1203,7 +1203,7 @@
smoothstep(0, 2, 2.0) # Returns 1.0
[/codeblock]
Compared to [method ease] with a curve value of [code]-1.6521[/code], [method smoothstep] returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use [Tween] or [AnimationPlayer].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/smoothstep_ease_comparison.png]Comparison between smoothstep() and ease(x, -1.6521) return values[/url]
</description>
</method>
<method name="snapped">
@ -2032,6 +2032,18 @@
<constant name="KEY_LAUNCHF" value="4194415" enum="Key">
Launch Shortcut F key.
</constant>
<constant name="KEY_GLOBE" value="4194416" enum="Key">
"Globe" key on Mac / iPad keyboard.
</constant>
<constant name="KEY_KEYBOARD" value="4194417" enum="Key">
"On-screen keyboard" key on iPad keyboard.
</constant>
<constant name="KEY_JIS_EISU" value="4194418" enum="Key">
英数 key on Mac keyboard.
</constant>
<constant name="KEY_JIS_KANA" value="4194419" enum="Key">
かな key on Mac keyboard.
</constant>
<constant name="KEY_UNKNOWN" value="8388607" enum="Key">
Unknown key.
</constant>
@ -2248,18 +2260,6 @@
<constant name="KEY_SECTION" value="167" enum="Key">
§ key.
</constant>
<constant name="KEY_GLOBE" value="4194416" enum="Key">
"Globe" key on Mac / iPad keyboard.
</constant>
<constant name="KEY_KEYBOARD" value="4194417" enum="Key">
"On-screen keyboard" key iPad keyboard.
</constant>
<constant name="KEY_JIS_EISU" value="4194418" enum="Key">
英数 key on Mac keyboard.
</constant>
<constant name="KEY_JIS_KANA" value="4194419" enum="Key">
かな key on Mac keyboard.
</constant>
<constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true">
Key Code mask.
</constant>
@ -2435,61 +2435,66 @@
The maximum number of game controller axes: OpenVR supports up to 5 Joysticks making a total of 10 axes.
</constant>
<constant name="MIDI_MESSAGE_NONE" value="0" enum="MIDIMessage">
Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state.
Does not correspond to any MIDI message. This is the default value of [member InputEventMIDI.message].
</constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
MIDI note OFF message. Not all MIDI devices send this event; some send [constant MIDI_MESSAGE_NOTE_ON] with zero velocity instead. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
MIDI message sent when a note is released.
[b]Note:[/b] Not all MIDI devices send this message; some may send [constant MIDI_MESSAGE_NOTE_ON] with [member InputEventMIDI.velocity] set to [code]0[/code].
</constant>
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
MIDI note ON message. Some MIDI devices send this event with velocity zero instead of [constant MIDI_MESSAGE_NOTE_OFF], but implementations vary. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
MIDI message sent when a note is pressed.
</constant>
<constant name="MIDI_MESSAGE_AFTERTOUCH" value="10" enum="MIDIMessage">
MIDI aftertouch message. This message is most often sent by pressing down on the key after it "bottoms out".
MIDI message sent to indicate a change in pressure while a note is being pressed down, also called aftertouch.
</constant>
<constant name="MIDI_MESSAGE_CONTROL_CHANGE" value="11" enum="MIDIMessage">
MIDI control change message. This message is sent when a controller value changes. Controllers include devices such as pedals and levers.
MIDI message sent when a controller value changes. In a MIDI device, a controller is any input that doesn't play notes. These may include sliders for volume, balance, and panning, as well as switches and pedals. See the [url=https://en.wikipedia.org/wiki/General_MIDI#Controller_events]General MIDI specification[/url] for a small list.
</constant>
<constant name="MIDI_MESSAGE_PROGRAM_CHANGE" value="12" enum="MIDIMessage">
MIDI program change message. This message sent when the program patch number changes.
MIDI message sent when the MIDI device changes its current instrument (also called [i]program[/i] or [i]preset[/i]).
</constant>
<constant name="MIDI_MESSAGE_CHANNEL_PRESSURE" value="13" enum="MIDIMessage">
MIDI channel pressure message. This message is most often sent by pressing down on the key after it "bottoms out". This message is different from polyphonic after-touch as it indicates the highest pressure across all keys.
MIDI message sent to indicate a change in pressure for the whole channel. Some MIDI devices may send this instead of [constant MIDI_MESSAGE_AFTERTOUCH].
</constant>
<constant name="MIDI_MESSAGE_PITCH_BEND" value="14" enum="MIDIMessage">
MIDI pitch bend message. This message is sent to indicate a change in the pitch bender (wheel or lever, typically).
MIDI message sent when the value of the pitch bender changes, usually a wheel on the MIDI device.
</constant>
<constant name="MIDI_MESSAGE_SYSTEM_EXCLUSIVE" value="240" enum="MIDIMessage">
MIDI system exclusive message. This has behavior exclusive to the device you're receiving input from. Getting this data is not implemented in Godot.
MIDI system exclusive (SysEx) message. This type of message is not standardized and it's highly dependent on the MIDI device sending it.
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
</constant>
<constant name="MIDI_MESSAGE_QUARTER_FRAME" value="241" enum="MIDIMessage">
MIDI quarter frame message. Contains timing information that is used to synchronize MIDI devices. Getting this data is not implemented in Godot.
MIDI message sent every quarter frame to keep connected MIDI devices synchronized. Related to [constant MIDI_MESSAGE_TIMING_CLOCK].
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
</constant>
<constant name="MIDI_MESSAGE_SONG_POSITION_POINTER" value="242" enum="MIDIMessage">
MIDI song position pointer message. Gives the number of 16th notes since the start of the song. Getting this data is not implemented in Godot.
MIDI message sent to jump onto a new position in the current sequence or song.
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
</constant>
<constant name="MIDI_MESSAGE_SONG_SELECT" value="243" enum="MIDIMessage">
MIDI song select message. Specifies which sequence or song is to be played. Getting this data is not implemented in Godot.
MIDI message sent to select a sequence or song to play.
[b]Note:[/b] Getting this message's data from [InputEventMIDI] is not implemented.
</constant>
<constant name="MIDI_MESSAGE_TUNE_REQUEST" value="246" enum="MIDIMessage">
MIDI tune request message. Upon receiving a tune request, all analog synthesizers should tune their oscillators.
MIDI message sent to request a tuning calibration. Used on analog synthesizers. Most modern MIDI devices do not need this message.
</constant>
<constant name="MIDI_MESSAGE_TIMING_CLOCK" value="248" enum="MIDIMessage">
MIDI timing clock message. Sent 24 times per quarter note when synchronization is required.
MIDI message sent 24 times after [constant MIDI_MESSAGE_QUARTER_FRAME], to keep connected MIDI devices synchronized.
</constant>
<constant name="MIDI_MESSAGE_START" value="250" enum="MIDIMessage">
MIDI start message. Start the current sequence playing. This message will be followed with Timing Clocks.
MIDI message sent to start the current sequence or song from the beginning.
</constant>
<constant name="MIDI_MESSAGE_CONTINUE" value="251" enum="MIDIMessage">
MIDI continue message. Continue at the point the sequence was stopped.
MIDI message sent to resume from the point the current sequence or song was paused.
</constant>
<constant name="MIDI_MESSAGE_STOP" value="252" enum="MIDIMessage">
MIDI stop message. Stop the current sequence.
MIDI message sent to pause the current sequence or song.
</constant>
<constant name="MIDI_MESSAGE_ACTIVE_SENSING" value="254" enum="MIDIMessage">
MIDI active sensing message. This message is intended to be sent repeatedly to tell the receiver that a connection is alive.
MIDI message sent repeatedly while the MIDI device is idle, to tell the receiver that the connection is alive. Most MIDI devices do not send this message.
</constant>
<constant name="MIDI_MESSAGE_SYSTEM_RESET" value="255" enum="MIDIMessage">
MIDI system reset message. Reset all receivers in the system to power-up status. It should not be sent on power-up itself.
MIDI message sent to reset a MIDI device to its default state, as if it was just turned on. It should not be sent when the MIDI device is being turned on.
</constant>
<constant name="OK" value="0" enum="Error">
Methods that return [enum Error] return [constant OK] when no error occurred.

View File

@ -17,7 +17,7 @@
[/gdscript]
[csharp]
AStarGrid2D astarGrid = new AStarGrid2D();
astarGrid.Size = new Vector2I(32, 32);
astarGrid.Region = new Rect2I(0, 0, 32, 32);
astarGrid.CellSize = new Vector2I(16, 16);
astarGrid.Update();
GD.Print(astarGrid.GetIdPath(Vector2I.Zero, new Vector2I(3, 4))); // prints (0, 0), (1, 1), (2, 2), (3, 3), (3, 4)
@ -67,7 +67,7 @@
<param index="1" name="to_id" type="Vector2i" />
<description>
Returns an array with the points that are in the path found by AStarGrid2D between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector2Array] and will print an error message.
</description>
</method>
<method name="get_point_position" qualifiers="const">

View File

@ -8,21 +8,23 @@
[codeblocks]
[gdscript]
# This creates an animation that makes the node "Enemy" move to the right by
# 100 pixels in 0.5 seconds.
# 100 pixels in 2.0 seconds.
var animation = Animation.new()
var track_index = animation.add_track(Animation.TYPE_VALUE)
animation.track_set_path(track_index, "Enemy:position:x")
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
animation.track_insert_key(track_index, 2.0, 100)
animation.length = 2.0
[/gdscript]
[csharp]
// This creates an animation that makes the node "Enemy" move to the right by
// 100 pixels in 0.5 seconds.
// 100 pixels in 2.0 seconds.
var animation = new Animation();
int trackIndex = animation.AddTrack(Animation.TrackType.Value);
animation.TrackSetPath(trackIndex, "Enemy:position:x");
animation.TrackInsertKey(trackIndex, 0.0f, 0);
animation.TrackInsertKey(trackIndex, 0.5f, 100);
animation.TrackInsertKey(trackIndex, 2.0f, 100);
animation.Length = 2.0f;
[/csharp]
[/codeblocks]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
@ -257,7 +259,7 @@
<param index="0" name="track_idx" type="int" />
<param index="1" name="to_animation" type="Animation" />
<description>
Adds a new track that is a copy of the given track from [param to_animation].
Adds a new track to [param to_animation] that is a copy of the given track from this animation.
</description>
</method>
<method name="find_track" qualifiers="const">

View File

@ -27,7 +27,7 @@
<method name="_get_child_nodes" qualifiers="virtual const">
<return type="Dictionary" />
<description>
When inheriting from [AnimationRootNode], implement this virtual method to return all children animation nodes in order as a [code]name: node[/code] dictionary.
When inheriting from [AnimationRootNode], implement this virtual method to return all child animation nodes in order as a [code]name: node[/code] dictionary.
</description>
</method>
<method name="_get_parameter_default_value" qualifiers="virtual const">
@ -115,7 +115,7 @@
<param index="7" name="sync" type="bool" default="true" />
<param index="8" name="test_only" type="bool" default="false" />
<description>
Blend another animation node (in case this animation node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your animation node for addition.
Blend another animation node (in case this animation node contains child animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, otherwise editors will not display your animation node for addition.
</description>
</method>
<method name="find_input" qualifiers="const">

View File

@ -4,7 +4,7 @@
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three additively out of three based on the amounmt value.
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three additively out of three based on the amount value.
This animation node has three inputs:
- The base animation to add to
- A "-add" animation to blend with when the blend amount is negative

View File

@ -4,7 +4,7 @@
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three linearly out of three based on the amounmt value.
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three linearly out of three based on the amount value.
This animation node has three inputs:
- The base animation to blend with
- A "-blend" animation to blend with when the blend amount is negative value

View File

@ -4,7 +4,7 @@
A time-scaling animation node used in [AnimationTree].
</brief_description>
<description>
Allows to scale the speed of the animation (or reverse it) in any children [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation.
Allows to scale the speed of the animation (or reverse it) in any child [AnimationNode]s. Setting it to [code]0.0[/code] will pause the animation.
</description>
<tutorials>
<link title="Using AnimationTree">$DOCS_URL/tutorials/animation/animation_tree.html</link>

View File

@ -218,6 +218,11 @@
<param index="1" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array.
[codeblock]
var array = ["a", "b", "c", "c", "d", "e"]
print(array.bsearch("c", true)) # Prints 2, at the first matching element.
print(array.bsearch("c", false)) # Prints 4, after the last matching element, pointing to "d".
[/codeblock]
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
@ -228,6 +233,7 @@
<param index="2" name="before" type="bool" default="true" />
<description>
Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise.
[b]Note:[/b] The custom method must accept the two arguments in any order, you cannot rely on that the first argument will always be from the array.
[b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior.
</description>
</method>
@ -584,6 +590,7 @@
If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]).
If specified, [param step] is the relative index between source elements. It can be negative, then [param begin] must be higher than [param end]. For example, [code][0, 1, 2, 3, 4, 5].slice(5, 1, -2)[/code] returns [code][5, 3][/code].
If [param deep] is true, each element will be copied by value rather than by reference.
[b]Note:[/b] To include the first element when [param step] is negative, use [code]arr.slice(begin, -arr.size() - 1, step)[/code] (i.e. [code][0, 1, 2].slice(1, -4, -1)[/code] returns [code][1, 0][/code]).
</description>
</method>
<method name="sort">

View File

@ -8,6 +8,7 @@
See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
</description>
<tutorials>
<link title="Occlusion culling">$DOCS_URL/tutorials/3d/occlusion_culling.html</link>
</tutorials>
<methods>
<method name="set_arrays">

View File

@ -280,6 +280,8 @@
<return type="void" />
<param index="0" name="enable" type="bool" />
<description>
If set to [code]true[/code], all instances of [AudioStreamPlayback] will call [method AudioStreamPlayback._tag_used_streams] every mix step.
[b]Note:[/b] This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews.
</description>
</method>
<method name="swap_bus_effects">

View File

@ -16,31 +16,39 @@
<method name="_get_beat_count" qualifiers="virtual const">
<return type="int" />
<description>
Overridable method. Should return the total number of beats of this audio stream. Used by the engine to determine the position of every beat.
Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).
</description>
</method>
<method name="_get_bpm" qualifiers="virtual const">
<return type="float" />
<description>
Overridable method. Should return the tempo of this audio stream, in beats per minute (BPM). Used by the engine to determine the position of every beat.
Ideally, the returned value should be based off the stream's sample rate ([member AudioStreamWAV.mix_rate], for example).
</description>
</method>
<method name="_get_length" qualifiers="virtual const">
<return type="float" />
<description>
Override this method to customize the returned value of [method get_length]. Should return the length of this audio stream, in seconds.
</description>
</method>
<method name="_get_stream_name" qualifiers="virtual const">
<return type="String" />
<description>
Override this method to customize the name assigned to this audio stream. Unused by the engine.
</description>
</method>
<method name="_instantiate_playback" qualifiers="virtual const">
<return type="AudioStreamPlayback" />
<description>
Override this method to customize the returned value of [method instantiate_playback]. Should returned a new [AudioStreamPlayback] created when the stream is played (such as by an [AudioStreamPlayer])..
</description>
</method>
<method name="_is_monophonic" qualifiers="virtual const">
<return type="bool" />
<description>
Override this method to customize the returned value of [method is_monophonic]. Should return [code]true[/code] if this audio stream only supports one channel.
</description>
</method>
<method name="get_length" qualifiers="const">
@ -52,13 +60,13 @@
<method name="instantiate_playback">
<return type="AudioStreamPlayback" />
<description>
Returns an AudioStreamPlayback. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source files for [code]AudioStreamRandomPitch::instantiate_playback[/code].
Returns a newly created [AudioStreamPlayback] intended to play this audio stream. Useful for when you want to extend [method _instantiate_playback] but call [method instantiate_playback] from an internally held AudioStream subresource. An example of this can be found in the source code for [code]AudioStreamRandomPitch::instantiate_playback[/code].
</description>
</method>
<method name="is_monophonic" qualifiers="const">
<return type="bool" />
<description>
Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony.
Returns [code]true[/code] if this audio stream only supports one channel ([i]monophony[/i]), or [code]false[/code] if the audio stream supports two or more channels ([i]polyphony[/i]).
</description>
</method>
</methods>

View File

@ -8,6 +8,7 @@
[b]Note:[/b] [member ProjectSettings.audio/driver/enable_input] must be [code]true[/code] for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings.
</description>
<tutorials>
<link title="Recording with microphone">$DOCS_URL/tutorials/audio/recording_with_microphone.html</link>
<link title="Audio Mic Record Demo">https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record</link>
</tutorials>
</class>

View File

@ -13,16 +13,19 @@
<method name="_get_loop_count" qualifiers="virtual const">
<return type="int" />
<description>
Overridable method. Should return how many times this audio stream has looped. Most built-in playbacks always return [code]0[/code].
</description>
</method>
<method name="_get_playback_position" qualifiers="virtual const">
<return type="float" />
<description>
Overridable method. Should return the current progress along the audio stream, in seconds.
</description>
</method>
<method name="_is_playing" qualifiers="virtual const">
<return type="bool" />
<description>
Overridable method. Should return [code]true[/code] if this playback is active and playing its audio stream.
</description>
</method>
<method name="_mix" qualifiers="virtual">
@ -31,28 +34,34 @@
<param index="1" name="rate_scale" type="float" />
<param index="2" name="frames" type="int" />
<description>
Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active.
[b]Note:[/b] It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it.
</description>
</method>
<method name="_seek" qualifiers="virtual">
<return type="void" />
<param index="0" name="position" type="float" />
<description>
Override this method to customize what happens when seeking this audio stream at the given [param position], such as by calling [method AudioStreamPlayer.seek].
</description>
</method>
<method name="_start" qualifiers="virtual">
<return type="void" />
<param index="0" name="from_pos" type="float" />
<description>
Override this method to customize what happens when the playback starts at the given position, such as by calling [method AudioStreamPlayer.play].
</description>
</method>
<method name="_stop" qualifiers="virtual">
<return type="void" />
<description>
Override this method to customize what happens when the playback is stopped, such as by calling [method AudioStreamPlayer.stop].
</description>
</method>
<method name="_tag_used_streams" qualifiers="virtual">
<return type="void" />
<description>
Overridable method. Called whenever the audio stream is mixed if the playback is active and [method AudioServer.set_enable_tagging_used_audio_streams] has been set to [code]true[/code]. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview.
</description>
</method>
</methods>

View File

@ -85,7 +85,7 @@
Attenuation factor used if listener is outside of [member emission_angle_degrees] and [member emission_angle_enabled] is set, in decibels.
</member>
<member name="max_db" type="float" setter="set_max_db" getter="get_max_db" default="3.0">
Sets the absolute maximum of the soundlevel, in decibels.
Sets the absolute maximum of the sound level, in decibels.
</member>
<member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0">
The distance past which the sound can no longer be heard at all. Only has an effect if set to a value greater than [code]0.0[/code]. [member max_distance] works in tandem with [member unit_size]. However, unlike [member unit_size] whose behavior depends on the [member attenuation_model], [member max_distance] always works in a linear fashion. This can be used to prevent the [AudioStreamPlayer3D] from requiring audio mixing when the listener is far away, which saves CPU resources.

View File

@ -269,7 +269,7 @@
Specifies the channel of the [member metallic_texture] in which the metallic information is stored. This is useful when you store the information for multiple effects in a single texture. For example if you stored metallic in the red channel, roughness in the blue, and ambient occlusion in the green you could reduce the number of textures you use.
</member>
<member name="msdf_outline_size" type="float" setter="set_msdf_outline_size" getter="get_msdf_outline_size" default="0.0">
The width of the shape outine.
The width of the shape outline.
</member>
<member name="msdf_pixel_range" type="float" setter="set_msdf_pixel_range" getter="get_msdf_pixel_range" default="4.0">
The width of the range around the shape between the minimum and maximum representable signed distance.
@ -498,22 +498,22 @@
Represents the size of the [enum TextureParam] enum.
</constant>
<constant name="TEXTURE_FILTER_NEAREST" value="0" enum="TextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized.
The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
</constant>
<constant name="TEXTURE_FILTER_LINEAR" value="1" enum="TextureFilter">
The texture filter blends between the nearest 4 pixels. Use this when you want to avoid a pixelated style, but do not want mipmaps.
The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="2" enum="TextureFilter">
The texture filter reads from the nearest pixel in the nearest mipmap. The fastest way to read from textures with mipmaps.
The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look pixelated from up close, and smooth from a distance.
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="3" enum="TextureFilter">
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for most cases as mipmaps are important to smooth out pixels that are far from the camera.
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look smooth from up close, and smooth from a distance.
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="4" enum="TextureFilter">
The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
</constant>
<constant name="TEXTURE_FILTER_MAX" value="6" enum="TextureFilter">
Represents the size of the [enum TextureFilter] enum.

View File

@ -4,10 +4,12 @@
A 3×3 matrix for representing 3D rotation and scale.
</brief_description>
<description>
A 3×3 matrix used for representing 3D rotation and scale. Usually used as an orthogonal basis for a [Transform3D].
Contains 3 vector fields X, Y and Z as its columns, which are typically interpreted as the local basis vectors of a transformation. For such use, it is composed of a scaling and a rotation matrix, in that order (M = R.S).
Basis can also be accessed as an array of 3D vectors. These vectors are usually orthogonal to each other, but are not necessarily normalized (due to scaling).
For more information, read the "Matrices and transforms" documentation article.
The [Basis] built-in [Variant] type is a 3x3 [url=https://en.wikipedia.org/wiki/Matrix_(mathematics)]matrix[/url] used to represent 3D rotation, scale, and shear. It is frequently used within a [Transform3D].
A [Basis] is composed by 3 axis vectors, each representing a column of the matrix: [member x], [member y], and [member z]. The length of each axis ([method Vector3.length]) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted.
A [Basis] is [b]orthogonal[/b] if its axes are perpendicular to each other. A basis is [b]normalized[/b] if the length of every axis is [code]1[/code]. A basis is [b]uniform[/b] if all axes share the same length (see [method get_scale]). A basis is [b]orthonormal[/b] if it is both orthogonal and normalized, which allows it to only represent rotations. A basis is [b]conformal[/b] if it is both orthogonal and uniform, which ensures it is not distorted.
For a general introduction, see the [url=$DOCS_URL/tutorials/math/matrices_and_transforms.html]Matrices and transforms[/url] tutorial.
[b]Note:[/b] Godot uses a [url=https://en.wikipedia.org/wiki/Right-hand_rule]right-handed coordinate system[/url], which is a common standard. For directions, the convention for built-in types like [Camera3D] is for -Z to point forward (+X is right, +Y is up, and +Z is back). Other objects may use different direction conventions. For more information, see the [url=$DOCS_URL/tutorials/assets_pipeline/importing_scenes.html#d-asset-direction-conventions]Importing 3D Scenes[/url] tutorial.
[b]Note:[/b] The basis matrices are exposed as [url=https://www.mindcontrol.org/~hplus/graphics/matrix-layout.html]column-major[/url] order, which is the same as OpenGL. However, they are stored internally in row-major order, which is the same as DirectX.
</description>
<tutorials>
<link title="Math documentation index">$DOCS_URL/tutorials/math/index.html</link>
@ -22,7 +24,7 @@
<constructor name="Basis">
<return type="Basis" />
<description>
Constructs a default-initialized [Basis] set to [constant IDENTITY].
Constructs a [Basis] identical to the [constant IDENTITY].
</description>
</constructor>
<constructor name="Basis">
@ -37,14 +39,16 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
Constructs a pure rotation basis matrix, rotated around the given [param axis] by [param angle] (in radians). The axis must be a normalized vector.
Constructs a [Basis] that only represents rotation, rotated around the [param axis] by the given [param angle], in radians. The axis must be a normalized vector.
[b]Note:[/b] This is the same as using [method rotated] on the [constant IDENTITY] basis. With more than one angle consider using [method from_euler], instead.
</description>
</constructor>
<constructor name="Basis">
<return type="Basis" />
<param index="0" name="from" type="Quaternion" />
<description>
Constructs a pure rotation basis matrix from the given quaternion.
Constructs a [Basis] that only represents rotation from the given [Quaternion].
[b]Note:[/b] Quaternions [i]only[/i] store rotation, not scale. Because of this, conversions from [Basis] to [Quaternion] cannot always be reversed.
</description>
</constructor>
<constructor name="Basis">
@ -53,7 +57,7 @@
<param index="1" name="y_axis" type="Vector3" />
<param index="2" name="z_axis" type="Vector3" />
<description>
Constructs a basis matrix from 3 axis vectors (matrix columns).
Constructs a [Basis] from 3 axis vectors. These are the columns of the basis matrix.
</description>
</constructor>
</constructors>
@ -61,8 +65,10 @@
<method name="determinant" qualifiers="const">
<return type="float" />
<description>
Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale.
A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid.
Returns the [url=https://en.wikipedia.org/wiki/Determinant]determinant[/url] of this basis's matrix. For advanced math, this number can be used to determine a few attributes:
- If the determinant is exactly [code]0[/code], the basis is not invertible (see [method inverse]).
- If the determinant is a negative number, the basis represents a negative scale.
[b]Note:[/b] If the basis's scale is the same for every axis, its determinant is always that scale by the power of 2.
</description>
</method>
<method name="from_euler" qualifiers="static">
@ -70,40 +76,108 @@
<param index="0" name="euler" type="Vector3" />
<param index="1" name="order" type="int" default="2" />
<description>
Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values.
Constructs a new [Basis] that only represents rotation from the given [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.
- The [member Vector3.x] should contain the angle around the [member x] axis (pitch).
- The [member Vector3.y] should contain the angle around the [member y] axis (yaw).
- The [member Vector3.z] should contain the angle around the [member z] axis (roll).
[codeblocks]
[gdscript]
# Creates a Basis whose z axis points down.
var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0))
print(my_basis.z) # Prints (0, -1, 0).
[/gdscript]
[csharp]
// Creates a Basis whose z axis points down.
var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f));
GD.Print(myBasis.Z); // Prints (0, -1, 0).
[/csharp]
[/codeblocks]
The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method [method get_euler], this order is reversed.
</description>
</method>
<method name="from_scale" qualifiers="static">
<return type="Basis" />
<param index="0" name="scale" type="Vector3" />
<description>
Constructs a pure scale basis matrix with no rotation or shearing. The scale values are set as the diagonal of the matrix, and the other parts of the matrix are zero.
Constructs a new [Basis] that only represents scale, with no rotation or shear, from the given [param scale] vector.
[codeblocks]
[gdscript]
var my_basis = Basis.from_scale(Vector3(2, 4, 8))
print(my_basis.x) # Prints (2, 0, 0).
print(my_basis.y) # Prints (0, 4, 0).
print(my_basis.z) # Prints (0, 0, 8).
[/gdscript]
[csharp]
var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f));
GD.Print(myBasis.X); // Prints (2, 0, 0).
GD.Print(myBasis.Y); // Prints (0, 4, 0).
GD.Print(myBasis.Z); // Prints (0, 0, 8).
[/csharp]
[/codeblocks]
[b]Note:[/b] In linear algebra, the matrix of this basis is also known as a [url=https://en.wikipedia.org/wiki/Diagonal_matrix]diagonal matrix[/url].
</description>
</method>
<method name="get_euler" qualifiers="const">
<return type="Vector3" />
<param index="0" name="order" type="int" default="2" />
<description>
Returns the basis's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, by default it uses the YXZ convention: when decomposing, first Z, then X, and Y last. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle).
Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles.
Returns this basis's rotation as a [Vector3] of [url=https://en.wikipedia.org/wiki/Euler_angles]Euler angles[/url], in radians.
- The [member Vector3.x] contains the angle around the [member x] axis (pitch);
- The [member Vector3.y] contains the angle around the [member y] axis (yaw);
- The [member Vector3.z] contains the angle around the [member z] axis (roll).
The order of each consecutive rotation can be changed with [param order] (see [enum EulerOrder] constants). By default, the YXZ convention is used ([constant EULER_ORDER_YXZ]): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method [method from_euler], this order is reversed.
[b]Note:[/b] Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion].
[b]Note:[/b] In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the [member Node3D.rotation] property.
</description>
</method>
<method name="get_rotation_quaternion" qualifiers="const">
<return type="Quaternion" />
<description>
Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles.
Returns this basis's rotation as a [Quaternion].
[b]Note:[/b] Quatenions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the [method get_euler] method, which returns Euler angles.
</description>
</method>
<method name="get_scale" qualifiers="const">
<return type="Vector3" />
<description>
Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis.
Returns the length of each axis of this basis, as a [Vector3]. If the basis is not sheared, this is the scaling factor. It is not affected by rotation.
[codeblocks]
[gdscript]
var my_basis = Basis(
Vector3(2, 0, 0),
Vector3(0, 4, 0),
Vector3(0, 0, 8)
)
# Rotating the Basis in any way preserves its scale.
my_basis = my_basis.rotated(Vector3.UP, TAU / 2)
my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4)
print(my_basis.get_scale()) # Prints (2, 4, 8).
[/gdscript]
[csharp]
var myBasis = new Basis(
Vector3(2.0f, 0.0f, 0.0f),
Vector3(0.0f, 4.0f, 0.0f),
Vector3(0.0f, 0.0f, 8.0f)
);
// Rotating the Basis in any way preserves its scale.
myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f);
myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f);
GD.Print(myBasis.Scale); // Prints (2, 4, 8).
[/csharp]
[/codeblocks]
[b]Note:[/b] If the value returned by [method determinant] is negative, the scale is also negative.
</description>
</method>
<method name="inverse" qualifiers="const">
<return type="Basis" />
<description>
Returns the inverse of the matrix.
Returns the [url=https://en.wikipedia.org/wiki/Invertible_matrix]inverse of this basis's matrix[/url].
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@ -125,15 +199,35 @@
<param index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" />
<param index="2" name="use_model_front" type="bool" default="false" />
<description>
Creates a Basis with a rotation such that the forward axis (-Z) points towards the [param target] position.
The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [param target] and [param up] vectors cannot be zero, and cannot be parallel to each other.
If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position. By default, the -Z axis (camera forward) is treated as forward (implies +X is right).
Creates a new [Basis] with a rotation such that the forward axis (-Z) points towards the [param target] position.
By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If [param use_model_front] is [code]true[/code], the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the [param target] position.
The up axis (+Y) points as close to the [param up] vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see [method orthonormalized]). The [param target] and [param up] vectors cannot be [constant Vector3.ZERO], and cannot be parallel to each other.
</description>
</method>
<method name="orthonormalized" qualifiers="const">
<return type="Basis" />
<description>
Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix.
Returns the orthonormalized version of this basis. An orthonormal basis is both [i]orthogonal[/i] (the axes are perpendicular to each other) and [i]normalized[/i] (the axes have a length of [code]1[/code]), which also means it can only represent rotation.
It is often useful to call this method to avoid rounding errors on a rotating basis:
[codeblocks]
[gdscript]
# Rotate this Node3D every frame.
func _process(delta):
basis = basis.rotated(Vector3.UP, TAU * delta)
basis = basis.rotated(Vector3.RIGHT, TAU * delta)
basis = basis.orthonormalized()
[/gdscript]
[csharp]
// Rotate this Node3D every frame.
public override void _Process(double delta)
{
Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta)
.Rotated(Vector3.Right, Mathf.Tau * (float)delta)
.Orthonormalized();
}
[/csharp]
[/codeblocks]
</description>
</method>
<method name="rotated" qualifiers="const">
@ -141,14 +235,60 @@
<param index="0" name="axis" type="Vector3" />
<param index="1" name="angle" type="float" />
<description>
Introduce an additional rotation around the given axis by [param angle] (in radians). The axis must be a normalized vector.
Returns this basis rotated around the given [param axis] by [param angle] (in radians). The [param axis] must be a normalized vector (see [method Vector3.normalized]).
Positive values rotate this basis clockwise around the axis, while negative values rotate it counterclockwise.
[codeblocks]
[gdscript]
var my_basis = Basis.IDENTITY
var angle = TAU / 2
my_basis = my_basis.rotated(Vector3.UP, angle) # Rotate around the up axis (yaw).
my_basis = my_basis.rotated(Vector3.RIGHT, angle) # Rotate around the right axis (pitch).
my_basis = my_basis.rotated(Vector3.BACK, angle) # Rotate around the back axis (roll).
[/gdscript]
[csharp]
var myBasis = Basis.Identity;
var angle = Mathf.Tau / 2.0f;
myBasis = myBasis.Rotated(Vector3.Up, angle); // Rotate around the up axis (yaw).
myBasis = myBasis.Rotated(Vector3.Right, angle); // Rotate around the right axis (pitch).
myBasis = myBasis.Rotated(Vector3.Back, angle); // Rotate around the back axis (roll).
[/csharp]
[/codeblocks]
</description>
</method>
<method name="scaled" qualifiers="const">
<return type="Basis" />
<param index="0" name="scale" type="Vector3" />
<description>
Introduce an additional scaling specified by the given 3D scaling factor.
Returns this basis with each axis's components scaled by the given [param scale]'s components.
The basis matrix's rows are multiplied by [param scale]'s components. This operation is a global scale (relative to the parent).
[codeblocks]
[gdscript]
var my_basis = Basis(
Vector3(1, 1, 1),
Vector3(2, 2, 2),
Vector3(3, 3, 3)
)
my_basis = my_basis.scaled(Vector3(0, 2, -2))
print(my_basis.x) # Prints (0, 2, -2).
print(my_basis.y) # Prints (0, 4, -4).
print(my_basis.z) # Prints (0, 6, -6).
[/gdscript]
[csharp]
var myBasis = new Basis(
new Vector3(1.0f, 1.0f, 1.0f),
new Vector3(2.0f, 2.0f, 2.0f),
new Vector3(3.0f, 3.0f, 3.0f)
);
myBasis = myBasis.Scaled(new Vector3(0.0f, 2.0f, -2.0f));
GD.Print(myBasis.X); // Prints (0, 2, -2).
GD.Print(myBasis.Y); // Prints (0, 4, -4).
GD.Print(myBasis.Z); // Prints (0, 6, -6).
[/csharp]
[/codeblocks]
</description>
</method>
<method name="slerp" qualifiers="const">
@ -156,61 +296,122 @@
<param index="0" name="to" type="Basis" />
<param index="1" name="weight" type="float" />
<description>
Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix.
Performs a spherical-linear interpolation with the [param to] basis, given a [param weight]. Both this basis and [param to] should represent a rotation.
[b]Example:[/b] Smoothly rotate a [Node3D] to the target basis over time, with a [Tween].
[codeblock]
var start_basis = Basis.IDENTITY
var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2)
func _ready():
create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO)
func interpolate(weight):
basis = start_basis.slerp(target_basis, weight)
[/codeblock]
</description>
</method>
<method name="tdotx" qualifiers="const">
<return type="float" />
<param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the X axis of the matrix.
Returns the transposed dot product between [param with] and the [member x] axis (see [method transposed]).
This is equivalent to [code]basis.x.dot(vector)[/code].
</description>
</method>
<method name="tdoty" qualifiers="const">
<return type="float" />
<param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Y axis of the matrix.
Returns the transposed dot product between [param with] and the [member y] axis (see [method transposed]).
This is equivalent to [code]basis.y.dot(vector)[/code].
</description>
</method>
<method name="tdotz" qualifiers="const">
<return type="float" />
<param index="0" name="with" type="Vector3" />
<description>
Transposed dot product with the Z axis of the matrix.
Returns the transposed dot product between [param with] and the [member z] axis (see [method transposed]).
This is equivalent to [code]basis.z.dot(vector)[/code].
</description>
</method>
<method name="transposed" qualifiers="const">
<return type="Basis" />
<description>
Returns the transposed version of the matrix.
Returns the transposed version of this basis. This turns the basis matrix's columns into rows, and its rows into columns.
[codeblocks]
[gdscript]
var my_basis = Basis(
Vector3(1, 2, 3),
Vector3(4, 5, 6),
Vector3(7, 8, 9)
)
my_basis = my_basis.transposed()
print(my_basis.x) # Prints (1, 4, 7).
print(my_basis.y) # Prints (2, 5, 8).
print(my_basis.z) # Prints (3, 6, 9).
[/gdscript]
[csharp]
var myBasis = new Basis(
new Vector3(1.0f, 2.0f, 3.0f),
new Vector3(4.0f, 5.0f, 6.0f),
new Vector3(7.0f, 8.0f, 9.0f)
);
myBasis = myBasis.Transposed();
GD.Print(myBasis.X); // Prints (1, 4, 7).
GD.Print(myBasis.Y); // Prints (2, 5, 8).
GD.Print(myBasis.Z); // Prints (3, 6, 9).
[/csharp]
[/codeblocks]
</description>
</method>
</methods>
<members>
<member name="x" type="Vector3" setter="" getter="" default="Vector3(1, 0, 0)">
The basis matrix's X vector (column 0). Equivalent to array index [code]0[/code].
The basis's X axis, and the column [code]0[/code] of the matrix.
On the identity basis, this vector points right ([constant Vector3.RIGHT]).
</member>
<member name="y" type="Vector3" setter="" getter="" default="Vector3(0, 1, 0)">
The basis matrix's Y vector (column 1). Equivalent to array index [code]1[/code].
The basis's Y axis, and the column [code]1[/code] of the matrix.
On the identity basis, this vector points up ([constant Vector3.UP]).
</member>
<member name="z" type="Vector3" setter="" getter="" default="Vector3(0, 0, 1)">
The basis matrix's Z vector (column 2). Equivalent to array index [code]2[/code].
The basis's Z axis, and the column [code]2[/code] of the matrix.
On the identity basis, this vector points back ([constant Vector3.BACK]).
</member>
</members>
<constants>
<constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
The identity basis, with no rotation or scaling applied.
This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
The identity basis. This is a basis with no rotation, no shear, and its scale being [code]1[/code]. This means that:
- The [member x] points right ([constant Vector3.RIGHT]);
- The [member y] points up ([constant Vector3.UP]);
- The [member z] points back ([constant Vector3.BACK]).
[codeblock]
var basis := Basis.IDENTITY
print("| X | Y | Z")
print("| %s | %s | %s" % [basis.x.x, basis.y.x, basis.z.x])
print("| %s | %s | %s" % [basis.x.y, basis.y.y, basis.z.y])
print("| %s | %s | %s" % [basis.x.z, basis.y.z, basis.z.z])
# Prints:
# | X | Y | Z
# | 1 | 0 | 0
# | 0 | 1 | 0
# | 0 | 0 | 1
[/codeblock]
This is identical to creating [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
</constant>
<constant name="FLIP_X" value="Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)">
The basis that will flip something along the X axis when used in a transformation.
When any basis is multiplied by [constant FLIP_X], it negates all components of the [member x] axis (the X column).
When [constant FLIP_X] is multiplied by any basis, it negates the [member Vector3.x] component of all axes (the X row).
</constant>
<constant name="FLIP_Y" value="Basis(1, 0, 0, 0, -1, 0, 0, 0, 1)">
The basis that will flip something along the Y axis when used in a transformation.
When any basis is multiplied by [constant FLIP_Y], it negates all components of the [member y] axis (the Y column).
When [constant FLIP_Y] is multiplied by any basis, it negates the [member Vector3.y] component of all axes (the Y row).
</constant>
<constant name="FLIP_Z" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, -1)">
The basis that will flip something along the Z axis when used in a transformation.
When any basis is multiplied by [constant FLIP_Z], it negates all components of the [member z] axis (the Z column).
When [constant FLIP_Z] is multiplied by any basis, it negates the [member Vector3.z] component of all axes (the Z row).
</constant>
</constants>
<operators>
@ -218,7 +419,7 @@
<return type="bool" />
<param index="0" name="right" type="Basis" />
<description>
Returns [code]true[/code] if the [Basis] matrices are not equal.
Returns [code]true[/code] if the components of both [Basis] matrices are not equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
@ -226,35 +427,46 @@
<return type="Basis" />
<param index="0" name="right" type="Basis" />
<description>
Composes these two basis matrices by multiplying them together. This has the effect of transforming the second basis (the child) by the first basis (the parent).
Transforms (multiplies) the [param right] basis by this basis.
This is the operation performed between parent and child [Node3D]s.
</description>
</operator>
<operator name="operator *">
<return type="Vector3" />
<param index="0" name="right" type="Vector3" />
<description>
Transforms (multiplies) the [Vector3] by the given [Basis] matrix.
Transforms (multiplies) the [param right] vector by this basis, returning a [Vector3].
[codeblocks]
[gdscript]
var my_basis = Basis(Vector3(1, 1, 1), Vector3(1, 1, 1), Vector3(0, 2, 5))
print(my_basis * Vector3(1, 2, 3)) # Prints (7, 3, 16)
[/gdscript]
[csharp]
var myBasis = new Basis(new Vector3(1, 1, 1), new Vector3(1, 1, 1), new Vector3(0, 2, 5));
GD.Print(my_basis * new Vector3(1, 2, 3)); // Prints (7, 3, 16)
[/csharp]
[/codeblocks]
</description>
</operator>
<operator name="operator *">
<return type="Basis" />
<param index="0" name="right" type="float" />
<description>
This operator multiplies all components of the [Basis], which scales it uniformly.
Multiplies all components of the [Basis] by the given [float]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.
</description>
</operator>
<operator name="operator *">
<return type="Basis" />
<param index="0" name="right" type="int" />
<description>
This operator multiplies all components of the [Basis], which scales it uniformly.
Multiplies all components of the [Basis] by the given [int]. This affects the basis's scale uniformly, resizing all 3 axes by the [param right] value.
</description>
</operator>
<operator name="operator ==">
<return type="bool" />
<param index="0" name="right" type="Basis" />
<description>
Returns [code]true[/code] if the [Basis] matrices are exactly equal.
Returns [code]true[/code] if the components of both [Basis] matrices are exactly equal.
[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
</description>
</operator>
@ -262,7 +474,8 @@
<return type="Vector3" />
<param index="0" name="index" type="int" />
<description>
Access basis components using their index. [code]b[0][/code] is equivalent to [code]b.x[/code], [code]b[1][/code] is equivalent to [code]b.y[/code], and [code]b[2][/code] is equivalent to [code]b.z[/code].
Accesses each axis (column) of this basis by their index. Index [code]0[/code] is the same as [member x], index [code]1[/code] is the same as [member y], and index [code]2[/code] is the same as [member z].
[b]Note:[/b] In C++, this operator accesses the rows of the basis matrix, [i]not[/i] the columns. For the same behavior as scripting languages, use the [code]set_column[/code] and [code]get_column[/code] methods.
</description>
</operator>
</operators>

View File

@ -15,7 +15,7 @@
<method name="apply_rest">
<return type="void" />
<description>
Stores the node's current transforms in [member rest].
Resets the bone to the rest pose. This is equivalent to setting [member Node2D.transform] to [member rest].
</description>
</method>
<method name="get_autocalculate_length_and_angle" qualifiers="const">

View File

@ -39,7 +39,7 @@
<return type="void" />
<param index="0" name="use_external_skeleton" type="bool" />
<description>
Sets whether the BoneAttachment3D node will use an extenral [Skeleton3D] node rather than attenpting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton].
Sets whether the BoneAttachment3D node will use an external [Skeleton3D] node rather than attempting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton].
</description>
</method>
</methods>

View File

@ -8,6 +8,7 @@
See [OccluderInstance3D]'s documentation for instructions on setting up occlusion culling.
</description>
<tutorials>
<link title="Occlusion culling">$DOCS_URL/tutorials/3d/occlusion_culling.html</link>
</tutorials>
<members>
<member name="size" type="Vector3" setter="set_size" getter="get_size" default="Vector3(1, 1, 1)">

View File

@ -290,7 +290,7 @@
Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
</constant>
<constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter">
Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties.

View File

@ -8,6 +8,7 @@
See also [GPUParticles3D], which provides the same functionality with hardware acceleration, but may not run on older devices.
</description>
<tutorials>
<link title="Particle systems (3D)">$DOCS_URL/tutorials/3d/particles/index.html</link>
</tutorials>
<methods>
<method name="convert_from_particles">
@ -314,7 +315,7 @@
Particles are drawn in the order emitted.
</constant>
<constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder">
Particles are drawn in order of remaining lifetime.
Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front.
</constant>
<constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder">
Particles are drawn in order of depth.

View File

@ -113,6 +113,7 @@
func _ready():
grab_focus.call_deferred()
[/codeblock]
[b]Note:[/b] Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly.
See also [method Object.call_deferred].
</description>
</method>
@ -138,7 +139,7 @@
<method name="get_method" qualifiers="const">
<return type="StringName" />
<description>
Returns the name of the method represented by this [Callable]. If the callable is a lambda function, returns the function's name.
Returns the name of the method represented by this [Callable]. If the callable is a GDScript lambda function, returns the function's name or [code]"&lt;anonymous lambda&gt;"[/code].
</description>
</method>
<method name="get_object" qualifiers="const">

View File

@ -17,6 +17,12 @@
If this is the current camera, remove it from being current. If [param enable_next] is [code]true[/code], request to make the next camera current, if any.
</description>
</method>
<method name="get_camera_projection" qualifiers="const">
<return type="Projection" />
<description>
Returns the projection matrix that this camera uses to render to its associated viewport. The camera must be part of the scene tree to function.
</description>
</method>
<method name="get_camera_rid" qualifiers="const">
<return type="RID" />
<description>
@ -52,7 +58,7 @@
<return type="bool" />
<param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
[b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view.
</description>
</method>
@ -60,7 +66,7 @@
<return type="bool" />
<param index="0" name="world_point" type="Vector3" />
<description>
Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods.
</description>
</method>
<method name="make_current">

View File

@ -10,6 +10,7 @@
[b]Note:[/b] Depth of field blur is only supported in the Forward+ and Mobile rendering methods, not Compatibility.
</description>
<tutorials>
<link title="Physical light and camera units">$DOCS_URL/tutorials/3d/physical_light_and_camera_units.html</link>
</tutorials>
<methods>
<method name="get_fov" qualifiers="const">
@ -31,7 +32,7 @@
Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled.
</member>
<member name="exposure_shutter_speed" type="float" setter="set_shutter_speed" getter="get_shutter_speed" default="100.0">
Time for shutter to open and close, measured in seconds. A higher value will let in more light leading to a brighter image, while a lower amount will let in less light leading to a darker image.
Time for shutter to open and close, evaluated as [code]1 / shutter_speed[/code] seconds. A higher value will allow less light (leading to a darker image), while a lower value will allow more light (leading to a brighter image).
Only available when [member ProjectSettings.rendering/lights_and_shadows/use_physical_light_units] is enabled.
</member>
<member name="frustum_far" type="float" setter="set_far" getter="get_far" default="4000.0">

View File

@ -522,7 +522,7 @@
<return type="void" />
<description>
Moves this node to display on top of its siblings.
Internally, the node is moved to the bottom of parent's children list. The method has no effect on nodes without a parent.
Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent.
</description>
</method>
<method name="queue_redraw">
@ -562,7 +562,7 @@
</methods>
<members>
<member name="clip_children" type="int" setter="set_clip_children_mode" getter="get_clip_children_mode" enum="CanvasItem.ClipChildrenMode" default="0">
Allows the current node to clip children nodes, essentially acting as a mask.
Allows the current node to clip child nodes, essentially acting as a mask.
</member>
<member name="light_mask" type="int" setter="set_light_mask" getter="get_light_mask" default="1">
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
@ -660,24 +660,26 @@
The [CanvasItem] will inherit the filter from its parent.
</constant>
<constant name="TEXTURE_FILTER_NEAREST" value="1" enum="TextureFilter">
The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering. Useful for pixel art.
The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
</constant>
<constant name="TEXTURE_FILTER_LINEAR" value="2" enum="TextureFilter">
The texture filter blends between the nearest four pixels. Use this for most cases where you want to avoid a pixelated style.
The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS" value="3" enum="TextureFilter">
The texture filter reads from the nearest pixel in the nearest mipmap. This is the fastest way to read from textures with mipmaps.
The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look pixelated from up close, and smooth from a distance.
Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS" value="4" enum="TextureFilter">
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps. Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]). This makes the texture look smooth from up close, and smooth from a distance.
Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to [Camera2D] zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
</constant>
<constant name="TEXTURE_FILTER_NEAREST_WITH_MIPMAPS_ANISOTROPIC" value="5" enum="TextureFilter">
The texture filter reads from the nearest pixel, but selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate.
The texture filter reads from the nearest pixel and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on the angle between the surface and the camera view. This makes the texture look pixelated from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_NEAREST_WITH_MIPMAPS] is usually more appropriate in this case.
</constant>
<constant name="TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC" value="6" enum="TextureFilter">
The texture filter blends between the nearest 4 pixels and selects a mipmap based on the angle between the surface and the camera view. This reduces artifacts on surfaces that are almost in line with the camera. This is the slowest of the filtering options, but results in the highest quality texturing. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate.
The texture filter blends between the nearest 4 pixels and blends between 2 mipmaps (or uses the nearest mipmap if [member ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter] is [code]true[/code]) based on the angle between the surface and the camera view. This makes the texture look smooth from up close, and smooth from a distance. Anisotropic filtering improves texture quality on surfaces that are almost in line with the camera, but is slightly slower. The anisotropic filtering level can be changed by adjusting [member ProjectSettings.rendering/textures/default_filters/anisotropic_filtering_level].
[b]Note:[/b] This texture filter is rarely useful in 2D projects. [constant TEXTURE_FILTER_LINEAR_WITH_MIPMAPS] is usually more appropriate in this case.
</constant>
<constant name="TEXTURE_FILTER_MAX" value="7" enum="TextureFilter">
Represents the size of the [enum TextureFilter] enum.

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
A node that provides a thickened polygon shape (a prism) to a [CollisionObject2D] parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an [Area2D] or turn [PhysicsBody2D] into a solid object.
[b]Warning:[/b] A non-uniformly scaled [CollisionShape3D] will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead.
[b]Warning:[/b] A non-uniformly scaled [CollisionShape2D] will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead.
</description>
<tutorials>
</tutorials>
@ -25,6 +25,7 @@
</member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
The polygon's list of vertices. Each point will be connected to the next, and the final point will be connected to the first.
[b]Note:[/b] The returned vertices are in the local coordinate space of the given [CollisionPolygon2D].
[b]Warning:[/b] The returned value is a clone of the [PackedVector2Array], not a reference.
</member>
</members>

View File

@ -4,10 +4,10 @@
A color represented in RGBA format.
</brief_description>
<description>
A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 16-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.
A color represented in RGBA format by a red ([member r]), green ([member g]), blue ([member b]), and alpha ([member a]) component. Each component is a 32-bit floating-point value, usually ranging from [code]0.0[/code] to [code]1.0[/code]. Some properties (such as [member CanvasItem.modulate]) may support values greater than [code]1.0[/code], for overbright or HDR (High Dynamic Range) colors.
Colors can be created in various ways: By the various [Color] constructors, by static methods such as [method from_hsv], and by using a name from the set of standardized colors based on [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url] with the addition of [constant TRANSPARENT]. GDScript also provides [method @GDScript.Color8], which uses integers from [code]0[/code] to [code]255[/code] and doesn't support overbright colors.
[b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it is equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code].
[url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url]
[url=https://raw.githubusercontent.com/godotengine/godot-docs/4.1/img/color_constants.png]Color constants cheatsheet[/url]
</description>
<tutorials>
<link title="2D GD Paint Demo">https://godotengine.org/asset-library/asset/517</link>

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
A 2D polyline shape, intended for use in physics. Used internally in [CollisionPolygon2D] when it's in [code]BUILD_SEGMENTS[/code] mode.
Being just a collection of interconnected line segments, [ConcavePolygonShape2D] is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, [ConvexPolygonShape2D] is [i]hollow[/i] even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection.
Being just a collection of interconnected line segments, [ConcavePolygonShape2D] is the most freely configurable single 2D shape. It can be used to form polygons of any nature, or even shapes that don't enclose an area. However, [ConcavePolygonShape2D] is [i]hollow[/i] even if the interconnected line segments do enclose an area, which often makes it unsuitable for physics or detection.
[b]Note:[/b] When used for collision, [ConcavePolygonShape2D] is intended to work with static [CollisionShape2D] nodes like [StaticBody2D] and will likely not behave well for [CharacterBody2D]s or [RigidBody2D]s in a mode other than Static.
[b]Warning:[/b] Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. [ConcavePolygonShape2D] is hollow, so it won't detect a collision.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest 2D collision shape to check collisions against. Its use should generally be limited to level geometry. If the polyline is closed, [CollisionPolygon2D]'s [code]BUILD_SOLIDS[/code] mode can be used, which decomposes the polygon into convex ones; see [ConvexPolygonShape2D]'s documentation for instructions.

View File

@ -5,7 +5,7 @@
</brief_description>
<description>
A 3D trimesh shape, intended for use in physics. Usually used to provide a shape for a [CollisionShape3D].
Being just a collection of interconnected triangles, [ConcavePolygonShape3D] is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, [ConvexPolygonShape3D] is [i]hollow[/i] even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.
Being just a collection of interconnected triangles, [ConcavePolygonShape3D] is the most freely configurable single 3D shape. It can be used to form polyhedra of any nature, or even shapes that don't enclose a volume. However, [ConcavePolygonShape3D] is [i]hollow[/i] even if the interconnected triangles do enclose a volume, which often makes it unsuitable for physics or detection.
[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [CollisionShape3D] nodes like [StaticBody3D] and will likely not behave well for [CharacterBody3D]s or [RigidBody3D]s in a mode other than Static.
[b]Warning:[/b] Physics bodies that are small have a chance to clip through this shape when moving fast. This happens because on one frame, the physics body may be on the "outside" of the shape, and on the next frame it may be "inside" it. [ConcavePolygonShape3D] is hollow, so it won't detect a collision.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest 3D collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, [ConvexPolygonShape3D] should be used. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape3D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape3D]'s documentation for instructions.

View File

@ -19,6 +19,7 @@
<link title="GUI documentation index">$DOCS_URL/tutorials/ui/index.html</link>
<link title="Custom drawing in 2D">$DOCS_URL/tutorials/2d/custom_drawing_in_2d.html</link>
<link title="Control node gallery">$DOCS_URL/tutorials/ui/control_node_gallery.html</link>
<link title="Multiple resolutions">$DOCS_URL/tutorials/rendering/multiple_resolutions.html</link>
<link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link>
</tutorials>
<methods>
@ -1160,10 +1161,12 @@
[b]Note:[/b] As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree.
</constant>
<constant name="NOTIFICATION_SCROLL_BEGIN" value="47">
Sent when this node is inside a [ScrollContainer] which has begun being scrolled.
Sent when this node is inside a [ScrollContainer] which has begun being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events.
[b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.
</constant>
<constant name="NOTIFICATION_SCROLL_END" value="48">
Sent when this node is inside a [ScrollContainer] which has stopped being scrolled.
Sent when this node is inside a [ScrollContainer] which has stopped being scrolled when dragging the scrollable area [i]with a touch event[/i]. This notification is [i]not[/i] sent when scrolling by dragging the scrollbar, scrolling with the mouse wheel or scrolling with keyboard/gamepad events.
[b]Note:[/b] This signal is only emitted on Android or iOS, or on desktop/web platforms when [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is enabled.
</constant>
<constant name="NOTIFICATION_LAYOUT_DIRECTION_CHANGED" value="49">
Sent when control layout direction is changed.

View File

@ -6,7 +6,7 @@
<description>
A 2D convex polygon shape, intended for use in physics. Used internally in [CollisionPolygon2D] when it's in [code]BUILD_SOLIDS[/code] mode.
[ConvexPolygonShape2D] is [i]solid[/i], which means it detects collisions from objects that are fully inside it, unlike [ConcavePolygonShape2D] which is hollow. This makes it more suitable for both detection and physics.
[b]Convex decomposition:[/b] A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several [ConvexPolygonShape3D] nodes or by using the [CollisionPolygon2D] node in [code]BUILD_SOLIDS[/code] mode. To generate a collision polygon from a sprite, select the [Sprite2D] node, go to the [b]Sprite2D[/b] menu that appears above the viewport, and choose [b]Create Polygon2D Sibling[/b].
[b]Convex decomposition:[/b] A concave polygon can be split up into several convex polygons. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several [ConvexPolygonShape2D] nodes or by using the [CollisionPolygon2D] node in [code]BUILD_SOLIDS[/code] mode. To generate a collision polygon from a sprite, select the [Sprite2D] node, go to the [b]Sprite2D[/b] menu that appears above the viewport, and choose [b]Create Polygon2D Sibling[/b].
[b]Performance:[/b] [ConvexPolygonShape2D] is faster to check collisions against compared to [ConcavePolygonShape2D], but it is slower than primitive collision shapes such as [CircleShape2D] and [RectangleShape2D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes.
</description>
<tutorials>

Some files were not shown because too many files have changed in this diff Show More