Compare commits

...

483 Commits

Author SHA1 Message Date
Rémi Verschelde
5222a99f5d Bump version to 4.0.3-stable 2023-05-19 08:58:15 +02:00
Rémi Verschelde
acc82a1d05 i18n: Sync translations with Weblate 2023-05-19 08:55:54 +02:00
Rémi Verschelde
138882742a Merge pull request #77202 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 5th batch
2023-05-19 08:40:25 +02:00
Yuri Sizov
5fe254e8f6 Update the changelog for 4.0.3 2023-05-18 21:48:37 +02:00
Yuri Sizov
eced93a3f5 Revert "Improve the UX of ViewportTexture in the editor"
This reverts commit b91b8fce43.
2023-05-18 21:46:40 +02:00
Ninni Pipping
589306a9d8 Make TouchScreenButton connections reference counted
Prevents errors when assigning the same texture to both slots

(cherry picked from commit 0648cc65b2)
2023-05-18 21:46:39 +02:00
Fabio Alessandrelli
238b8357a3 [TLS] Fix crashes trying to use TLS when not available.
If no StreamPeerTLS implementation is available, HTTPClient and
WebSocketPeer will now correctly refuse to connect using TLS returning
ERR_UNAVAILABLE.

Similarly, ENetConnection will refuse to setup DTLS when PacketPeerDTLS
is not available.

(cherry picked from commit eeac6f8c7f)
2023-05-18 19:22:23 +02:00
kobewi
7d5d5b7bd1 Fix crash when trying to create bones from Control
(cherry picked from commit 6a120107b3)
2023-05-18 19:22:23 +02:00
voidshine
9a88b47cb1 Document MIDI zero velocity quirk
(cherry picked from commit 06d02928b7)
2023-05-18 19:22:23 +02:00
Max Hilbrunner
7f0d8bcade Docs: Point to @GDScript in GDscript (script impl)
(cherry picked from commit ad21fb0f92)
2023-05-18 19:22:23 +02:00
Alex Drozd
3e8f0b4b75 Exclude overriden properties from Property Descriptions section
(cherry picked from commit 28f391f301)
2023-05-18 19:22:23 +02:00
kleonc
945d669da0 Fix property usage docs referring to removed network flag
(cherry picked from commit fc92ee6bf4)
2023-05-18 19:22:22 +02:00
Ninni Pipping
1f7a5f6144 Document limitations of placeholder textures
(cherry picked from commit bd2e377007)
2023-05-18 19:22:22 +02:00
VolTer
c37259b181 Add WorkerThreadPool documentation
(cherry picked from commit bd257092da)
2023-05-18 19:22:22 +02:00
Samuele Panzeri
912b3afb96 Fix skeleton 3d editor crash in RC3
Control notifies a theme changed before the editor has entered the tree

(cherry picked from commit a103cd76bb)
2023-05-18 19:22:22 +02:00
Yuri Sizov
fd8f38c240 Revert "Make EditorToaster's handler thread-safe"
This reverts commit 3a5bc7455e.
2023-05-18 19:22:22 +02:00
Yuri Sizov
60e8a06d4e Merge pull request #77204 from akien-mga/4.0-ci-base-branch
[4.0] CI: Change GODOT_BASE_BRANCH to 4.0, checkout that branch for godot-cpp
2023-05-18 19:20:59 +02:00
Rémi Verschelde
2a5d5ef1f9 CI: Change GODOT_BASE_BRANCH to 4.0, checkout that branch for godot-cpp 2023-05-18 17:44:31 +02:00
Rémi Verschelde
2ac4e3bb30 Merge pull request #76998 from akien-mga/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 4th batch
2023-05-12 15:08:03 +02:00
Rémi Verschelde
fa8b32cbd4 Update changelog for 4.0.3 2023-05-12 14:16:20 +02:00
Rémi Verschelde
9cd9a07c27 i18n: Sync translations with Weblate 2023-05-12 14:14:05 +02:00
Rémi Verschelde
576ca44762 Linux: Don't use udev for joypad hotloading when running in a sandbox
udev doesn't work in sandboxes, notably the new Steam container runtime
as found notably on the Steam Deck, and in Flatpak/Snap packages.

Like SDL does, when we detect such a containerized environment, we fall
back to parsing `/dev/input` directly.
See smcv's comments in #76879 for details.

Fixes #76879.

(cherry picked from commit 788cb74cc6)
2023-05-12 14:14:05 +02:00
kobewi
ab2c3712e2 Add mono audio support to WASAPI
(cherry picked from commit 8d010b44c1)
2023-05-12 14:14:04 +02:00
Martin Boué
fe126359f0 Fix include text when excluding resources to export
(cherry picked from commit 886e73683d)
2023-05-12 13:56:49 +02:00
Nong Van Tinh
aa23e6fc5e Fixes Node arrays appear as Object arrays in the inspector
(cherry picked from commit 3ebf2264aa)
2023-05-12 13:56:49 +02:00
Rémi Verschelde
4d7336e70f CI: Skip codespell check if CHANGED_FILES is empty
This can happen when only thirdparty files are changed, since we grep them out.
Re-add `bin` and `thirdparty` to the skip list for good measure.

(cherry picked from commit c7a5ce656c)
2023-05-12 13:56:49 +02:00
Rémi Verschelde
9deaac5c60 CI: Use gh-cli for changed files, and workaround codespell skip list bug
For PRs, this should give a more accurate list, as the previous method would
diff to the tip of the `master` branch, which could include new commits (and
thus changed files) not present in the PR branch.

codespell's `--skip` option doesn't work at all with folders when used
together with an explicit list of paths to work with, so let's not use it.

(cherry picked from commit b3bb92ae5e)
2023-05-12 13:56:49 +02:00
Rémi Verschelde
47b3f95874 CI: Make codespell checks blocking, but only check changed files
(cherry picked from commit b226f7e587)
2023-05-12 13:56:49 +02:00
Ninni Pipping
f93a4287cf Enable shadow warnings and fix raised errors
(cherry picked from commit 71ee65dc57)
2023-05-12 13:56:48 +02:00
Alex Drozd
09c5a8fe49 adjusting step size for fastnoise frequency hint
(cherry picked from commit 2b053e4e4c)
2023-05-12 12:31:59 +02:00
Hugo Locurcio
7d0af7d10f Document high performance cost of turbulence in ParticleProcessMaterial
- Mention that GPUParticlesAttractorVectorField3D can be used as an
  alternative to turbulence in 3D.

(cherry picked from commit f10759489d)
2023-05-12 12:31:58 +02:00
Manik Sharma
f6ed43b7d3 Make environment energy adjustable as a float in 3D editor's preview environment
(cherry picked from commit 3ce0ebb242)
2023-05-12 12:31:24 +02:00
Rémi Verschelde
52c314501c doctest: Update to 2.4.11
(cherry picked from commit 3091c6e9e9)
2023-05-12 12:31:24 +02:00
Rémi Verschelde
30b1c7fc1f astcenc: Update to 4.4.0
> The 4.4.0 release is a minor release with image quality improvements,
> a small performance boost, a few new quality-of-life features, and a
> few minor fixes for uncommon build configurations.

https://github.com/ARM-software/astc-encoder/releases/tag/4.4.0
(cherry picked from commit 5a3f955e05)
2023-05-12 12:31:24 +02:00
Rémi Verschelde
a227de0898 basis_universal: Update to 1.16.4
Almost no change in practice since the previous commit we tracked,
but now this is a tagged release.

(cherry picked from commit 0ff337d20f)
2023-05-12 12:31:24 +02:00
Rémi Verschelde
dfba9ad739 certs: Sync with Mozilla bundle as of Mar 23, 2023
8bcd1092d2
(cherry picked from commit d1c59b47e4)
2023-05-12 12:31:23 +02:00
Aaron Franke
161f389f93 Rename the Debugger's stack debug section to Stack Trace
(cherry picked from commit 74361b3d50)
2023-05-12 12:31:23 +02:00
Martin Capitanio
9e11b78d1c Update ThorVG to v0.9.0
https://github.com/thorvg/thorvg/releases/tag/v0.9.0
Fixes #72478

(cherry picked from commit 5db751832d)
2023-05-12 12:31:23 +02:00
Bram Stolk
ce0c61b6e3 Add missing initializations for Node3DEditor.
Do not try to format fields with garbage values in _snap_update()
Initialize grid_enable[] before use.
Initialize previewing_camera before use.
These are all cases found live, with valgrind.
Fixes #76925

(cherry picked from commit 4bc513edbc)
2023-05-12 12:31:23 +02:00
lawnjelly
efbb28d09a Make acos and asin safe
A common bug with using acos and asin is that input outside -1 to 1 range will result in Nan output. This can occur due to floating point error in the input.

The standard solution is to provide safe_acos function with clamped input. For Godot it may make more sense to make the standard functions safe.

(cherry picked from commit 50c5ed4876)
2023-05-12 12:31:23 +02:00
Rindbee
b91b8fce43 Improve the UX of ViewportTexture in the editor
The associated `ViewportTexture`s will update the `viewport_path`
in time when the `Viewport`'s nodepath is changed (caused by renaming
the node names or moving in the SceneTree dock).

If the target `Viewport` is changed by resetting the `viewport_path`,
the `ViewportTexture`s will be re-setup and emit `changed` signal in
time.

(cherry picked from commit af58f1e854)
2023-05-12 12:31:22 +02:00
kobewi
1146172b30 Prevent errors when using ViewportTexture
(cherry picked from commit 1b9802fa8c)
2023-05-12 12:31:22 +02:00
David Snopek
2a8501e1a2 Add missing documentation for MultiplayerPeerExtension
(cherry picked from commit 4d13be3c5e)
2023-05-12 12:31:22 +02:00
Samuele Panzeri
07128ccb9d Fix skeleton_3d & physical_bone_3d editor errors
(cherry picked from commit 679ff6da0e)
2023-05-12 12:31:22 +02:00
Patrick
9d9b7511a0 Fix Rotation Issue with NODE_POSITION_VIEW Visual Shader Node
(cherry picked from commit e35bbd76a3)
2023-05-12 12:31:22 +02:00
ChibiDenDen
bb785cfcc0 Fix gles3 rendering on android studio emulator
Use a temporary framebuffer for screen copy from rendertarget to screen.

This solves GLES3 rendering in android studio emulator (before this change there is just a black screen)

Based on discussion in:
https://github.com/godotengine/godot/issues/74828

(cherry picked from commit 5956aa1a6a)
2023-05-12 12:31:22 +02:00
Samuele Panzeri
cf0bd389cc Support long path in file access on windows
Changed windows file access file to check for path length and use the \\?\ long format when needed

(cherry picked from commit 59f04e16b8)
2023-05-12 12:31:22 +02:00
Alex Drozd
a37f79124f add venv and .venv to the .gitignore
(cherry picked from commit a6fda19e85)
2023-05-12 12:31:21 +02:00
Manik Sharma
31a37495f3 Make sun energy adjustable as a float in the 3D editor's preview sun
(cherry picked from commit 5e1cb39101)
2023-05-12 12:31:21 +02:00
smix8
3be6a1b38e Fix SurfaceTool::create_from_blend_shape()
Fixes SurfaceTool::create_from_blend_shape().

(cherry picked from commit 2dbc5d95eb)
2023-05-12 12:31:21 +02:00
ajreckof
a42f427465 fix a test for wrapf with signed 32-bit float
(cherry picked from commit fabd9535f0)
2023-05-12 12:31:21 +02:00
stmSi
25ab61f82a Added note to used set_deferred while setting scroll values in _ready function.
(cherry picked from commit 83626ab90d)
2023-05-12 12:31:21 +02:00
Александр Черник
b2364048d2 LSP: don't send empty completion command
(cherry picked from commit 5715d3eb59)
2023-05-12 12:31:21 +02:00
Hugo Locurcio
35fa05fa51 Document caveats related to exported project binary resource conversion
(cherry picked from commit febc674f48)
2023-05-12 12:31:21 +02:00
Lyuma
dcca6485d0 gltf: Permit sparse accessors without a bufferView.
(cherry picked from commit 72d131899b)
2023-05-12 12:31:21 +02:00
Hugo Locurcio
2d7228251d Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
This brings the overall class reference completion percentage from 87% to 92%.

(cherry picked from commit 5056c427d3)
2023-05-12 12:31:19 +02:00
Ninni Pipping
9a5af8e793 Clarify that event handling does not affect Input
(cherry picked from commit 732ad382a6)
2023-05-12 12:14:45 +02:00
Christopher Foo
28012c40fb Ensure WindowData minimized/maximized are mutually exclusive
The window manager can break the assumption that
fullscreen/maximized/minimized values are mutually exclusive.

(cherry picked from commit e4d052e284)
2023-05-12 12:14:30 +02:00
Omar Shehata
bab96e71d2 Fix double tap & drag on Android
(cherry picked from commit 0c94750642)
2023-05-12 12:14:14 +02:00
Fredia Huya-Kouadio
07af84689f Follow up to https://github.com/godotengine/godot/pull/76399 to fix input ANR in the Godot Android editor
(cherry picked from commit 367061cf9c)
2023-05-12 12:12:05 +02:00
Pedro J. Estébanez
d07d4d90d0 Allow concurrent buffering and dispatch of input events
(cherry picked from commit f369ed9223)
2023-05-12 12:11:58 +02:00
kleonc
4b11fc65f1 Make LocalVector respect its tight template parameter
(cherry picked from commit 0b944e1a68)
2023-05-12 12:11:41 +02:00
Michael Alexsander
b7206e25bf Improve some descriptions in the OS docs
(cherry picked from commit 6db12c5e50)
2023-05-12 12:11:23 +02:00
Ninni Pipping
5d93de88a8 Fix size error in BitMap.opaque_to_polygons
Previous estimate of upper limit on size was incorrect

(cherry picked from commit 249784ed53)
2023-05-12 12:10:50 +02:00
Pedro J. Estébanez
813fc0940d Allow creation of rendering buffers at any time
(cherry picked from commit d4c46f15ae)
2023-05-12 12:10:35 +02:00
kobewi
64b15c8ec1 Add info label to TileMap editor
(cherry picked from commit 979b53aba4)
2023-05-12 12:07:14 +02:00
Bastiaan Olij
3a90fa677b Fix incorrect HTC action map entries
(cherry picked from commit e15358dc67)
2023-05-12 12:07:02 +02:00
jmb462
f3b608d331 Fix regression with right click on main selection
(cherry picked from commit d59cdb8327)
2023-05-12 12:07:02 +02:00
Jean-Michel Bernard
53df7c18e0 Fix right click in selection of additional caret
(cherry picked from commit 5c06c030f2)
2023-05-12 12:07:02 +02:00
Aaron Franke
f49c69a1e7 Fix small mistake in docs, "antecedents" -> "ancestors"
(cherry picked from commit 740b0713a2)
2023-05-12 12:07:02 +02:00
VolTer
78c190f4f5 Add an example for how to use AudioStreamGenerator
(cherry picked from commit 9d77caaf95)
2023-05-12 12:07:02 +02:00
VolTer
e530168fb8 Document TextServerDummy
(cherry picked from commit c8e06fe838)
2023-05-12 12:07:02 +02:00
UltraBIF
4b63ce83d2 Fixed various typos across the docs
(cherry picked from commit 8106d33d0f)
2023-05-12 12:07:02 +02:00
David Turner
0566ac68de Explain why an image would be invalid for a texture
(cherry picked from commit 43a7cb093c)
2023-05-12 12:07:02 +02:00
mashumafi
0cb1fd3a61 Wait for navigation baking to finish before destruction
(cherry picked from commit a93a2e519d)
2023-05-12 12:07:01 +02:00
kobewi
d56c4f960c Remove erroneous signal connection
(cherry picked from commit 88ea3dd4db)
2023-05-12 12:07:01 +02:00
kobewi
19b998396c Close built-in shaders when closing scene
(cherry picked from commit aaf02ec04a)
2023-05-12 12:07:01 +02:00
Bastiaan Olij
a5cb7a5eb5 Expose viewports render targer RID
(cherry picked from commit ab60d3b65c)
2023-05-12 12:07:01 +02:00
kobewi
0277f57b6f Some clarifications on screen-space coordinates
(cherry picked from commit 33b9be27d3)
2023-05-12 12:07:01 +02:00
Pedro J. Estébanez
907b10fb96 Fix additional cases of breakage of rendering effects
(cherry picked from commit c58e50adcc)
2023-05-12 12:07:01 +02:00
clayjohn
2435c9426d Use proper UV in cubemap downsampler raster
This removes bias in cubemap downsampling shader that resulted in the bottom of cubemaps being over represented

(cherry picked from commit fb77021559)
2023-05-12 12:07:01 +02:00
Tetane
e68e2fad25 Use a SubViewport for CanvasItem inspector preview
(cherry picked from commit d3792a2373)
2023-05-12 12:07:00 +02:00
HolonProduction
a07ad181ab Preserve scene unique names when saving branch as scene.
(cherry picked from commit 7814dedc91)
2023-05-12 12:07:00 +02:00
VolTer
70f7fcd208 Light3D show scaling warning immediately
(cherry picked from commit 818d57b5b4)
2023-05-12 12:07:00 +02:00
Tefatika
b532dd7626 Fixed error messages when setting all_tab_in_front of TabContainer
Some signal handlers weren't unregistered when removing the wrapped
child TabBar, which resulted in errors printed when the TabBar was
removed and added again when the flag was updated

(cherry picked from commit abd894daf7)
2023-05-12 12:07:00 +02:00
Tefatika
e58001bd0d Command Palette search now also uses original English command names
Both localized and non localized names will be used while filtering

The highest score between the two will be picked when determining
the entries order

(cherry picked from commit 09460cfaaf)
2023-05-12 12:07:00 +02:00
clayjohn
9d257f10c0 Use DXT1 when compressing PNGs with RGB format
This results in much smaller file sizes with the same quality

(cherry picked from commit f84c6df8d1)
2023-05-12 12:07:00 +02:00
Lyuma
2a0597d0cb import: Fix Silhouette used incorrect index.
Fixes bind pose mistake from using i (mesh skin index) instead of bone_idx (skeleton bone index).
Fixes #76448

(cherry picked from commit d33a734ac5)
2023-05-12 12:07:00 +02:00
bruvzg
ebaf3cc9ab [iOS] Fix loading of GDExtension dylibs auto converted to framework.
(cherry picked from commit ad4d565ee7)
2023-05-12 12:06:59 +02:00
Justin Wash
268b60ddd6 Fix infinite loop in Build2DFaces::_find_edge_intersections
(cherry picked from commit 1ac2c537da)
2023-05-12 12:06:59 +02:00
K. S. Ernest (iFire) Lee
0c312c7a08 Fix CSG edge case causing intersection line to hit on common edge of 2 triangles.
The previous implementation assumed that the intersection entered or exited a
shape when it hit right on the common edge of 2 triangles. However, there is
also a case where it just "skirts" the other shape on the outside.

To fix this, we added code to check the intersection distance and if the
normals of the faces are pointed in the same direction as the intersection or
not (e.g. inner product > 0). This handles the case where the intersection
line hits the common edge of 2 triangles and skirts the other shape on the
outside.

Extended code to cover a third case.

Fixes #58637.

Co-authored-by: OldBelge <StevenGeens@users.noreply.github.com>
(cherry picked from commit eaa84bc682)
2023-05-12 12:06:59 +02:00
kobewi
c8d64e8580 Fix another collision shape editor crash
(cherry picked from commit 01c32dffaf)
2023-05-12 12:06:59 +02:00
kobewi
fdf66b3472 Fix CollisionShape2D editor crash
(cherry picked from commit e5d0bb1605)
2023-04-28 17:16:53 +02:00
Rémi Verschelde
2d74ee0e5b Update changelog for 4.0.3 2023-04-27 08:51:08 +02:00
George Marques
21bb5b9c0e GDScript: Don't fail when freed object is return
This is check is a bit too eager. The user should be able to handle the
return value even if it's a freed object.

(cherry picked from commit abbdf80643)
2023-04-27 08:49:29 +02:00
George Marques
aff0340486 GDScript: Fix wrong increment for disassembly of lambda
(cherry picked from commit 5b49382d38)
2023-04-27 08:49:29 +02:00
Pedro J. Estébanez
908325c29e Fix unsupported sampler filter used for voxel GI
(cherry picked from commit 09aa1bbdb3)
2023-04-27 08:43:30 +02:00
Pedro J. Estébanez
a5779ff281 Fix breakages of volumetric fog on voxel GI changes
(cherry picked from commit 2beed0d5dc)
2023-04-27 08:43:23 +02:00
kobewi
37c89f78ac Improve reliability of 2D shape editor redrawing
(cherry picked from commit d8e39912f8)
2023-04-27 08:42:54 +02:00
bitsawer
a0a95c7bc7 Fix Shader Preprocessor line numbering when disabled
(cherry picked from commit 34896d8e89)
2023-04-27 08:41:43 +02:00
George Marques
ee9a268fd7 GDScript: Use default path in test generator if not provided
Since it's almost always used with the same path, assume it is running
from the Godot source root.

(cherry picked from commit 221deb1cc1)
2023-04-27 08:41:36 +02:00
Devin
1b74572377 Updated GDScript example to use clear_surfaces() and C Sharp example to use ClearSurfaces() instead of non-existent surface_remove() and SurfaceRemove()
(cherry picked from commit 3b615ed789)
2023-04-27 08:41:23 +02:00
Rémi Verschelde
ba004ea1c3 Merge pull request #76476 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 3rd batch
2023-04-26 17:57:45 +02:00
Yuri Sizov
e7f4af0913 Update the changelog for 4.0.3 2023-04-26 15:50:20 +02:00
VolTer
7f09c3d2fc Provide an example on how to use ImmediateMesh
(cherry picked from commit 4eabad6c26)
2023-04-26 14:51:01 +02:00
Yuri Sizov
56110a354c Err when trying to build the editor without its required modules
(cherry picked from commit a145194268)
2023-04-26 14:51:01 +02:00
Winston
b9e75e50dc Document automatic center mode using shape origins
(cherry picked from commit 7b30d7da51)
2023-04-26 14:51:01 +02:00
Ninni Pipping
08ec4a82bd Add information about how Engine.time_scale affects Timers
(cherry picked from commit 16a1465380)
2023-04-26 14:51:00 +02:00
Fredia Huya-Kouadio
d327bb7a45 Fix issue with resizing the display on Android when using the compatibility renderer.
(cherry picked from commit b438b4a490)
2023-04-26 14:51:00 +02:00
Eoin O'Neill
5120afc236 Fix crash caused by invalid mix_rate assignment due to bogus
project settings.

We'll default to a sensible value in the case that a user has
somehow managed to modify the configuration file incorrectly.

Closes 69819

(cherry picked from commit 5a08091168)
2023-04-26 14:51:00 +02:00
Rindbee
4b4556179e Fix the uid field of the tscn/res file is lost when the external dependency is updated
(cherry picked from commit 41ac40c44c)
2023-04-26 14:51:00 +02:00
Roman Vasilyev
b711b45870 ios splash screen rotation fix
(cherry picked from commit 8fcca194a1)
2023-04-26 14:50:59 +02:00
VolTer
7b59361637 Document why Gradient.reverse() doesn't reverse constant gradients
(cherry picked from commit f21d13600e)
2023-04-26 14:50:59 +02:00
sodaJar
0132c29953 Fix wrong file on function call error
(cherry picked from commit 464a299d2e)
2023-04-26 14:50:59 +02:00
Haoyu Qiu
389045c691 Fix inconsistent file dialog settings usage
* Project Manager ignores display mode settings.
* EditorFileDialog's default display mode and show hidden files settings
  are not updated when corresponding editor settings change.

(cherry picked from commit 2ccc9e1456)
2023-04-26 14:48:18 +02:00
Pedro J. Estébanez
4c8946c080 Fix issues with Vulkan layout transitions
(cherry picked from commit 882b869220)
2023-04-26 14:48:18 +02:00
Yuri Sizov
289d551fbb Create an "Editor-only" section in the online class reference
This helps to find such classes without digging
through the rest of the class reference.
Editor-only classes can still be found under
your normal "Node" and "Resource" types.

This also fixes a typo and a missed case from the recent platform docs PR.

(cherry picked from commit 3ae282b452)
2023-04-26 14:47:56 +02:00
Rindbee
112677c39e Fix line_spacing in code editor will not take effect immediately on change
Previously, in CodeTextEditor, `line_spacing` was forgotten to update
when the editor setting property changed.

(cherry picked from commit 23d6225c1e)
2023-04-26 14:32:22 +02:00
VolTer
75a33fd647 Add missing PhysicalBone2D icon
(cherry picked from commit 048f94f662)
2023-04-26 14:32:22 +02:00
Adam Scott
e03ee06d74 Fix GDScript LSP variable rename
(cherry picked from commit 10fe6f14bb)
2023-04-26 14:32:22 +02:00
Samuele Panzeri
12969aadbd Fix editor spin slider remaining editable if set read_only during an edit and fix related animation player crash
(cherry picked from commit b6abb34759)
2023-04-26 14:32:21 +02:00
Haoyu Qiu
7f1b1e1c1b Fix TouchScreenButton not redrawn when texture changes
(cherry picked from commit a15126915d)
2023-04-26 14:32:21 +02:00
Haoyu Qiu
9336866de0 Fix layout list not resizing in editor layout dialog
(cherry picked from commit dfc628bc54)
2023-04-26 14:32:21 +02:00
Fredia Huya-Kouadio
01014a7475 Make tab's close button responsive to touch taps
(cherry picked from commit 7325ffdd46)
2023-04-26 14:32:21 +02:00
Fredia Huya-Kouadio
bceb910f3a Make EditorPropertyLayersGrid responsive to touch taps
(cherry picked from commit aa7a4d56f0)
2023-04-26 14:32:20 +02:00
Fredia Huya-Kouadio
eae3d61d7f Downgrade android gradle plugin to version 7.2.1.
Version 7.3.0 changes the build layout which causes updates to the generated shared libraries to not be picked up.

(cherry picked from commit 4507d3a38c)
2023-04-26 14:32:20 +02:00
kobewi
82aab2b0ea Fix invalid global position when read outside tree
(cherry picked from commit 727a4ed79a)
2023-04-26 14:32:20 +02:00
clayjohn
c8ed59ba41 Validate renderer selection in project manager and change default renderer editor setting to expose an enum to users
(cherry picked from commit 48ebae7812)
2023-04-26 14:31:53 +02:00
Hugo Locurcio
f5721ca61a Document custom mouse cursors larger than 128×128 potentially having issues
(cherry picked from commit 92730fb07d)
2023-04-26 14:29:27 +02:00
Paweł
c4655010d0 Fix lerp error message
(cherry picked from commit 899da22002)
2023-04-26 14:29:27 +02:00
MistMage
4d38529284 Fix for mixed tabs and spaces in gdscript
(cherry picked from commit fecbc12d17)
2023-04-26 14:29:27 +02:00
Rémi Verschelde
c893968b33 CI: Fix checks fallback logic when changed files listing is missing
The file would be one byte (newline) so the check with '-s' failed.

(cherry picked from commit 39d24ee80b)
2023-04-26 14:18:39 +02:00
Rémi Verschelde
82a17d028d CI: Fixup failure to get changed files on merge
The checkout might be too shallow so the before commit isn't available.
The logic was already written to take this into account (it then generates
an empty 'changed.txt' which falls back to testing everything), but the
error code would still force terminate the job.

Hopefully we can find a way to make the logic work for merge events too in
the future, but for now this is a quick fix.

(cherry picked from commit 9063e907a7)
2023-04-26 14:18:38 +02:00
Rémi Verschelde
f241b17804 CI: Speed up static checks by checking only changed files
- file_format, header_guards and clang-format benefit from this short list.
- dotnet-format, Python and JS checks don't, but they're only relevant for
  PRs changing a specific set of files, so we skip them when those files
  aren't modified.

The logic to get changed files only works reliably for:
- Pull request events
- Non-force pushed push events

So when force pushing a branch in your fork, or creating a new branch,
it will still scan all files as fallback.

Upgraded CI runner to Ubuntu 22.04 so we get clang-format 14 out of the box,
so we don't need to install a custom version (saves ~15 s). We also cache
the APT dependencies to speed up the build and avoid flaky Ubuntu/Microsoft
repos.

(cherry picked from commit 068f893072)
2023-04-26 14:18:38 +02:00
kleonc
fcdd7eda26 Fix expected argument count in Callable call error text
(cherry picked from commit 7a871212ed)
2023-04-26 14:14:08 +02:00
Rémi Verschelde
878367b3ac mbedtls: Update to upstream version 2.28.3
Rediff patch from PR 1453, lstrlenW is no longer used upstream so
that part of the patch was dropped.

(cherry picked from commit 1fde2092d0)
2023-04-26 14:14:07 +02:00
Samuele Panzeri
a27dd86755 Fix editor lock on sdf collision bake on error
(cherry picked from commit a2be742f97)
2023-04-26 14:14:07 +02:00
bruvzg
46e7f334fb [Windows] Cleanup COM library initialization/uninitialization.
(cherry picked from commit 83dc545ea2)
2023-04-26 14:14:07 +02:00
kobewi
cce2ffda1b Remove wrong Ctrl from 2D editor tooltip
(cherry picked from commit 75f2d7f5c4)
2023-04-26 14:14:06 +02:00
smix8
f1505fe98b Fix NavigationMesh baking for HeightMapShape
Fixes NavigationMesh baking for HeightMapShape.

(cherry picked from commit 71c453a426)
2023-04-26 14:14:06 +02:00
bruvzg
10547deb3d [Windows TTS] Fix queuing utterances in rapid succession.
(cherry picked from commit a9d326db60)
2023-04-26 14:14:06 +02:00
bruvzg
357e2ec05d [Image Font] Fix fractional ascent for font with odd height.
(cherry picked from commit 41f7bb2025)
2023-04-26 14:14:06 +02:00
HolonProduction
769daf79e2 Fix multi-line string highlighting with single quotes.
(cherry picked from commit bdb7045e2c)
2023-04-26 14:14:05 +02:00
Hugo Locurcio
39c0392a64 Document using AnimatableBody when needed in StaticBody description
(cherry picked from commit 68117d2fc7)
2023-04-26 14:14:05 +02:00
kleonc
6ac70ff5da TileMap Fix rendering odd-sized tiles
(cherry picked from commit c49a7feae3)
2023-04-26 14:14:05 +02:00
Rémi Verschelde
d78691d44f Merge pull request #76405 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 2nd batch
2023-04-25 14:24:38 +02:00
Yuri Sizov
b5bd99d9e6 Update changelog for 4.0.3 2023-04-24 18:10:21 +02:00
Adam Scott
e6478f5be3 Fix typo when parsing LSP function parameters
(cherry picked from commit 879791e305)
2023-04-24 17:08:56 +02:00
Haoyu Qiu
2eb29d0684 Fix various typos in the classref
(cherry picked from commit 766807506c)
2023-04-24 17:08:56 +02:00
Paweł
32dc3b66ab Remove double thes from documentation
(cherry picked from commit 4431cdd154)
2023-04-24 17:08:56 +02:00
David Giardi
75f3ce618e Fix blurry borders on antialiased FlatStyleBox
This is a fix of the antialiasing logic of FlatStyleBox.
It is now possible to have smooth rounded corners while keeping
the edges sharp on the pixels.

The antialiasing gradient positioning is ajusted so that the "hard"
border corresponds to the middle of that gradient instead of one end.
Checked against rendering of rounded rectangles in a vector graphics
software.

(cherry picked from commit 2ef20045b1)
2023-04-24 17:08:55 +02:00
kobewi
f39f354313 Add missing LineEdit constants in editor theme
(cherry picked from commit f462efd7f1)
2023-04-24 17:08:55 +02:00
Michael Alexsander
af0dd6591b Remove unnecessary zero multiplications
(cherry picked from commit f057d755ab)
2023-04-24 17:07:09 +02:00
Ninni Pipping
13f368067f Improve description of Callable.bind/unbind
(cherry picked from commit 0332fd5e8f)
2023-04-24 17:03:58 +02:00
VolTer
10d8a67267 Fix Quaternion's brief description
(cherry picked from commit 5c0e3b26a6)
2023-04-24 17:03:57 +02:00
Hugo Locurcio
83c3963235 Improve print_rich() documentation
- List all supported colors.
- Mention URL tag support limitations.
- Fix and tweak code example to do what it says.
- Remove outdated notice about lack of Windows support (but mention
  that only Windows 10 and later support ANSI code conversion).

(cherry picked from commit ec277d804e)
2023-04-24 17:03:57 +02:00
kleonc
13cfbe6a25 Fix deserializing resource usage debug data
(cherry picked from commit 3e7752463a)
2023-04-24 17:03:57 +02:00
angel-721
d936cc8b9e Rename internal root canvas group to start with underscore
(cherry picked from commit e347d7d64d)
2023-04-24 17:03:57 +02:00
Yuri Sizov
4a140b61f1 Use Point2 consistently in Control methods
While Size2 and Point2 are just aliases,
which is why this doesn't fail compilation,
it's nice to have things consistent.

(cherry picked from commit 4fed87320c)
2023-04-24 17:03:56 +02:00
Evgeniy Vasilyev
d46cb8e65c Fixed typo in DisplayServer.ScreenOrientation docs
(cherry picked from commit 5ba98e59f0)
2023-04-24 17:03:56 +02:00
Haoyu Qiu
c6297f46fe Unify descriptions of vector methods
* is_equal_approx
* normalize
* length_squared
* posmod
* posmodv

(cherry picked from commit 6cd8e706fa)
2023-04-24 17:03:56 +02:00
Rattle22
12da78cf30 Fix Typo in NavigationServer2D
(cherry picked from commit 5c387cbdb3)
2023-04-24 17:03:55 +02:00
Tae Hong Ahn
a27b427b1f update set_smooth_group description
fixes https://github.com/godotengine/godot/issues/74452

(cherry picked from commit 5a775ac08c)
2023-04-24 17:03:55 +02:00
bruvzg
9c1ea28092 Improve line BiDi handling, prevent crash on recursive log updates.
(cherry picked from commit 282e4231c2)
2023-04-24 17:03:55 +02:00
bruvzg
3a1af9393f [TextServer] Improve BiDi error handling.
(cherry picked from commit d8d88e1530)
2023-04-24 17:03:54 +02:00
clayjohn
2c773e12b8 Use angle_rand to calculate base_angle in particles process material
(cherry picked from commit 821917ba9f)
2023-04-24 17:01:37 +02:00
Danil Alexeev
d31002cfbe GDScript: Add missing member type check when resolving extends
(cherry picked from commit 66279b98b6)
2023-04-24 17:00:35 +02:00
Pedro J. Estébanez
3a5bc7455e Make EditorToaster's handler thread-safe
(cherry picked from commit 84183f89e6)
2023-04-24 16:52:26 +02:00
Ninni Pipping
3fcaffc96b Fix Image.compress description
Description mentioned `mode` instead of `source`

(cherry picked from commit 6312fe2fae)
2023-04-24 16:52:25 +02:00
kleonc
ebcc7b4b98 Fix OBJ mesh importer smoothing handling
(cherry picked from commit e8900a2cac)
2023-04-24 16:52:25 +02:00
Hakim
756d809ef1 Change cursor consistently when panning in the 2D Editor
(cherry picked from commit f4edbe6341)
2023-04-24 16:52:25 +02:00
Paweł
ad5d7c2030 Fix Windows StringFileInfo structure
(cherry picked from commit e15a086bb9)
2023-04-24 16:52:24 +02:00
João Pedro Braz
1a85f6398f Use MODELVIEW_MATRIX for vertex transform when double precision is enabled
This commit updates the double precision vertex transform code from
using the MODEL_MATRIX to now use the MODELVIEW_MATRIX instead.

This can be made possible by transforming the MODELVIEW_MATRIX
back into model space (ie, same space as the MODEL_MATRIX) and then using it as if it were the MODEL_MATRIX.

With this in place we now properly handle VERTEX transformations that
a Material Shader might do, such as billboard-ing.

(cherry picked from commit 63c6f0b93c)
2023-04-24 16:52:24 +02:00
clayjohn
ad582cf0b1 Don't store instance transform in RD 3D renderer unless requested
Previously, when using doubles builds of the engine, instance transform was stored no matter what which caused world space particles to accumulate the instance transform twice

(cherry picked from commit 29edd277e4)
2023-04-24 16:52:24 +02:00
Erik Johnson
410b503aac Translate inactive particles to -INF
(cherry picked from commit 6229c2a1f9)
2023-04-24 16:28:30 +02:00
Ninni Pipping
3445fa7dbc Expose more compression formats in Image and fix compress check
Check for compressing ASTC checked if the function for BPTC was present

(cherry picked from commit cf64e2fa47)
2023-04-24 16:28:30 +02:00
Ninni Pipping
ccc761dd93 Don't apply scale to autohide theme property
(cherry picked from commit 722597aa97)
2023-04-24 16:28:29 +02:00
Martin Capitanio
2992a99629 Fix blend_shape (shapekey) empty name import.
Corresponds to the Blender glTF-Importer PR
https://github.com/KhronosGroup/glTF-Blender-IO/pull/1902

(cherry picked from commit 8b6fa79eee)
2023-04-24 16:28:29 +02:00
Jason Knight
f3907e2fe0 Fix potential null in android text entry system.
(cherry picked from commit f8699d93f6)
2023-04-24 16:28:29 +02:00
clayjohn
27df8b93aa Properly calculate lifetime_split for particles
(cherry picked from commit f35ca4a9c7)
2023-04-24 16:28:28 +02:00
clayjohn
95f5027453 Write out render_mode even when mode is set to default in VisualShaders
(cherry picked from commit 016946b552)
2023-04-24 16:28:28 +02:00
bruvzg
e071fb2263 [TextServer] Use dedicated flag for object replacement characters.
(cherry picked from commit d904516e55)
2023-04-24 16:28:28 +02:00
clayjohn
d4c9ca3975 Ensure that depth write state is updated before transparent pass in OpenGL3 renderer
(cherry picked from commit ed0c378bda)
2023-04-24 16:28:27 +02:00
Haoyu Qiu
df80e2ae43 Tree: Fix offset calculation when there are hidden items
(cherry picked from commit a083c85521)
2023-04-24 16:28:27 +02:00
cody
c1ec270b44 Fix "error X3708: continue cannot be used in a switch" in HTML export
(cherry picked from commit 5062df41a5)
2023-04-24 16:28:27 +02:00
clayjohn
aeca8f07fa Check for instancing without relying on instance_count when drawing 2D meshes
This ensures that Particles and MultiMeshes still draw when instance_count is 1

(cherry picked from commit 579ca03e88)
2023-04-24 16:28:26 +02:00
Hugo Locurcio
8a349e4fa9 Allow entering named colors in ColorPicker's hex field
This also makes the hex field wider to allow displaying 9-character
hex code (`#rrggbbaa`) in full, even when using a custom font.

(cherry picked from commit 517dc3654a)
2023-04-24 16:28:26 +02:00
smix8
25518aad27 Fix forced optimization in dev_build
Fixes forced optimization in dev_build.

(cherry picked from commit b18c7481aa)
2023-04-24 16:28:26 +02:00
Hugo Locurcio
9253f415b3 Fix get_test_texture() returning an almost fully white texture
The texture's appearance is now similar to the texture that was displayed
on the TestCube node in Godot 2.x.

(cherry picked from commit e4d5cecd4c)
2023-04-24 16:28:26 +02:00
Riteo Siuga
214ad50498 Convert the logo's text outlines into paths
This avoids rendering issues with ThorVG and other renderers (which
don't support the `paint-order` property) at a slight cost in file size.

This approach has already been used by the main icon.

(cherry picked from commit af9372eb59)
2023-04-24 16:28:25 +02:00
Mallardbro
e801fe83d1 Correct the side mentioned with focus_neighbor_right and focus_neighbor_top.
A small typo with the definitions of `focus_neighbor_right` and `focus_neighbor_top`. Both use "bottom" rather than the correct side for each.

(cherry picked from commit c25d015d06)
2023-04-24 16:28:25 +02:00
Johan Mattsson
5bcff18c76 macOS export: Fix validation of codesigning certificate password
(cherry picked from commit 76e1d1363b)
2023-04-24 16:28:25 +02:00
Rémi Verschelde
effefe9feb Windows TTS: Use HashMap instead of RBMap for ids
And fixup includes in other implementations.

(cherry picked from commit 92b9806dcc)
2023-04-24 16:28:24 +02:00
Koyper
7e482f420d Fixed RichTextLabel wrong selection offset in padded table cell.
(cherry picked from commit 6f11cf7d31)
2023-04-24 16:28:24 +02:00
Ricardo Subtil
b5ff677381 Poll LSP/DAP clients for connection status updates
(cherry picked from commit 4be4eeea3a)
2023-04-24 14:16:37 +02:00
Haoyu Qiu
e7f7de0044 Set font sizes for various styles in editor output panel
(cherry picked from commit 2c0db8222a)
2023-04-24 14:16:37 +02:00
mara
a6e15e2f15 Change to_utf8 to to_utf8_buffer and to_ascii to to_ascii_buffer in remaining docs
The method `to_utf8` doesn't exist in Godot 4, but is still mentioned in
the documentation in some places. Replace it with the new name
`to_utf8_buffer`. Same for ascii. Same for C#.

(cherry picked from commit 57dca93718)
2023-04-24 14:16:36 +02:00
kobewi
51fdbf6ac7 Adjust size of some dialogs
(cherry picked from commit 71011e0855)
2023-04-24 14:16:16 +02:00
Ninni Pipping
9902d07966 Document how to make custom min/max for Array
(cherry picked from commit 96ab31a711)
2023-04-24 14:04:20 +02:00
Dimitri A
ce7fd66896 docs/FileDialog: Use clickable references
This replaces two [code][/code] blocks with clickable refs to [enum Access] and [member file_mode] respectively.

(cherry picked from commit a5778da55b)
2023-04-24 14:04:20 +02:00
Yuri Sizov
df5df11916 Always cache parent visibility in CanvasItem
(cherry picked from commit fd6a743823)
2023-04-24 14:04:19 +02:00
kobewi
8c372f4109 Fix method dialog label
(cherry picked from commit c399d4f26c)
2023-04-24 14:04:19 +02:00
Haoyu Qiu
d0c50d820b Fix connect signal dialog not allowing Unicode method name
(cherry picked from commit 936c9e83b4)
2023-04-24 14:04:19 +02:00
Ricardo Buring
deb22e2381 Fix typo bug in convex-convex separating axis test
(cherry picked from commit d7aed57b60)
2023-04-24 14:04:19 +02:00
Juan Linietsky
4616de0c5d Fix CI build error
Fixes potential use of uninitialized variable.

(cherry picked from commit 37362202a4)
2023-04-24 14:04:18 +02:00
fuzzy@notepc
08b825396f Fix #75790, where creating Ceil(Vector2) node in Visual Shader Editor
crashes engine due to index out of bounds.

(cherry picked from commit c6a45f1031)
2023-04-24 14:04:18 +02:00
Pedro J. Estébanez
a37eb88c5b Lift restriction that resource load thread requester has to be the initiator
(cherry picked from commit c51229491d)
2023-04-24 14:04:18 +02:00
Rémi Verschelde
90b4ca2e50 i18n: Sync translations with Weblate 2023-04-20 13:26:36 +02:00
Rémi Verschelde
16a6bdd423 Merge pull request #75786 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.3) - 1st batch
2023-04-11 21:01:58 +02:00
kobewi
177be9bd37 Initialize editor values on first launch
(cherry picked from commit b0eadcfbce)
2023-04-10 11:32:28 +02:00
Yuri Sizov
967ad04928 Add changelog for 4.0.3 2023-04-07 18:08:27 +02:00
mightygoat
66633d19a1 Fix the limit for interpolation of R0 with respect to metallic and SSR
Shlick term

(cherry picked from commit 2c000cb72f)
2023-04-07 17:44:40 +02:00
smix8
675547845e Fix NavigationObstacles not being added to avoidance simulation
Fixes NavigationObstacles not being added to avoidance simulation.

(cherry picked from commit aadf33efd8)
2023-04-07 17:44:40 +02:00
Ziya Erkoc
210879d284 Warn if a concave shape is assigned to ConvexPolygonShape2D
(cherry picked from commit 6fb113f59f)
2023-04-07 17:44:40 +02:00
Hugo Locurcio
66a8ddf61c Fix CompressedTextureLayered description in the class reference
This also updates the list of compression modes available for textures.

(cherry picked from commit 0d24016db0)
2023-04-07 17:44:40 +02:00
smix8
c62f8f9319 Fix AudioStreamPlayer2D crash when PhysicsServer2D runs on thread
Fixes AudioStreamPlayer2D crash when PhysicsServer2D runs on thread due to empty PhysicsSpace

(cherry picked from commit a5351086b0)
2023-04-07 17:44:39 +02:00
bruvzg
ba5335f3fb [Web] Fix keycode/physical keycode mixed up.
(cherry picked from commit 744bf604bf)
2023-04-07 17:44:39 +02:00
Malcolm Nixon
7c62d1106e Modify "physics/3d/solver/contact_max_allowed_penetration" precision to three significant digits, so values down to "0.001" can be specified.
Updated additional 2D and 3D physics parameters based on team recommendations

Co-Authored-By: Ricardo Buring <rburing@users.noreply.github.com>
(cherry picked from commit 1d1d3c71e0)
2023-04-07 17:44:39 +02:00
bruvzg
05fa6e314a [SVG Font] Keep a copy of UTF-8 XML source string during the whole SVG processing.
(cherry picked from commit 19179238fa)
2023-04-07 17:44:39 +02:00
Martin Capitanio
233bd4abaa SVG: fix tvg::Picture->size() and scale based errors.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
(cherry picked from commit bfc498f3d0)
2023-04-07 17:44:39 +02:00
umarcor
a99b046412 [ci/windows] remove obsolete 'tools' in the name
(cherry picked from commit 2abadbb58b)
2023-04-07 17:44:39 +02:00
Rémi Verschelde
2805f7b36d CI: Visibly print trailing whitespace when static checks fail
GitHub Actions seems to be hiding colored whitespace, and after lots of
attempts I couldn't find a way to work it around.

So instead I'm using a perl expression to replace trailing spaces with
`·` and tabs with `<TAB>` in the ANSI colored diff output. This ensure
that they're visible, and they are properly colored as expected too.

(cherry picked from commit 266280ffca)
2023-04-07 17:44:39 +02:00
Fredia Huya-Kouadio
589c32ec55 Fix the issue preventing dragging in the 2D and visual shader editor
(cherry picked from commit 2c7633dce5)
2023-04-07 17:44:39 +02:00
HK-SHAO
9598eb9638 Fix the Python type error when creating the .sln file
(cherry picked from commit 19a8efc875)
2023-04-07 17:44:39 +02:00
Lyuma
ba9f2981f1 gltf: Remove obsolete hack to embed gltf textures in advanced import
(cherry picked from commit bd020b7d92)
2023-04-07 17:44:39 +02:00
Bartłomiej T. Listwon
1f51ceddf3 Fix moving position indicator out of bounds in FileAccessMemory
(cherry picked from commit bff0c71e2e)
2023-04-07 17:44:38 +02:00
yedpodtrzitko
eab0386934 ci: wait for static check results before starting builds
(cherry picked from commit 93b7bcb33d)
2023-04-07 17:44:38 +02:00
Johan Aires Rastén
585f4ed737 GraphNode ignore non-visible children for minimum size.
(cherry picked from commit 9a60c4affb)
2023-04-07 17:44:38 +02:00
Yuri Sizov
cacc6c5ed5 Prevent color conversion of the big Godot logo
Use an off-white color from the palette that we explicitly don't convert.

(cherry picked from commit ce741df43d)
2023-04-07 17:44:38 +02:00
Marius Hanl
817da41d55 Fix some theme values affect the editor by setting a default value for the theme constant 'h_separation' for MenuBar and Button and a default value for the theme color 'background_color' for TextEdit
(cherry picked from commit c0905bc0af)
2023-04-07 17:44:38 +02:00
Andrés Botero
02d0f090c0 Added guide button to controller db, changed to use secret XInput function.
(cherry picked from commit f249a9ce19)
2023-04-07 17:44:38 +02:00
Rindbee
2b0acb61be Fix RemoteTransform2D could fail to update AnimatableBody2D's position or rotation
Configure the transform per condition, and then only set it once to
prevent multiple `NOTIFICATION_LOCAL_TRANSFORM_CHANGED` notifications
from being sent.

(cherry picked from commit 100b4b1f28)
2023-04-07 17:44:38 +02:00
kobewi
88d446f6c6 Prevent off-screen controls in editor
(cherry picked from commit 55b50703d7)
2023-04-07 17:44:38 +02:00
kobewi
87a9d2c87e Improve editor state initialization
(cherry picked from commit 13c8a9890d)
2023-04-07 17:44:38 +02:00
kobewi
03827485d7 Properly remember snapping options per-project
(cherry picked from commit 45b47d5584)
2023-04-07 17:44:38 +02:00
clayjohn
99beeb3992 Recreate swap chain when suboptimal to avoid error spam
(cherry picked from commit c9d2bc91aa)
2023-04-07 17:44:37 +02:00
smix8
cc6ce6977d Expose NavigationAgent path postprocessing and pathfinding algorithm options
Exposes the path postprocessing and pathfinding algorithm options of the NavigationAgent internal NavigationPathQueryParameters object.

(cherry picked from commit 6e324bb341)
2023-04-07 17:44:37 +02:00
Hendrik Brucker
e656a53ed0 Fix several GraphEdit operations at zoom levels other than 100%
(cherry picked from commit 49587fd6d9)
2023-04-07 17:44:37 +02:00
James Buck
861399fbe5 Re-enable script editor File menu shortcuts when the menu is hidden
(cherry picked from commit de49bec30e)
2023-04-07 17:44:37 +02:00
Jean-Michel Bernard
1aa5fce321 Fix commenting collapsed function issue
(cherry picked from commit 68ad3338ef)
2023-04-07 17:44:37 +02:00
kleonc
7ef4e519f7 TextureProgressBar Update upon texture changes
(cherry picked from commit cdc63214fe)
2023-04-07 17:44:37 +02:00
Ron B. Yeh
bcf991d3ec Fix off-by-one issue where Go to Line dialog shows the incorrect line
number (one less than the actual current line).

(cherry picked from commit 1e9fd10f68)
2023-04-07 17:44:37 +02:00
ajreckof
62dbd512cc Fix descriptions not showing for theme properties
(cherry picked from commit 14140eb2d9)
2023-04-07 17:44:37 +02:00
RedworkDE
4cc8a689ba Update thorvg to 0.8.4
(cherry picked from commit cfed867da1)
2023-04-07 17:44:36 +02:00
kobewi
f8517e1c4b Remember directory when installing templates file
(cherry picked from commit 551b6965ec)
2023-04-07 17:44:36 +02:00
bruvzg
2c80ded6ce [RTL] Fix fill align and trim with enabled dropcap.
(cherry picked from commit efa647bb17)
2023-04-07 17:44:36 +02:00
kleonc
a5572ba5a3 C# Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion
(cherry picked from commit f53d3382af)
2023-04-07 17:44:36 +02:00
RedMser
f645bbaffb Fix clipboard relying on focused window
(cherry picked from commit 942f8b9858)
2023-04-07 17:44:36 +02:00
Hakim
b17f0f593e Use physical shortcuts for freelook navigation in the editor
(cherry picked from commit 52de40310a)
2023-04-07 17:44:36 +02:00
Rémi Verschelde
4762303f18 Bump version to 4.0.3-rc 2023-04-04 10:50:01 +02:00
Rémi Verschelde
7a0977ce2c Bump version to 4.0.2-stable 2023-04-04 00:43:56 +02:00
Rémi Verschelde
9099ac39cf i18n: Sync translations with Weblate 2023-04-04 00:33:24 +02:00
Rémi Verschelde
bd016c8c4d Merge pull request #75624 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.2) - 3rd batch
2023-04-04 00:18:49 +02:00
Yuri Sizov
0a8fdde924 Add changelog for 4.0.2 2023-04-03 19:18:55 +02:00
Araraura
d0e906327d Fix typo and slightly reword in @GDScript.xml
Fix "the every following property" to "then every following property" and change "is added" to "will be added".

(cherry picked from commit e1c0df7048)
2023-04-03 18:41:54 +02:00
kobewi
ed1eb1e18f Update UndoRedo description
(cherry picked from commit 3a06e6af76)
2023-04-03 18:41:05 +02:00
kobewi
1c66b24325 Fill random docs
(cherry picked from commit eac65fd0a8)
2023-04-03 18:40:24 +02:00
kleonc
103d23539f Improve CanvasItem.self_modulate docs
(cherry picked from commit 4fb9aa2294)
2023-04-03 18:39:37 +02:00
bruvzg
0c24ee363f [TextEdit] Fix block caret size at the end of the line.
(cherry picked from commit efe04af446)
2023-04-03 18:39:01 +02:00
skyace65
c114a7bab4 Remove reference to clipboard in OS class doc
(cherry picked from commit a65d99b541)
2023-04-03 18:38:27 +02:00
smix8
1deda0f003 Add navigation renames to 3to4 converter
Adds navigation renames to 3to4 converter.

(cherry picked from commit 0c1e585a1d)
2023-04-03 18:37:44 +02:00
kobewi
87929d9ab0 Add _get_configuration_warnings() example
(cherry picked from commit c4e08a4e1a)
2023-04-03 18:37:09 +02:00
Brennen Shaughnessy
040b432a12 Fixed property hint for platform layers on 3D physics body
(cherry picked from commit 2d16fe681d)
2023-04-03 18:36:27 +02:00
Paragoumba
b912905d23 Fix xml namespace in org.godotengine.Godot.xml
(cherry picked from commit 1ba14e838a)
2023-04-03 18:35:30 +02:00
smix8
e243dfa9f6 Fix NavigationAgent enable avoidance crash
Fixes NavigationAgent enable avoidance crash.

(cherry picked from commit 184427196f)
2023-04-02 17:37:12 +02:00
bruvzg
50f26811b0 [macOS] Fix infinite loop caused by global menu callbacks which trigger EditorProgress dialog.
(cherry picked from commit 48730e3b77)
2023-03-30 23:20:20 +02:00
Rémi Verschelde
c9ee508089 Bump version to 4.0.2-rc 2023-03-30 21:41:11 +02:00
Rémi Verschelde
b8b29c8566 Merge pull request #75500 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.2) - 2nd batch
2023-03-30 21:36:24 +02:00
Chris Hutchinson
4323c8b78b Replaced operating system alert dialog with a warning log message,
toggled by a project setting.
Fixes #73141

(cherry picked from commit cb8e919243)
2023-03-30 19:28:57 +02:00
Ninni Pipping
1e94881484 Exposing more project settings for documentation
(cherry picked from commit bd30847e59)
2023-03-30 19:26:05 +02:00
Haoyu Qiu
d6b36e800d Improve POT Generation dialog
* Avoid "property not found" warnings when adding a file for the first
  time.
* When no file is added, disable the Generate POT button instead of
  printing a warning.

(cherry picked from commit 584136271c)
2023-03-30 19:24:52 +02:00
Haoyu Qiu
ae0a98ef9b Hide internal settings from the classref
Default actions are no longer internal since we want to document them.
They are still hidden from the Project Setting dialog because we hid the
whole `input/` group manually.

(cherry picked from commit 1e0b8d6240)
2023-03-30 19:23:04 +02:00
Redwarx008
493e39860d C#: Fix Array.AddRange index out of bounds
Fix Array.AddRange index out of bounds

(cherry picked from commit eb1fb254a6)
2023-03-30 19:21:14 +02:00
Rémi Verschelde
fe71d33033 Project converter: Remove Tween properties/signals from renames
The Tween class in Godot 3 is fully incompatible with Godot 4, there's no point
doing these renames. It also makes it harder to use Threen, my (currently WIP)
forward-port of the Godot 3 Tween to Godot 4.

(cherry picked from commit 0171037e0a)
2023-03-30 19:20:36 +02:00
Mai Lavelle
9f20659c62 Fixups to list handling in SceneReplicationConfig
Wrong paths were being inserted leading to duplicates / missed properties.

(cherry picked from commit 74edbdd4bc)
2023-03-30 19:20:01 +02:00
Sabrehull
1056996200 [X11] Fix layout bug in keyboard_get_keycode_from_physical
(cherry picked from commit d4b7466266)
2023-03-30 19:19:23 +02:00
kobewi
74a35c9ca2 Don't allow selecting nodes without owner
(cherry picked from commit 2fcfef15da)
2023-03-30 19:18:35 +02:00
Bastiaan Olij
b39cbe71b4 Fix typo in OpenXR pose orientation check
(cherry picked from commit cdd9de28a8)
2023-03-30 19:17:55 +02:00
Danil Alexeev
07beae98f0 GDScript: Fix false positive REDUNDANT_AWAIT warning
(cherry picked from commit c0eeb32e38)
2023-03-30 19:17:15 +02:00
kleonc
47c4044d03 TileSet editor AtlasMergingDialog crash fix
(cherry picked from commit c72b09639a)
2023-03-30 19:16:33 +02:00
Brian Long
838a82f885 Update GPUParticles2D/3D speed scale on ENTER_TREE
Fix for https://github.com/godotengine/godot/issues/75218

Pause notifications are not sent when a node is added as a child. So GPUParticles2D should also obey its can_process status on ENTER_TREE, not just PAUSED/UNPAUSED.

(cherry picked from commit 4652fbd09e)
2023-03-30 19:15:47 +02:00
Fredia Huya-Kouadio
dc100cbebb Bump the target SDK version to 33 (Android 13)
(cherry picked from commit 845ca33c76)
2023-03-30 19:14:54 +02:00
lewiji
5f9990e25d Add "filesRoot" path to Android provider paths xml
(cherry picked from commit ac04ff7bec)
2023-03-30 19:13:59 +02:00
Fredia Huya-Kouadio
ff15e2384a Configure maven central snapshot versions for the Godot Android library
A snapshot version is a version that has not yet been released which allows us to deploy the same transient version incrementally, without requiring projects to upgrade the artifact version they're consuming. Those projects can use the same version to get an updated snapshot version.

(cherry picked from commit a5fdc95515)
2023-03-30 19:13:18 +02:00
fabriceci
bafc6372b2 Exposes the apply_floor_snap function to allow a snap to be made regardless of velocity.
(cherry picked from commit 1381e6da4f)
2023-03-30 19:10:45 +02:00
Yuri Sizov
19501f8eb1 Merge pull request #75397 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.2) - 1st batch
2023-03-27 20:14:47 +02:00
VolTer
843f5adbc5 Improve documentation of int
(cherry picked from commit 0f3197501e)
2023-03-27 18:06:47 +02:00
Hugo Locurcio
6fedc728f6 Use 8×8 default grid size for TextureRegion and 2D polygon editors
Power-of-two grid sizes are more suited to most game assets.

(cherry picked from commit 0f73ef1df9)
2023-03-27 18:04:25 +02:00
Haoyu Qiu
4750b77d2d Fix typos and inconsistencies in classref
* Typo fixes.
* Navigation agent's `velocity_computed` signal is not emitted by
  `set_velocity`, but at the end of that frame if `set_velocity` is
  called.
* Simplify link in navigation agent's `avoidance_enabled` description.
* Unify `navigation_layers` description across `NavigationAgent{2,3}D`.
* Unify `is_normalized()` description across `Vector2`, `Vector3`, and
  `Vector4`

(cherry picked from commit ff97c481d3)
2023-03-27 18:02:28 +02:00
Haoyu Qiu
2ea8dd7232 More i18n improvements
* Make placeholder in editor layout dialog translatable.
* Make messages in scene import settings dialog translatable.
* Mark theme override property categories for translation.

(cherry picked from commit 5a5fd33e42)
2023-03-27 18:02:14 +02:00
Haoyu Qiu
5e9e95c34c Make Add Scene button the same height as scene tabs
(cherry picked from commit 8ab11127bc)
2023-03-27 18:00:35 +02:00
Haoyu Qiu
50ea0951fe Fix height of subresource button in Inspector
(cherry picked from commit 66b325b728)
2023-03-27 18:00:28 +02:00
Ninni Pipping
7de181f524 Fix NodePath subname index range documentation
(cherry picked from commit c75870f798)
2023-03-27 17:59:43 +02:00
Unai Martinez-Corral
a08bee8d10 [ci/web] update mymindstorm/setup-emsdk to v12
(cherry picked from commit dcb974700b)
2023-03-27 17:59:08 +02:00
kobewi
65c52087c2 Remove disabled plugins from active plugins
(cherry picked from commit 0b8b37c35d)
2023-03-27 17:58:34 +02:00
Hugo Locurcio
b85cead4b9 Document how to use logarithm of base 10 with log()
(cherry picked from commit 3c4f0ca9c6)
2023-03-27 17:57:14 +02:00
Ninni Pipping
38595b8470 Fix "hides member" warnings in csharp_script.cpp
(cherry picked from commit ff5d8c4a42)
2023-03-27 17:56:20 +02:00
RedworkDE
adc7edd907 C#: Do not print errors about missing references to intentionally ignored members
(cherry picked from commit 42cf684837)
2023-03-27 17:55:32 +02:00
Ricardo Buring
9573574788 Port robust signal (dis)connection to ShapeCast2D
Ported from ShapeCast3D.

(cherry picked from commit 5bed055cdd)
2023-03-27 17:53:34 +02:00
Ricardo Buring
58d8368481 Fix collide_shape return type
Fix PhysicsDirectSpaceState3D::_collide_shape return type.
Also PhysicsDirectSpaceState2D::_collide_shape.

(cherry picked from commit 61429a5f49)
2023-03-27 17:50:35 +02:00
Ninni Pipping
2a52307936 Fix AnimatedSprite2D autoplay warning
Changing of autoplay when changing `SpriteFrames` is not done by the
user and warning is unhelpful

(cherry picked from commit 4d4342e018)
2023-03-27 17:49:44 +02:00
Ninni Pipping
9a4a0d042c Improve documentation for Area monitor callbacks in PhysicsServer3D
(cherry picked from commit 4124271241)
2023-03-27 17:49:05 +02:00
nikitalita
7a827f979e Fix ResourceImporterLayeredTexture::import() high_quality type
(cherry picked from commit 68a6505f41)
2023-03-27 17:48:02 +02:00
kleonc
b3f121d108 CanvasItem Fix ENTER_CANVAS / VISIBILITY_CHANGED notifications order when entering tree
(cherry picked from commit 6e3820fd4d)
2023-03-27 17:47:09 +02:00
Ninni Pipping
fa9f92112c Make Gradient resort points on reverse
(cherry picked from commit 3795677f3d)
2023-03-27 17:46:01 +02:00
ator-dev
9a3b52dc2d Fix "Download Project Source" for Web Editor
- Correctly pass safe project name and safe datetime to `vformat`

(cherry picked from commit dfb405b702)
2023-03-27 17:45:09 +02:00
Rindbee
ce4ab71957 Fix some wrong descriptions in the docs
(cherry picked from commit f29a7c0404)
2023-03-27 17:44:02 +02:00
bruvzg
989d556f8e [Windows] Remove meta_mem update on keyup/keydown.
(cherry picked from commit e6067a39b5)
2023-03-27 17:38:51 +02:00
Fredia Huya-Kouadio
9ac978190e Fix directory access when the running app has the All files access permission
(cherry picked from commit f02e4e4091)
2023-03-27 17:38:00 +02:00
kobewi
94e90b0593 Fix get_drag_data not overridable in some Controls
(cherry picked from commit 36141dc469)
2023-03-27 17:37:13 +02:00
Hugo Locurcio
9559bbcb18 Improve Color8 documentation
This documents in which situations Color8 is most suited and its
precision limitations.

(cherry picked from commit 4e4555bea5)
2023-03-27 17:35:47 +02:00
Mikael Hermansson
30a9b5fe9b Open up bounds of Shape3D.margin to support other physics engines
(cherry picked from commit ec6694ce3c)
2023-03-27 17:35:04 +02:00
Mikael Hermansson
465be40e10 Change documentation of Shape3D.margin to reflect current situation
(cherry picked from commit 33a6c80abb)
2023-03-27 17:34:59 +02:00
Dipal Zambare
47c3f44c0a Fix typo in the type-safe examples
Fix type in the type-safe examples of snapped, lerp and sign function.

(cherry picked from commit 8901986d56)
2023-03-27 17:33:49 +02:00
kleonc
8575010e88 TileMapEditor Fix preview rendering and transform calculations
(cherry picked from commit 224c66324b)
2023-03-27 17:32:48 +02:00
Patrick
9278da6f9b Fix ndc calculation for LinearSceneDepth VS node in GLES3
(cherry picked from commit e3802d5b6f)
2023-03-27 17:31:54 +02:00
Ninni Pipping
b43f847808 Fix Array.slice() rounding for abs(step) != 1
(cherry picked from commit 10f385fb79)
2023-03-27 17:31:05 +02:00
smix8
ac1b26c7c5 Fix agents with disabled avoidance getting added to avoidance simulation
Fixes that agents with disabled avoidance were getting added to avoidance simulation.

(cherry picked from commit 64ce93cee9)
2023-03-27 17:30:03 +02:00
Bastiaan Olij
f089782411 XR: When an sRGB target is used, check hardware sRGB conversion
(cherry picked from commit a1a52c5ba1)
2023-03-27 17:29:30 +02:00
smix8
dd94380b11 Fix GridMap signal "cell_size_changed" disconnect error
Fixes GridMap signal "cell_size_changed" disconnect error.

(cherry picked from commit d8bad3eef5)
2023-03-27 17:28:19 +02:00
smix8
22b5f0f608 Fix GridMap free navigation RID error spam
Fixes GridMap free navigation RID error spam.

(cherry picked from commit cc02007e30)
2023-03-27 17:27:27 +02:00
Fahad Shihab
e99b184b6c Added drag and drop support for shaderinclude
Dragging and dropping now works for shader include file.

(cherry picked from commit e5601b517e)
2023-03-27 17:26:36 +02:00
Ninni Pipping
7fe9c48e2b Fix type check for max/min
(cherry picked from commit c8c43997c7)
2023-03-27 17:23:58 +02:00
Zac Luzader
fcedf5dfdf OpenXR: Enable access to the Valve Index grip force sensing
(cherry picked from commit d3b26b3261)
2023-03-27 17:22:32 +02:00
RedworkDE
c0c5bdc510 Add dedicated setter for ImageTextureLayered::_images to fix create_from_images being hidden from the C# bindings
(cherry picked from commit f540148072)
2023-03-27 17:21:29 +02:00
Rémi Verschelde
516323f4ab SCons: Cleanup pulseaudio defines for Linux
No need to define _REENTRANT manually when using the system lib,
it's part of the pkgconfig cflags.
And we were then defining PULSEAUDIO_ENABLED twice.

(cherry picked from commit a35586779e)
2023-03-27 17:20:16 +02:00
Omar Polo
597b83aedf change some sys.exit() to be fatal
- when not all freetype deps are builtin (or provided externally)
- when attempting to build on an unsupported CPU architecture

(cherry picked from commit ac04a0761e)
2023-03-27 17:19:27 +02:00
Ninni Pipping
4da5fc9203 Fix Variant hashing for floats
Incorrectly hashed floats as single precision

(cherry picked from commit e6a9e0cdec)
2023-03-27 17:18:16 +02:00
Yuri Sizov
636d7905b0 Update property keying state without a full Inspector rebuild
(cherry picked from commit f68eb4a967)
2023-03-27 17:17:19 +02:00
Nong Van Tinh
e1de9f9fc4 Fixes  gutter set width results in receiving only half of the desired size
(cherry picked from commit bb3d0fc6b7)
2023-03-27 17:16:25 +02:00
Ron B. Yeh
b54ff430aa Rename mkv_list to mvk_list (MoltenVK path list).
(cherry picked from commit 7e7ac1bb87)
2023-03-27 17:15:28 +02:00
Marius Hanl
6e85d4efea Add conversion for Vector2 method tangent() -> orthogonal()
For C# also: Perpendicular() -> Orthogonal()

(cherry picked from commit da4ec87673)
2023-03-27 17:14:42 +02:00
Hakim
60ceecb1ab Reload built in script to get its methods on signal connection
(cherry picked from commit 5aa8b9ee61)
2023-03-27 17:13:30 +02:00
bruvzg
de08766656 Fix IME position in the single window mode sub-windows.
(cherry picked from commit 3ca3ee36ab)
2023-03-27 17:12:30 +02:00
kobewi
d91a3985ae Fix EditorUndoRedoManager's handling of MERGE_ENDS
(cherry picked from commit 38c50b4ed3)
2023-03-27 17:10:54 +02:00
Ricardo Buring
68e6234595 Fix concave/convex polygon shape documentation
Removes some outdated/incorrect/duplicated info, adds correct info.
Also removes no longer applicable "editor-only helper" statements.

(cherry picked from commit e61a127042)
2023-03-27 17:10:03 +02:00
stmSi
0dab32f317 Fix Find in Files Search Results cannot open builtin script
(cherry picked from commit f1f4c5b10b)
2023-03-27 17:06:43 +02:00
necrashter
865a0b4507 Use the new API for virtual keyboard height detection on Android, bugfix
(cherry picked from commit 61549edef0)
2023-03-27 17:05:13 +02:00
bitsawer
6782cd7291 Fix several clang-tidy bool literal conversion warnings
(cherry picked from commit 1736137bc9)
2023-03-27 17:03:22 +02:00
RedworkDE
bb5a6e29ab C#: Fix building projects for MSBuild before 17.3
(cherry picked from commit 6019f497b8)
2023-03-27 17:01:56 +02:00
Raul Santos
c4618bcc1b C#: Encode GodotProjectDir as Base64 to prevent issues with special characters
(cherry picked from commit f949e94991)
2023-03-27 17:01:32 +02:00
Yuri Rubinsky
a397474bd0 Fix randfn to prevent generating of nan values
(cherry picked from commit d11bb866ff)
2023-03-27 16:59:46 +02:00
VolTer
2e37c05fe6 Make GDScript number highlighting stricter
(cherry picked from commit 952703d921)
2023-03-27 16:58:50 +02:00
Pedro J. Estébanez
46d475b067 Fix crash in resource load
(cherry picked from commit 047671df0f)
2023-03-27 16:57:35 +02:00
Bastiaan Olij
a94a2062af Add XRServer.world_origin property
(cherry picked from commit fd8f26f26e)
2023-03-27 16:56:22 +02:00
bruvzg
7a3f8a83da Fix GDExtensions library export when multiple architectures are set.
(cherry picked from commit c2d678a924)
2023-03-27 16:55:28 +02:00
bruvzg
559d09c140 [TextServer] Add mutex for FreeType face creation/deletion operations.
(cherry picked from commit c950a1ab94)
2023-03-27 16:52:57 +02:00
LandoUWB
ff125a638a Commit Fix for GLES3 point size not working
(cherry picked from commit f23f0a27c1)
2023-03-27 16:51:10 +02:00
RandomCatDude
149f16b2fa fix spotlight shadows in volumetric fog
(cherry picked from commit 59c31004f8)
2023-03-27 16:47:46 +02:00
Michael Alexsander
bf8ab62ca3 Fix GraphNode resizing when its bottom border is too thin
(cherry picked from commit c567a853db)
2023-03-27 16:45:22 +02:00
myaaaaaaaaa
6ed9e03449 Fix data races in startup/teardown
(cherry picked from commit d337ed1c64)
2023-03-27 16:43:47 +02:00
bruvzg
db3fadc560 Improve layout direction/locale automatic selection.
(cherry picked from commit 82d7923c65)
2023-03-27 16:36:53 +02:00
bruvzg
24c4b5e8ad [macOS] Re-add support for the _sc_ inside app bundle. Update docs.
(cherry picked from commit 174e0837e0)
2023-03-27 16:34:57 +02:00
Markus Sauermann
3cae980c17 Fix some ways to create inconsistent Viewport sizes
In the editor, it was possible to set the size of a `SubViewport` even
in cases where a parent `SubViewportContainer` had stretch enabled.

This PR disables editing a `SubViewport.size` while the parent disallows
it and it makes necessary adjustments during `NOTIFICATION_ENTER_TREE`.

(cherry picked from commit 34a7fc7447)
2023-03-27 16:34:05 +02:00
LandoUWB
34a087cc2c Incorporating the availability of screen and depth textures for the GLES3 backend
(cherry picked from commit 98697b05d8)
2023-03-27 16:32:25 +02:00
Eric M
74b5a0ca4f Fix cancelling selection (pressing escape) while gizmo editing making uncommitted changes.
* Pressing escape while gizmo editing will discard the changes made during that edit 'session'

(cherry picked from commit 871ddf80c0)
2023-03-27 16:29:21 +02:00
Paweł
ca0ba83f03 Fix scrolling behaviour with low page value
(cherry picked from commit 1608bea188)
2023-03-27 16:28:29 +02:00
clayjohn
5262fe21de Delete unused compression formats from .imoprt files when exporting
(cherry picked from commit dec86164e1)
2023-03-27 16:26:13 +02:00
Ricardo Buring
d8f0c2bdca Revert attempted fix of trimesh CCD
(cherry picked from commit bec1182093)
2023-03-27 16:22:22 +02:00
Rémi Verschelde
cacf49999e Bump version to 4.0.1-stable 2023-03-19 18:03:00 +01:00
Rémi Verschelde
c5aa3bd7d7 Merge pull request #75097 from YuriSizov/4.0.1-changelog
Add changelog for 4.0.1
2023-03-19 09:59:29 -07:00
Yuri Sizov
ac8f97048e Add changelog for 4.0.1 2023-03-19 12:32:10 +01:00
Rémi Verschelde
6970257cff Merge pull request #74987 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.1) - 4th batch
2023-03-16 10:44:56 -07:00
lawnjelly
c0e5879b41 Improve Vector2 / 3 / 4 normalized() classref.
Mention that the results will be unreliable with initial vector near zero.

(cherry picked from commit cca01afd82)
2023-03-16 16:46:18 +01:00
smix8
8e8ecf52cf Fix NavigationAgent3D debug path duplicated points
Fixes duplicated points in NavigationAgent3D debug path.

(cherry picked from commit 0b8798a995)
2023-03-16 16:45:16 +01:00
smix8
bea2da94da Allow negative NavigationAgent2D path debug line_width for thin lines
Allows the line_width for NavigationAgent2D path debug to go negativ for thin line rendering.

(cherry picked from commit f6a10c0565)
2023-03-16 16:45:07 +01:00
Haoyu Qiu
c6a704af2c Fix typos and inconsistencies in classref
(cherry picked from commit 57d4272984)
2023-03-16 16:43:31 +01:00
Haoyu Qiu
ef06e5d786 Fix error when opening Inspector's dots menu
When the inspector is empty, opening the "extra resource options" menu
produces a error:

> Condition "current_res.is_null()" is true.

Opening the mneu with no current resource is valid use case, so
`ERR_FAIL_COND` should not be used.

(cherry picked from commit cb0fa0ed7b)
2023-03-16 16:42:53 +01:00
clayjohn
ec5f503289 Disallow creating a project in the Home or Documents folder
Also don't prompt users to delete the project folder for now.

This is a temporary fix to ensure that users do not delete their entire home folders by mistake

(cherry picked from commit 45a26ff292)
2023-03-16 16:42:09 +01:00
Hugo Locurcio
ab12edb6c6 Add "Bbcode" -> "BBCode" editor capitalization
This property name is used in RichTextLabel.

(cherry picked from commit 81858da2e6)
2023-03-16 16:41:16 +01:00
kobewi
5faebb712e Fix MultiNodeEdit not cleared after deleting nodes
(cherry picked from commit fbffd686e2)
2023-03-16 16:40:13 +01:00
Brett Chalupa
1507bea80c Fix CharacterBody2D get_slide_collision docs
The indentation was off and the code usage was incorrect for Godot 4.0 GDScript.

(cherry picked from commit 2b6e1550ff)
2023-03-16 16:39:23 +01:00
David Snopek
1c7bd972e4 Documents the "arc-based" Quaternion constructor
(cherry picked from commit 2d6deb10b0)
2023-03-16 16:38:47 +01:00
Marius Hanl
3bb89a0911 Add conversion for common Theme Overrides
(cherry picked from commit a40f559fe2)
2023-03-16 16:37:38 +01:00
Danil Alexeev
5acc7a77fe Fix InputEventConfigurationDialog modifies original event
(cherry picked from commit 9fbf24fd5c)
2023-03-16 16:37:05 +01:00
bruvzg
577afedc40 [macOS] Remove unnecessary debug prints.
(cherry picked from commit 42a30c76d9)
2023-03-16 16:35:54 +01:00
Rémi Verschelde
d23922ffeb i18n: Sync translations with Weblate 2023-03-15 02:29:27 +01:00
Yuri Sizov
fc7adaab7b Merge pull request #74907 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.1) - 3rd batch
2023-03-14 16:00:02 +01:00
the-sink
38c0ad7c6c Redraw 2d viewport when guides are cleared
(cherry picked from commit 0c051f41b1)
2023-03-14 13:59:05 +01:00
pcamp
0cf5de8f19 Fix typo in Window class.
"event as" -> "events will be"

(cherry picked from commit 112977be26)
2023-03-14 13:59:05 +01:00
Marius Hanl
3176016528 Convert OpenSimplexNoise to FastNoiseLite
- class name and octaves property

(cherry picked from commit 862296273b)
2023-03-14 13:59:05 +01:00
Yuri Sizov
c59c68cdec Make sure Script Debugger is updated with the editor theme
(cherry picked from commit 239eb31c90)
2023-03-14 13:59:05 +01:00
clayjohn
5f6a534569 Use linear filtering without mipmaps for ProceduralSkyMaterial and PhysicalSkyMaterial
(cherry picked from commit 572ac91514)
2023-03-14 13:59:05 +01:00
justchen1369
59a78ecf5a Fix exported type for Menubar start_index
(cherry picked from commit dbfecdb3b0)
2023-03-14 13:59:04 +01:00
Dmitrii Maganov
23f2c1234c GDScript: Fix autocomplete inside a block with a type test condition
(cherry picked from commit e289a4ab2c)
2023-03-14 13:59:04 +01:00
yedpodtrzitko
5824967f2f clear filter input in Project Settings when opening Layers
(cherry picked from commit e13bcf5b84)
2023-03-14 13:59:04 +01:00
Mikael Hermansson
7ac80569b3 Fix extension bindings for motion collision/result structs
(cherry picked from commit be64ffd25d)
2023-03-14 13:59:04 +01:00
Haoyu Qiu
38ad9c52b2 Add missing TTRs in tiles editor and array inspector
(cherry picked from commit bef7f14885)
2023-03-14 13:59:04 +01:00
Rémi Verschelde
9e5e6568b7 Vulkan: Fix VMA build with GCC 13
Fixes #74647.

(cherry picked from commit b113e6d4ff)
2023-03-14 13:59:04 +01:00
Hayden Leete
26ab941507 Fix errors when closing floating docks
dock->get_index() on line 4463 was not behaving as expected
due to dock having an internal sibling, so now we just get the
index excluding internal nodes.

line 4742 would throw an error if you made multiple docks
floating then redocked the end docks first, but no longer

(cherry picked from commit 21578e0bb4)
2023-03-14 13:59:04 +01:00
Hugo Locurcio
10424abb29 Tweak command syntax in Vulkan renderer failure message
This quotes the executable name so that copying it always works
(even if the path contains spaces).

The command is also indented from the rest of the text and is
no longer single-quoted, as that can prevent the command from
running if the line is copied in its entirety (with the quotes).

(cherry picked from commit ddc9cc3e49)
2023-03-14 13:59:04 +01:00
Chris Weber
006410ae46 increased max touches to 32 for ios
(cherry picked from commit 54bd204377)
2023-03-14 13:59:04 +01:00
Hugo Locurcio
e79477a4b5 Document using String.uri_encode() with OS.shell_open()
(cherry picked from commit 81ac3c3e71)
2023-03-14 13:59:04 +01:00
bruvzg
0c1abbd79e [Linux/X11] Add some missing keycodes/scancodes.
(cherry picked from commit 5d35c600d5)
2023-03-14 13:59:04 +01:00
VolTer
5ae484c138 Fix error spam when naming a func at the end of the script
(cherry picked from commit 07dd627728)
2023-03-14 13:59:03 +01:00
RedworkDE
f9bb1d3174 Fix buffer overrun in CPUParticles3D
(cherry picked from commit 89980dd9c9)
2023-03-14 13:59:03 +01:00
Haoyu Qiu
b4a1bfd6d5 Fix coloring of the renderer options button
(cherry picked from commit ac7a4f6e87)
2023-03-14 13:59:03 +01:00
Johan Aires Rastén
4ff705b37e Fix instance uniforms breaking when setting a new mesh.
Fixes #58113

(cherry picked from commit 26aecbfe57)
2023-03-14 13:59:03 +01:00
Ryan Roden-Corrent
47dc4bc307 Don't unset local_coords on starting transform.
This fixes a bug introduced by 806425621c, where dragging the gizmo no longer respected local transforms.

I'm not sure why I called set_local_coords_enabled(false) in _compute_edit. Removing this line seems to fix gizmo-dragging local transforms, without breaking anything else.

I also noticed that confirming a transform leaves the gizmo axis lines on the screen. This is fixed by calling update_transform_gizmo after clearing the edit mode/instant flags, so update_transform_gizmo knows not to render any axes.

(cherry picked from commit d3d1223b97)
2023-03-14 13:59:03 +01:00
clayjohn
08845dc3f0 Propogate errors when creating an OpenGL context fails in X11
(cherry picked from commit e7ea3ef531)
2023-03-14 13:59:03 +01:00
SlugFiller
d508d0a642 Fixes a canvas item set to clip children being drawn as black if no children are visible
(cherry picked from commit f25508befb)
2023-03-14 13:59:03 +01:00
SlugFiller
18bf2663f9 Fix AABB calculation for meshes using Skeleton2D
(cherry picked from commit 06a1fe0364)
2023-03-14 13:59:03 +01:00
Johan Aires Rastén
d229ca2f27 Fixed incorrect ERROR message when setting new PrimitiveMesh
If calling set_mesh with a PrimitiveMesh that has pending update, the
_mesh_changed function would be called twice. The first time before
set_base had been called, which could lead to an ERROR message about
trying to set an invalid surface override material.

(cherry picked from commit 007b488a5c)
2023-03-14 13:59:03 +01:00
Ryan Roden-Corrent
89a40d317d Disable local space for blender transforms.
Having local_space enabled when starting a transform changed the
behavior of VIEW space transforms. Now we disable local_space when
starting a blender transform (there was already logic to restore the
setting after the transform ends).

This also hides the gizmo while performing a blender transform,
otherwise the user will see it snap back and forth between the local and
global alignment. I think the transform looks cleaner with the gizmo
hidden anyways.

Fixes #59392.

(cherry picked from commit 806425621c)
2023-03-14 13:59:03 +01:00
Rindbee
323c3f80c5 Fix broken shortcut key input
(cherry picked from commit 91e460d500)
2023-03-14 13:59:03 +01:00
Jakub Mateusz Marcowski
5a7624e50f Modify JSON.stringify so that it doesn't create unnecessary empty lines from empty arrays
(cherry picked from commit 0a55a32085)
2023-03-14 13:59:03 +01:00
Rémi Verschelde
7e74568709 FBX: Disable importer when canceling FBX2glTF setup
Pretty hacky solution but it's better than an infinite loop.

All this import setup needs to be redone, it's very difficult to properly
bail out from an invalid import without triggering reimport loops.

Also fix underline not visible at default editor scale in LinkButton.

Fixes #73319.

(cherry picked from commit d81e6ee024)
2023-03-14 13:59:02 +01:00
clayjohn
278fc7538d Avoid overflow when calculating ptr address for 3D textures in RenderingDevice texture update
(cherry picked from commit 06042a23b6)
2023-03-14 13:59:02 +01:00
Yuri Sizov
258ea41ffa Merge pull request #74884 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.1) - 2nd batch
2023-03-14 13:57:36 +01:00
Yuri Sizov
84e9a79ace Add missing handler for removing font sizes in Themes
(cherry picked from commit 5a3dbea3ed)
2023-03-13 22:22:05 +01:00
clayjohn
a41a813af4 Set properties of ImageTexture3D when creating
(cherry picked from commit e9d80a821d)
2023-03-13 22:20:32 +01:00
juliuse98
e3e117cac5 Fix blend-file import when using custom color management in blender
When using custom color management in blender the --version command will
output additional information infront of the "normal" output and this
prevented the import.

Fixes #74439.

(cherry picked from commit 7a0d12182e)
2023-03-13 22:19:36 +01:00
bruvzg
494449f212 [TextServer] Fix justification on punctuation characters.
(cherry picked from commit 016b2f3555)
2023-03-13 22:18:04 +01:00
smix8
069c48bfdc Fix NavigationServer free error print
Fixes error print for NavigationServer free when a RID can not be found.

(cherry picked from commit 73dc680fc1)
2023-03-13 22:12:27 +01:00
Ninni Pipping
75e078d885 Fix type icons in PropertySelector
And adding a check to prevent future issues.

(cherry picked from commit ca86d53e7f)
2023-03-13 22:11:46 +01:00
Thomas Lobig
a755ac856a remove incorrect rename of get_used_cells_by_id
renaming get_used_cells_by_id to get_used_cells is not only unecessary, it introduces hard to debug issues

(cherry picked from commit d6a2197b3d)
2023-03-13 22:10:04 +01:00
bruvzg
34c909b41e [TextEdit] Do not draw virtual spaces (word break / justification points).
(cherry picked from commit 25bc62ad13)
2023-03-13 22:09:27 +01:00
Rémi Verschelde
b1c8a40853 Windows: Workaround missing DWRITE_FONT_WEIGHT value in old MinGW
Fixes #74339.

(cherry picked from commit b7ecb9584a)
2023-03-13 22:06:14 +01:00
Hakim
90dbf3bd38 Get the unlit / unshaded extension when importing GLTF and set it when exporting
(cherry picked from commit e14fa5532b)
2023-03-13 22:05:07 +01:00
bruvzg
4cce358241 [Windows] Update modifier key status during IME input.
(cherry picked from commit ba995c6ea1)
2023-03-13 22:04:08 +01:00
bruvzg
ef3f1d426d [Web] Fix some missing keycode mappings.
(cherry picked from commit 0b0587af97)
2023-03-13 22:00:15 +01:00
clayjohn
bc6743c96d Add proper default texture filter and repeat modes for Canvas shaders in the OpenGL3 renderer
(cherry picked from commit 46b416f3b1)
2023-03-13 21:58:51 +01:00
Haoyu Qiu
050ec70ea4 Notify child controls when BackBufferCopy's rect changed
(cherry picked from commit 602a0d2fbc)
2023-03-13 21:57:20 +01:00
RedworkDE
20eeb7c66d C#: Get singleton instances using the Core name
(cherry picked from commit 16a2a164fe)
2023-03-13 21:56:31 +01:00
Raul Santos
ad6fa1cd25 C#: Ignore explicit interface implementations
(cherry picked from commit 0372bd56b6)
2023-03-13 21:55:11 +01:00
Dmitrii Maganov
079c8ea719 GDScript: Fix checking if a call is awaited in compiler
(cherry picked from commit 55a2ad25bf)
2023-03-13 21:54:05 +01:00
Aleks Rutins
782e1fe84e Validate that C# class names are valid identifiers
(cherry picked from commit ae8752a731)
2023-03-13 21:52:44 +01:00
Fabio Iotti
01324f025a Error on hint_normal_roughness_texture and hint_depth_texture outside of spatial shader
(cherry picked from commit 528e0d095e)
2023-03-13 21:51:36 +01:00
Rémi Verschelde
c6f7675b1f Linux: Don't try to link system embree3 on unsupported archs
(cherry picked from commit afb8693715)
2023-03-13 21:49:15 +01:00
Bastiaan Olij
c8f64c68a5 Use MSAA 2D texture in multipass tonemapper
(cherry picked from commit 903aa0e385)
2023-03-13 21:48:02 +01:00
kobewi
4e90cc55ec Check for type mismatch in PropertyTweener.from()
(cherry picked from commit 45f4d59fa4)
2023-03-13 21:45:34 +01:00
clayjohn
925381201b Add a few more rendering timestamps
(cherry picked from commit 1adc4e5875)
2023-03-13 21:43:38 +01:00
bruvzg
48a639f4a5 [Bitmap font] Assume outline size is 1 if it's not set, but channel for outline is defined.
(cherry picked from commit 67762ec4a6)
2023-03-13 21:41:21 +01:00
bruvzg
57dc060879 Fix Windows to Windows SSH remote deploy. Fix Windows execute exit code.
(cherry picked from commit 94355249c3)
2023-03-13 21:37:41 +01:00
Arman Elgudzhyan
7e6bc72f7c Don't autocomplete numbers in GDScript
Cancel code autocompletion when a numerical value is entered. Avoids interference when setting numbers.

(cherry picked from commit 688d00b706)
2023-03-13 21:35:23 +01:00
clayjohn
13b37a50ae Add parentheses around arguments when converting xform
(cherry picked from commit 3ee5fbdb73)
2023-03-13 21:33:35 +01:00
Ryan Roden-Corrent
81f4996683 Add some missing renames to 3to4 tool.
MultiplayerPeerExtension isn't an exact replacement for
NetworkedMultiplayerCustom, but at least it gets you moving in the right direction.

Engine.editor_hint couldn't be fixed by the renames map, because you have to add a `()` at the end.

(cherry picked from commit 6b17c2b6e7)
2023-03-13 21:32:51 +01:00
Ryan Roden-Corrent
06e2c6ace2 Move tool declarations to top in 3to4.
In godot3, `tool` can follow keywords like `extends` and `class_name`
In godot4, `@tool` must be the first line in the file.

(cherry picked from commit 9a474fb99f)
2023-03-13 21:31:53 +01:00
Marius Hanl
9fff0fcbb5 Project Converter: Do not convert lines that start with a comment
Lines that start with # or // are ignored

(cherry picked from commit 8cf7ac3a45)
2023-03-13 21:31:23 +01:00
Ninni Pipping
f6709a1fda Add keycode project conversion
(cherry picked from commit fec630f360)
2023-03-13 21:28:58 +01:00
Marcus Elg
6041ad5c70 Fix Camera2D position smoothing properties not being grouped
(cherry picked from commit a835dfd96d)
2023-03-13 21:25:14 +01:00
Ryan Roden-Corrent
6cd227a35c Correct superclass constructors in 3to4.
Fixes #70542.

The 3to4 conversion tool was not handling superclass constructors.
We should translate the godot3 syntax:

```gdscript
func _init(a,b,c).(a,b,c):
    pass

func _init(a,b,c):
    super(a,b,c)
```

Originally, the _init conversion was intended to remove `void` return types from _init functions, as this was disallowed due to #50589.
As that was resolved by #53366, I removed that part of the conversion logic. If a void return type is present on a constructor, the converter now leaves it.

Here's a sample diff from my own project:

```diff
@@ -103,10 +105,11 @@ class Real:
 class Text:
        extends Setting

-       var choices: PoolStringArray
-       var value: String setget set_value, get_value
+       var choices: PackedStringArray
+       var value: String : get = get_value, set = set_value

-       func _init(section: String, key: String, default: String, choice_list: Array).(section, key, default) -> void:
+       func _init(section: String, key: String, default: String, choice_list: Array) -> void:
+               super(section, key, default)
                choices = choice_list

        func normalize(val):
@@ -129,9 +132,10 @@ class Text:
 class Boolean:
        extends Setting

-       var value: bool setget set_value, get_value
+       var value: bool : get = get_value, set = set_value

-       func _init(section: String, key: String, default: bool).(section, key, default) -> void:
+       func _init(section: String, key: String, default: bool) -> void:
+               super(section, key, default)
                pass
```

(cherry picked from commit 53a00abb11)
2023-03-13 21:19:53 +01:00
Ryan Roden-Corrent
1421838ba7 Don't strip whitespace when converting 3to4.
Fixes #74204.

The style guide says

> Always use one space around operators and after commas

The 3to4 conversion tool currently strips space in certain scenarios.
I've updated it to add space whenever it is generating new code.
In any case where it substitutes existing code, it leaves it as-is.

For example, connect(a,b,c) becomes `connect(a, callable(b, c))`, because the converter is adding new commads/parens.

However, `xform(Vector3(a,b,c))` becomes `Transform * Vector3(a,b,c)` because it uses the user's original Vector3 string whole. If the user originally had `xform(Vector3(a, b, c))`, then it becomes `Transform * Vector3(a, b, c)`.

Ideally we'd always preserve original formatting, but this seems quite difficult, so I tried to preserve it where we can, but air on the side of following the style guide whenever we're transforming code.

(cherry picked from commit d3684e662f)
2023-03-13 21:18:53 +01:00
Yuri Sizov
30e81fcc26 Merge pull request #74866 from YuriSizov/4.0-cherrypicks
Cherry-picks for the 4.0 branch (future 4.0.1) - 1st batch
2023-03-13 16:58:31 +01:00
Ninni Pipping
857cd853de Fix TileSetEditor paiting texture_origin Vector2i
(cherry picked from commit fb317546fe)
2023-03-13 14:52:22 +01:00
Raul Santos
1640b1a150 C#: Always show "Create C# solution" option
Prevents ending up with an empty C# menu.
The option to create the C# solution no longer disappears, to avoid confusing users.
If an user tries to use it when a C# solution already exists they are warned that it will override their sln and csproj files.

(cherry picked from commit a1a2fc2255)
2023-03-13 14:50:57 +01:00
Haoyu Qiu
093d237138 Fix dock name lost translation after layout change
* After you click in the dock select panel
* After you load an editor layout

(cherry picked from commit 43bf0ca8d2)
2023-03-13 14:49:17 +01:00
bruvzg
764fe8ac51 Automatically reparent editor message dialogs to avoid error spam.
(cherry picked from commit 921f3b7589)
2023-03-13 14:48:33 +01:00
SaracenOne
d929784491 Stop toaster notification circle flickering when notifications are all hidden.
(cherry picked from commit ab61624c78)
2023-03-13 14:47:14 +01:00
Niels Drost
94db7f866b TileSet editor was out of sync with TileMap and incorrectly overwrote old selected TileSet after an edit call with a null pointer.
(cherry picked from commit 66374c8dce)
2023-03-13 14:45:26 +01:00
Danil Alexeev
f4ea9df0f4 Fix GDScript code style regarding colon
(cherry picked from commit ea5fd3d732)
2023-03-13 14:42:27 +01:00
Isaac Clerencia
acdb1bdbd7 Clarify Thread documentation
The current documentation uses the term "running" for two different things.

In the description of get_id() it claims "it will return empty string if the thread is not running", but it actually will return the thread id until wait_to_finish is called.

In the description of is_alive() it claims "it will return true if the thread is running", but in this case it means "the provided function hasn't finished running yet".

Updated the functions documentation slighly to make this clear.

(cherry picked from commit 2a4f38d54f)
2023-03-13 14:41:26 +01:00
Aaron Franke
9e6f0ee9c7 Document GLTFNode and some of GLTFState
(cherry picked from commit 2cc22fb964)
2023-03-13 14:40:30 +01:00
BrunoSXS
3aa3fb8771 Fix for AABB methods with wrong description
(cherry picked from commit df0de07494)
2023-03-13 14:38:17 +01:00
kobewi
9997250051 Discourage reusing Tweens
(cherry picked from commit 9785b23a0a)
2023-03-13 14:34:08 +01:00
themancalledjakob
e043484d36 improve documentation for Font and FontVariation
Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
(cherry picked from commit fb5c2d9f75)
2023-03-13 14:33:24 +01:00
Andreas Raddau
a026669cc5 Fixed minor typo in turbulence documentation
(cherry picked from commit c618f9fce2)
2023-03-13 14:30:21 +01:00
kobewi
4bd16e6493 Safeguard Makefile commands
(cherry picked from commit d29030fdd0)
2023-03-13 14:29:23 +01:00
JustKoi
ed139593bf Fix small mistake in Window.xml
Fix small mistake in Window.xml

(cherry picked from commit 7f8425d6fb)
2023-03-13 14:28:35 +01:00
George Marques
b880bde10f Remove outdated note about const in Dictionary and Array docs
(cherry picked from commit d2b1d6e69b)
2023-03-13 14:27:48 +01:00
Haoyu Qiu
80cde341d4 Fix various typos in the classref
(cherry picked from commit 03fcac3aa5)
2023-03-13 14:27:06 +01:00
titus125
8732a8af47 Fixed typos in the Transform2D and Transform3D class reference
(cherry picked from commit 36270d39d2)
2023-03-13 14:26:29 +01:00
Ninni Pipping
8dca093d97 Document editor/naming/scene_name_casing setting
Moved definitions of editor related project settings to `editor/register_editor_types.cpp` to make documentation work.

(cherry picked from commit 3de5332fcb)
2023-03-13 14:25:46 +01:00
Malcolm Nixon
5180116c07 Fix null-pointer dereference on Android systems when using gl_compatibility renderer.
(cherry picked from commit d186b7438f)
2023-03-13 14:22:45 +01:00
RedworkDE
0112862e70 C#: Fix crash when errors occur before language initialization.
(cherry picked from commit c0ebc28136)
2023-03-13 14:21:06 +01:00
Yuri Sizov
234c601a61 Improve logic related to editing audio buses (and prevent crashes)
(cherry picked from commit 68c18c0e2b)
2023-03-13 14:19:41 +01:00
Yuri Sizov
3c2e952889 Prevent crashing on startup if project has scripted theme types
Also avoid order of operation conflicts by moving C# binding generation hook to main.cpp

(cherry picked from commit 8402927d3f)
2023-03-13 14:18:32 +01:00
bruvzg
d83245f2f9 [TextServer] Add invalid font scaling check, restrict Linux/BSD system fonts lookup to TrueType/CFF only.
(cherry picked from commit 8d501a2dc3)
2023-03-13 14:17:42 +01:00
Yuri Sizov
048c252602 Prevent cache corruption when saving resources in the editor
(cherry picked from commit 496bd94c21)
2023-03-13 14:16:13 +01:00
Hayden Leete
7490f89238 Fix crash when revealing file in floating FileSystem Dock
When selecting "Show in FileSystem" from the context menu of a resource
in the inspector, the engine would crash if the FileSystem dock was
floating because it was trying to focus the FileSystem tab, but floating
docks don't use Tab Containers. This commit makes the FileSystem dock's
window grab focus instead if it's floating.

(cherry picked from commit c4d1513e15)
2023-03-13 14:15:18 +01:00
Paweł Fertyk
41f4068a6e Fix RichTextLabel crash with out of bound exception
Fixes #68242.

(cherry picked from commit 44592c8c19)
2023-03-13 14:13:36 +01:00
Yuri Sizov
755a86f502 Generate empty textures for theme icons if the SVG module is disabled
(cherry picked from commit 64215ad119)
2023-03-13 14:12:44 +01:00
Haoyu Qiu
2d0d07f51b Fix crash when dumping extension API in a non-writable directory
(cherry picked from commit 49400e0c1c)
2023-03-13 14:11:24 +01:00
clayjohn
5662542526 Avoid copying CanvasTexture when updating proxy
(cherry picked from commit 84482ef90b)
2023-03-13 14:10:38 +01:00
bruvzg
1d21652f80 [Linux/X11] Check if required xkb functions exist before using it.
(cherry picked from commit 8a675f3824)
2023-03-13 14:08:31 +01:00
Nicholas Huelin
f55c61d601 Modify the default theme GraphNode close_h_offset
Modifies the close_h_offset to be 12 instead of 22. This better aligns the default position.

(cherry picked from commit 961d6763fb)
2023-03-13 14:06:08 +01:00
bruvzg
466d226a4a [TextServer] Ensure ICU data is initialised only one and cleaned only at exit.
(cherry picked from commit 7f24433e15)
2023-03-13 14:04:41 +01:00
Abdulrahman Al Zeidi
e290448fe3 Fix glTF mesh importer not freeing nodes correctly on import
(cherry picked from commit 5e0641ea9a)
2023-03-13 14:00:38 +01:00
Yuri Sizov
eb503fb461 Merge pull request #74750 from YuriSizov/project-manager-lighten-up-4.0
[4.0] Ensure that editor color map is initialized in the project manager
2023-03-13 13:48:33 +01:00
Yuri Sizov
671f8eb790 Ensure that editor color map is initialized in the project manager 2023-03-11 02:04:54 +01:00
Haoyu Qiu
17a130cbd1 Fix "Convert Full Project" button not translated
Also fixes a typo in the CHANGELOG.

(cherry picked from commit e03bfd6f7f)
2023-03-06 10:10:02 +01:00
Rémi Verschelde
47114a77f8 CI: Pin SCons to 4.4.0, the new 4.5.0 is broken
(cherry picked from commit 85bb561713)
2023-03-06 10:08:43 +01:00
Rémi Verschelde
284a1b6a6e Bump version to 4.0.1-rc 2023-03-01 14:09:30 +01:00
977 changed files with 174633 additions and 48511 deletions

View File

@@ -23,5 +23,5 @@ runs:
shell: bash
run: |
python -c "import sys; print(sys.version)"
python -m pip install scons
python -m pip install scons==4.4.0
scons --version

View File

@@ -1,10 +1,11 @@
name: 🤖 Android Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
concurrency:

View File

@@ -1,10 +1,11 @@
name: 🍏 iOS Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no module_text_server_fb_enabled=yes
concurrency:

View File

@@ -1,10 +1,11 @@
name: 🐧 Linux Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key, and godot-cpp checkout. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
@@ -181,6 +182,7 @@ jobs:
uses: actions/checkout@v3
with:
repository: godotengine/godot-cpp
ref: ${{ env.GODOT_BASE_BRANCH }}
submodules: 'recursive'
path: 'godot-cpp'

View File

@@ -1,10 +1,11 @@
name: 🍎 macOS Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
concurrency:

41
.github/workflows/runner.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: 🔗 GHA
on: [push, pull_request]
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-runner
cancel-in-progress: true
jobs:
static-checks:
name: 📊 Static checks
uses: ./.github/workflows/static_checks.yml
android-build:
name: 🤖 Android
needs: static-checks
uses: ./.github/workflows/android_builds.yml
ios-build:
name: 🍏 iOS
needs: static-checks
uses: ./.github/workflows/ios_builds.yml
linux-build:
name: 🐧 Linux
needs: static-checks
uses: ./.github/workflows/linux_builds.yml
macos-build:
name: 🍎 macOS
needs: static-checks
uses: ./.github/workflows/macos_builds.yml
windows-build:
name: 🏁 Windows
needs: static-checks
uses: ./.github/workflows/windows_builds.yml
web-build:
name: 🌐 Web
needs: static-checks
uses: ./.github/workflows/web_builds.yml

View File

@@ -1,5 +1,6 @@
name: 📊 Static Checks
on: [push, pull_request]
on:
workflow_call:
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-static
@@ -7,37 +8,62 @@ concurrency:
jobs:
static-checks:
name: Static Checks (clang-format, black format, file format, documentation checks)
runs-on: ubuntu-20.04
name: Code style, file formatting, and docs
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install dependencies
- name: Install APT dependencies
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: dos2unix libxml2-utils moreutils
- name: Install Python dependencies and general setup
run: |
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main"
sudo apt-get install -qq dos2unix clang-format-15 libxml2-utils python3-pip moreutils
sudo update-alternatives --remove-all clang-format || true
sudo update-alternatives --install /usr/bin/clang-format clang-format /usr/bin/clang-format-15 100
sudo pip3 install black==22.3.0 pygments pytest==7.1.2 mypy==0.971
pip3 install black==22.3.0 pytest==7.1.2 mypy==0.971
git config diff.wsErrorHighlight all
- name: Get changed files
id: changed-files
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
files=$(gh pr diff ${{ github.event.pull_request.number }} --name-only)
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
echo "$files" >> changed.txt
cat changed.txt
files=$(echo "$files" | grep -v 'thirdparty' | xargs -I {} sh -c 'echo "./{}"' | tr '\n' ' ')
echo "CHANGED_FILES=$files" >> $GITHUB_ENV
- name: File formatting checks (file_format.sh)
run: |
bash ./misc/scripts/file_format.sh
bash ./misc/scripts/file_format.sh changed.txt
- name: Header guards formatting checks (header_guards.sh)
run: |
bash ./misc/scripts/header_guards.sh
bash ./misc/scripts/header_guards.sh changed.txt
- name: Python style checks via black (black_format.sh)
run: |
bash ./misc/scripts/black_format.sh
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
bash ./misc/scripts/black_format.sh
else
echo "Skipping Python formatting as no Python files were changed."
fi
- name: Python scripts static analysis (mypy_check.sh)
run: |
bash ./misc/scripts/mypy_check.sh
if grep -qE '\.py$|SConstruct|SCsub' changed.txt || [ -z "$(cat changed.txt)" ]; then
bash ./misc/scripts/mypy_check.sh
else
echo "Skipping Python static analysis as no Python files were changed."
fi
- name: Python builders checks via pytest (pytest_builders.sh)
run: |
@@ -45,10 +71,14 @@ jobs:
- name: JavaScript style and documentation checks via ESLint and JSDoc
run: |
cd platform/web
npm ci
npm run lint
npm run docs -- -d dry-run
if grep -q "platform/web" changed.txt || [ -z "$(cat changed.txt)" ]; then
cd platform/web
npm ci
npm run lint
npm run docs -- -d dry-run
else
echo "Skipping JavaScript formatting as no Web/JS files were changed."
fi
- name: Class reference schema checks
run: |
@@ -60,16 +90,21 @@ jobs:
- name: Style checks via clang-format (clang_format.sh)
run: |
bash ./misc/scripts/clang_format.sh
clang-format --version
bash ./misc/scripts/clang_format.sh changed.txt
- name: Style checks via dotnet format (dotnet_format.sh)
run: |
bash ./misc/scripts/dotnet_format.sh
if grep -q "modules/mono" changed.txt || [ -z "$(cat changed.txt)" ]; then
bash ./misc/scripts/dotnet_format.sh
else
echo "Skipping dotnet format as no C# files were changed."
fi
- name: Spell checks via codespell
if: github.event_name == 'pull_request' && env.CHANGED_FILES != ''
uses: codespell-project/actions-codespell@v1
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
check_hidden: false
ignore_words_list: curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,nd,numer,ot,te
only_warn: true
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,nd,numer,ot,te,vai"
path: ${{ env.CHANGED_FILES }}

View File

@@ -1,10 +1,11 @@
name: 🌐 Web Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes debug_symbols=no
EM_VERSION: 3.1.18
EM_CACHE_FOLDER: "emsdk-cache"
@@ -22,7 +23,7 @@ jobs:
- uses: actions/checkout@v3
- name: Set up Emscripten latest
uses: mymindstorm/setup-emsdk@v11
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

View File

@@ -1,11 +1,12 @@
name: 🏁 Windows Builds
on: [push, pull_request]
on:
workflow_call:
# Global Settings
# SCONS_CACHE for windows must be set in the build environment
env:
# Only used for the cache key. Increment version to force clean build.
GODOT_BASE_BRANCH: master
# Used for the cache key. Add version suffix to force clean build.
GODOT_BASE_BRANCH: '4.0'
SCONSFLAGS: verbose=yes warnings=extra werror=yes module_text_server_fb_enabled=yes
SCONS_CACHE_MSVC_CONFIG: true
@@ -30,7 +31,7 @@ jobs:
sconsflags: debug_symbols=no vsproj=yes
bin: "./bin/godot.windows.editor.x86_64.exe"
- name: Template (target=template_release, tools=no)
- name: Template (target=template_release)
cache-name: windows-template
target: template_release
tests: false

4
.gitignore vendored
View File

@@ -63,6 +63,10 @@ tests/data/*.translation
# Binutils tmp linker output of the form "stXXXXXX" where "X" is alphanumeric
st[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]
# Python development
.venv
venv
# Python generated
__pycache__/
*.pyc

View File

@@ -4,6 +4,672 @@ 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.0.3] - 2023-05-19
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-3) for details.
### Added
#### 2D
- Add info label to TileMap editor ([GH-68800](https://github.com/godotengine/godot/pull/68800)).
#### Documentation
- Create an "Editor-only" section in the online class reference ([GH-76410](https://github.com/godotengine/godot/pull/76410)).
- Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation ([GH-76008](https://github.com/godotengine/godot/pull/76008)).
#### Editor
- Properly remember snapping options per-project ([GH-74682](https://github.com/godotengine/godot/pull/74682)).
- Remember directory when installing templates file ([GH-74735](https://github.com/godotengine/godot/pull/74735)).
- Improve editor state initialization ([GH-75563](https://github.com/godotengine/godot/pull/75563)).
#### GUI
- Allow entering named colors in ColorPicker's hex field ([GH-75905](https://github.com/godotengine/godot/pull/75905)).
#### Navigation
- Expose NavigationAgent path postprocessing and pathfinding algorithm options ([GH-75326](https://github.com/godotengine/godot/pull/75326)).
#### Physics
- Warn when a concave polygon is assigned to ConvexPolygonShape2D ([GH-56671](https://github.com/godotengine/godot/pull/56671)).
#### Rendering
- Expose viewports render target RID ([GH-75517](https://github.com/godotengine/godot/pull/75517)).
- Allow creation of rendering buffers at any time ([GH-75937](https://github.com/godotengine/godot/pull/75937)).
### Changed
#### 3D
- Use physical shortcuts for freelook navigation in the editor ([GH-73651](https://github.com/godotengine/godot/pull/73651)).
#### Buildsystem
- Err when trying to build the editor without its required modules ([GH-74980](https://github.com/godotengine/godot/pull/74980)).
- Enable shadow warnings and fix raised errors ([GH-76946](https://github.com/godotengine/godot/pull/76946)).
#### C#/.NET
- Truncate instead of round in Vector2/3/4 to Vector2I/3I/4I conversion ([GH-75477](https://github.com/godotengine/godot/pull/75477)).
#### Core
- Lift restriction that resource load thread requester has to be the initiator ([GH-73862](https://github.com/godotengine/godot/pull/73862)).
- Rename internal root canvas group to start with underscore ([GH-76149](https://github.com/godotengine/godot/pull/76149)).
- Make acos and asin safe ([GH-76906](https://github.com/godotengine/godot/pull/76906)).
#### Documentation
- Exclude overridden properties from Property Descriptions section ([GH-77027](https://github.com/godotengine/godot/pull/77027)).
#### Editor
- Prevent off-screen controls in editor ([GH-73646](https://github.com/godotengine/godot/pull/73646)).
- Re-enable script editor File menu shortcuts when the menu is hidden ([GH-74319](https://github.com/godotengine/godot/pull/74319)).
- Prevent color conversion of the big Godot logo ([GH-75653](https://github.com/godotengine/godot/pull/75653)).
- Set font sizes for various styles in editor output panel ([GH-75780](https://github.com/godotengine/godot/pull/75780)).
- Adjust size of some dialogs ([GH-75895](https://github.com/godotengine/godot/pull/75895)).
- Change cursor consistently when panning in the 2D Editor ([GH-75997](https://github.com/godotengine/godot/pull/75997)).
- Validate renderer selection in project manager and expose default renderer setting as an enum ([GH-76331](https://github.com/godotengine/godot/pull/76331)).
- Close built-in shaders when closing scene ([GH-75864](https://github.com/godotengine/godot/pull/75864)).
- Command Palette search now also uses original English command names ([GH-76523](https://github.com/godotengine/godot/pull/76523)).
- Preserve scene unique names when saving branch as scene ([GH-76609](https://github.com/godotengine/godot/pull/76609)).
#### GUI
- Ignore invisible children of GraphNode for minimum size ([GH-72240](https://github.com/godotengine/godot/pull/72240)).
- Update `TextureProgressBar` upon texture changes ([GH-75532](https://github.com/godotengine/godot/pull/75532)).
- Keep a copy of UTF-8 XML source string during the SVG font processing ([GH-75675](https://github.com/godotengine/godot/pull/75675)).
- Always cache parent visibility in `CanvasItem` ([GH-75890](https://github.com/godotengine/godot/pull/75890)).
- Improve BiDi error handling in TextServer ([GH-75922](https://github.com/godotengine/godot/pull/75922)).
- Use dedicated flag for object replacement characters in TextServer ([GH-75974](https://github.com/godotengine/godot/pull/75974)).
- Improve line BiDi handling, prevent crash on recursive log updates ([GH-75975](https://github.com/godotengine/godot/pull/75975)).
- Don't apply scale to autohide theme property ([GH-75993](https://github.com/godotengine/godot/pull/75993)).
#### Import
- gltf: Remove obsolete hack to embed gltf textures in advanced import ([GH-75636](https://github.com/godotengine/godot/pull/75636)).
- Expose more compression formats in Image and fix compress check ([GH-76014](https://github.com/godotengine/godot/pull/76014)).
- Use DXT1 when compressing PNGs with RGB format ([GH-76516](https://github.com/godotengine/godot/pull/76516)).
- gltf: Permit sparse accessors without a bufferView ([GH-76875](https://github.com/godotengine/godot/pull/76875)).
#### Networking
- Poll LSP/DAP clients for connection status updates ([GH-75850](https://github.com/godotengine/godot/pull/75850)).
#### Particles
- Translate inactive GPUParticles3D particles to -INF ([GH-75162](https://github.com/godotengine/godot/pull/75162)).
- Use `angle_rand` to calculate `base_angle` in particles process material ([GH-75999](https://github.com/godotengine/godot/pull/75999)).
- Don't store instance transform origin in RD 3D renderer unless requested ([GH-76003](https://github.com/godotengine/godot/pull/76003)).
#### Physics
- Modify `contact_max_allowed_penetration` precision to 3 significant digits ([GH-75665](https://github.com/godotengine/godot/pull/75665)).
#### Porting
- Android: Downgrade Android gradle plugin to version 7.2.1 ([GH-76325](https://github.com/godotengine/godot/pull/76325)).
- Linux: Ensure WindowData minimized/maximized are mutually exclusive ([GH-76868](https://github.com/godotengine/godot/pull/76868)).
- Linux: Don't use udev for joypad hotloading when running in a sandbox ([GH-76961](https://github.com/godotengine/godot/pull/76961)).
- Windows: Support long path in file access ([GH-76739](https://github.com/godotengine/godot/pull/76739)).
#### Rendering
- Recreate swap chain when suboptimal to avoid error spam ([GH-72859](https://github.com/godotengine/godot/pull/72859)).
- Use `MODELVIEW_MATRIX` when on double precision ([GH-75462](https://github.com/godotengine/godot/pull/75462)).
- Check for instancing without relying on `instance_count` when drawing 2D meshes ([GH-75954](https://github.com/godotengine/godot/pull/75954)).
#### Shaders
- Write out `render_mode` even when mode is set to default in VisualShaders ([GH-75957](https://github.com/godotengine/godot/pull/75957)).
#### Thirdparty
- astcenc updated to 4.4.0.
- doctest updated to 2.4.11.
- mbedtls updated to 2.28.3.
- thorvg updated to 0.9.0.
- CA root certificates updated to 2023-03-23 bundle from Mozilla.
### Fixed
#### 2D
- Fix RemoteTransform2D could fail to update AnimatableBody2D's position or rotation ([GH-75487](https://github.com/godotengine/godot/pull/75487)).
- Fix rendering odd-sized tiles ([GH-74814](https://github.com/godotengine/godot/pull/74814)).
- Fix TouchScreenButton not redrawn when texture changes ([GH-75016](https://github.com/godotengine/godot/pull/75016)).
#### 3D
- 3D: Fixes to CSG robustness ([GH-74771](https://github.com/godotengine/godot/pull/74771)).
- 3D: Fix infinite loop in CSG `Build2DFaces::_find_edge_intersections` ([GH-76521](https://github.com/godotengine/godot/pull/76521)).
- 3D: Fix `SurfaceTool::create_from_blend_shape()` ([GH-76669](https://github.com/godotengine/godot/pull/76669)).
#### Animation
- Fix `blend_shape` (shapekey) empty name import ([GH-75990](https://github.com/godotengine/godot/pull/75990)).
#### Audio
- Fix crash caused by invalid `mix_rate` assignment due to bogus project settings ([GH-69833](https://github.com/godotengine/godot/pull/69833)).
- Fix AudioStreamPlayer2D crash when PhysicsServer2D runs on thread ([GH-75728](https://github.com/godotengine/godot/pull/75728)).
#### Buildsystem
- Fix the Python type error when creating the `.sln` file ([GH-75309](https://github.com/godotengine/godot/pull/75309)).
- Fix forced optimization in `dev_build` ([GH-75909](https://github.com/godotengine/godot/pull/75909)).
#### Core
- Fix the UID field of the tscn/res file is lost when the external dependency is updated ([GH-70234](https://github.com/godotengine/godot/pull/70234)).
- Fix invalid global position when read outside tree ([GH-75509](https://github.com/godotengine/godot/pull/75509)).
- Fix moving position indicator out of bounds in FileAccessMemory ([GH-75641](https://github.com/godotengine/godot/pull/75641)).
- Fix expected argument count in Callable call error text ([GH-76259](https://github.com/godotengine/godot/pull/76259)).
- Fix lerp error message ([GH-76314](https://github.com/godotengine/godot/pull/76314)).
- Make `LocalVector` respect its `tight` template parameter ([GH-64120](https://github.com/godotengine/godot/pull/64120)).
- Prevent errors when using ViewportTexture ([GH-75751](https://github.com/godotengine/godot/pull/75751)).
- Fix size error in `BitMap.opaque_to_polygons` ([GH-76536](https://github.com/godotengine/godot/pull/76536)).
#### Editor
- Fix off-by-one issue where "Go to Line" dialog shows the incorrect line number ([GH-75523](https://github.com/godotengine/godot/pull/75523)).
- Fix UI responsiveness to touch taps ([GH-75703](https://github.com/godotengine/godot/pull/75703)).
- Fix deserializing resource usage debug data ([GH-75782](https://github.com/godotengine/godot/pull/75782)).
- Initialize editor values on first launch ([GH-75799](https://github.com/godotengine/godot/pull/75799)).
- Fix connect signal dialog not allowing Unicode method name ([GH-75814](https://github.com/godotengine/godot/pull/75814)).
- Fix method dialog label ([GH-75844](https://github.com/godotengine/godot/pull/75844)).
- Fix editor spin slider remaining editable if set `read_only` while editing ([GH-76122](https://github.com/godotengine/godot/pull/76122)).
- Fix layout list not resizing in editor layout dialog ([GH-76364](https://github.com/godotengine/godot/pull/76364)).
- Fix `line_spacing` in code editor will not take effect immediately on change ([GH-76396](https://github.com/godotengine/godot/pull/76396)).
- Fix inconsistent file dialog settings usage ([GH-76421](https://github.com/godotengine/godot/pull/76421)).
- Fix Node arrays appear as Object arrays in the inspector ([GH-76530](https://github.com/godotengine/godot/pull/76530)).
- Fix CollisionShape2D editor crashes ([GH-76546](https://github.com/godotengine/godot/pull/76546), [GH-76798](https://github.com/godotengine/godot/pull/76798)).
- Fix 2D shader preview draws over uniform ([GH-76555](https://github.com/godotengine/godot/pull/76555)).
- Fix crash when trying to create bones from Control ([GH-77160](https://github.com/godotengine/godot/pull/77160)).
#### Export
- Fix validation of codesigning certificate password on macOS ([GH-74326](https://github.com/godotengine/godot/pull/74326)).
#### GDExtension
- Add missing bindings and documentation for MultiplayerPeerExtension ([GH-75116](https://github.com/godotengine/godot/pull/75116)).
#### GDScript
- Add missing member type check when resolving `extends` ([GH-75879](https://github.com/godotengine/godot/pull/75879)).
- Fix typo in LSP parse function parameters ([GH-76090](https://github.com/godotengine/godot/pull/76090)).
- Fix inner method variable rename in LSP ([GH-76095](https://github.com/godotengine/godot/pull/76095)).
- Fix multi-line string highlighting with single quotes ([GH-76170](https://github.com/godotengine/godot/pull/76170)).
- Fix mixed tabs and spaces issues ([GH-76286](https://github.com/godotengine/godot/pull/76286)).
- Fix wrong file name on function call error ([GH-76404](https://github.com/godotengine/godot/pull/76404)).
- Don't fail when freed object is returned ([GH-76483](https://github.com/godotengine/godot/pull/76483)).
- Don't send empty LSP completion command ([GH-76790](https://github.com/godotengine/godot/pull/76790)).
#### GUI
- Fix RichTextLabel wrong selection offset in padded table cell ([GH-71742](https://github.com/godotengine/godot/pull/71742)).
- Fix commenting collapsed function issue ([GH-75070](https://github.com/godotengine/godot/pull/75070)).
- Fix fill align and trim with enabled dropcap in `RichTextLabel` ([GH-75504](https://github.com/godotengine/godot/pull/75504)).
- Fix descriptions not showing for theme properties ([GH-75559](https://github.com/godotengine/godot/pull/75559)).
- Fix some theme values affect the editor by setting a default value for them ([GH-75566](https://github.com/godotengine/godot/pull/75566)).
- Fix several GraphEdit operations at zoom levels other than 100% ([GH-75595](https://github.com/godotengine/godot/pull/75595)).
- Fix offset calculation in Tree when there are hidden items ([GH-75977](https://github.com/godotengine/godot/pull/75977)).
- Add missing LineEdit constants in editor theme ([GH-76123](https://github.com/godotengine/godot/pull/76123)).
- Fix blurry borders on antialiased StyleBoxFlat ([GH-76132](https://github.com/godotengine/godot/pull/76132)).
- Fix fractional ascent for image fonts with odd height ([GH-76136](https://github.com/godotengine/godot/pull/76136)).
- Fix right click in selection of additional caret ([GH-76472](https://github.com/godotengine/godot/pull/76472)).
#### Import
- SVG: Fix `tvg::Picture->size()` and scale based errors ([GH-75034](https://github.com/godotengine/godot/pull/75034)).
- Fix OBJ mesh importer smoothing handling ([GH-75315](https://github.com/godotengine/godot/pull/75315)).
- Fix animation silhouette using incorrect index ([GH-76499](https://github.com/godotengine/godot/pull/76499)).
#### Input
- Fix guide button detection with XInput and Xbox Series controllers ([GH-73200](https://github.com/godotengine/godot/pull/73200)).
- Fix the issue preventing dragging in the 2D editor ([GH-75113](https://github.com/godotengine/godot/pull/75113)).
- Fix keycode/physical keycode mix up on web ([GH-75738](https://github.com/godotengine/godot/pull/75738)).
- Fix potential null in android text entry system ([GH-75991](https://github.com/godotengine/godot/pull/75991)).
#### Navigation
- Fix NavigationObstacles not being added to avoidance simulation ([GH-75756](https://github.com/godotengine/godot/pull/75756)).
- Fix NavigationMesh baking for HeightMapShape ([GH-76212](https://github.com/godotengine/godot/pull/76212)).
#### Networking
- Fix crashes trying to use TLS when not available ([GH-77011](https://github.com/godotengine/godot/pull/77011)).
#### Particles
- Properly calculate lifetime_split for particles ([GH-73313](https://github.com/godotengine/godot/pull/73313)).
- Fix "error X3708: continue cannot be used in a switch" in HTML export ([GH-75795](https://github.com/godotengine/godot/pull/75795)).
#### Physics
- Fix typo bug in convex-convex separating axis test ([GH-75835](https://github.com/godotengine/godot/pull/75835)).
#### Porting
- Android: Fix issue with resizing the display when using the compatibility renderer ([GH-76464](https://github.com/godotengine/godot/pull/76464)).
- Android: Allow concurrent buffering and dispatch of input events ([GH-76399](https://github.com/godotengine/godot/pull/76399)).
- Android: Fix double tap & drag on Android ([GH-76791](https://github.com/godotengine/godot/pull/76791)).
- iOS: Fix splash screen rotation ([GH-76037](https://github.com/godotengine/godot/pull/76037)).
- iOS: Fix loading of GDExtension dylibs auto converted to framework ([GH-76510](https://github.com/godotengine/godot/pull/76510)).
- Windows: Fix clipboard relying on focused window ([GH-73878](https://github.com/godotengine/godot/pull/73878)).
- Windows: Fix queuing utterances in rapid succession ([GH-75880](https://github.com/godotengine/godot/pull/75880)).
- Windows: Cleanup COM library initialization/uninitialization ([GH-75881](https://github.com/godotengine/godot/pull/75881)).
- Windows: Fix StringFileInfo structure ([GH-76001](https://github.com/godotengine/godot/pull/76001)).
- Windows: Add mono audio support to WASAPI ([GH-76541](https://github.com/godotengine/godot/pull/76541)).
#### Rendering
- Fix interpolation of R0 for metallic and calculation of the Fresnel Shlick term in SSR ([GH-75368](https://github.com/godotengine/godot/pull/75368)).
- Fix `get_test_texture()` returning an almost fully white texture ([GH-75632](https://github.com/godotengine/godot/pull/75632)).
- Ensure that depth write state is updated before transparent pass in OpenGL3 renderer ([GH-75968](https://github.com/godotengine/godot/pull/75968)).
- Fix editor lock on SDF collision bake on error ([GH-76257](https://github.com/godotengine/godot/pull/76257)).
- Fix issues with Vulkan layout transitions ([GH-76315](https://github.com/godotengine/godot/pull/76315)).
- Fix breakages of volumetric fog on voxel GI changes ([GH-76437](https://github.com/godotengine/godot/pull/76437)).
- Fix GLES3 rendering on Android studio emulator ([GH-74945](https://github.com/godotengine/godot/pull/74945)).
- Fix more voxel GI issues ([GH-76550](https://github.com/godotengine/godot/pull/76550)).
- Use proper UV in cubemap downsampler raster (Fixes reflections in mobile renderer) ([GH-76692](https://github.com/godotengine/godot/pull/76692)).
#### Shaders
- Fix crashes caused due to missing type specifier on visual shader editor ([GH-75809](https://github.com/godotengine/godot/pull/75809)).
- Fix Shader Preprocessor line numbering when disabled ([GH-76479](https://github.com/godotengine/godot/pull/76479)).
- Fix rotation issue with `NODE_POSITION_VIEW` shader built-in ([GH-76109](https://github.com/godotengine/godot/pull/76109)).
#### XR
- Fix incorrect HTC action map entries ([GH-74930](https://github.com/godotengine/godot/pull/74930)).
## [4.0.2] - 2023-04-04
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-2) for details.
### Added
#### Core
- Add a missing `ImageTextureLayered::_images` setter for the C# bindings ([GH-74668](https://github.com/godotengine/godot/pull/74668)).
- Exposing more project settings for documentation ([GH-74727](https://github.com/godotengine/godot/pull/74727)).
#### Physics
- Expose the `apply_floor_snap` function to allow manual snap ([GH-73749](https://github.com/godotengine/godot/pull/73749)).
#### Porting
- Android: Use the new API for virtual keyboard height detection on Android, bugfix for old API ([GH-74398](https://github.com/godotengine/godot/pull/74398)).
- Android: Configure maven central snapshot versions for the Godot Android library ([GH-74470](https://github.com/godotengine/godot/pull/74470)).
- Android: Add "filesRoot" path to Android provider paths xml ([GH-74673](https://github.com/godotengine/godot/pull/74673)).
- macOS: Re-add support for the `_sc_` inside app bundle ([GH-73429](https://github.com/godotengine/godot/pull/73429)).
#### Project converter
- Add conversion for `Vector2` `tangent()` -> `orthogonal()` ([GH-74515](https://github.com/godotengine/godot/pull/74515)).
- Add navigation renames to the converter ([GH-75513](https://github.com/godotengine/godot/pull/75513)).
#### Shaders
- Add drag and drop support for shader include files in shader editor ([GH-74869](https://github.com/godotengine/godot/pull/74869)).
#### XR
- Add `XRServer.world_origin` property ([GH-74151](https://github.com/godotengine/godot/pull/74151)).
- Enable access to the Valve Index grip force sensors ([GH-74787](https://github.com/godotengine/godot/pull/74787)).
### Changed
#### 2D
- Use 8×8 default grid size for TextureRegion and 2D polygon editors ([GH-73685](https://github.com/godotengine/godot/pull/73685)).
- Don't allow selecting nodes without owner in the editor ([GH-75492](https://github.com/godotengine/godot/pull/75492)).
#### Animation
- Update property keying state without a full Inspector rebuild ([GH-74564](https://github.com/godotengine/godot/pull/74564)).
#### Buildsystem
- Exit with non-zero status if there are issues with FreeType dependencies ([GH-74645](https://github.com/godotengine/godot/pull/74645)).
- SCons: Cleanup `pulseaudio` defines for Linux ([GH-74666](https://github.com/godotengine/godot/pull/74666)).
#### C#/.NET
- Encode `GodotProjectDir` as Base64 to prevent issues with special characters ([GH-74312](https://github.com/godotengine/godot/pull/74312)).
- Do not print errors about missing references to intentionally ignored members ([GH-75284](https://github.com/godotengine/godot/pull/75284)).
#### Core
- Make `Gradient` resort points on `reverse` ([GH-75235](https://github.com/godotengine/godot/pull/75235)).
- Port robust signal (dis)connection to `ShapeCast2D` ([GH-75266](https://github.com/godotengine/godot/pull/75266)).
#### Editor
- Improve POT Generation dialog ([GH-74213](https://github.com/godotengine/godot/pull/74213)).
- Hide internal settings from the class reference ([GH-74226](https://github.com/godotengine/godot/pull/74226)).
- Remove disabled plugins from active plugins ([GH-75331](https://github.com/godotengine/godot/pull/75331)).
- More i18n improvements ([GH-75385](https://github.com/godotengine/godot/pull/75385)).
#### Export
- Delete unused compression formats from `.import` files when exporting ([GH-74684](https://github.com/godotengine/godot/pull/74684)).
#### GDScript
- Make GDScript number highlighting stricter ([GH-74184](https://github.com/godotengine/godot/pull/74184)).
#### GUI
- Improve layout direction/locale automatic selection ([GH-73716](https://github.com/godotengine/godot/pull/73716)).
- Add mutex for FreeType face creation/deletion operations in TextServer ([GH-73987](https://github.com/godotengine/godot/pull/73987)).
#### Input
- Remove `meta_mem` update on keyup/keydown on Windows ([GH-75172](https://github.com/godotengine/godot/pull/75172)).
#### Physics
- Revert attempted fix of trimesh CCD ([GH-74861](https://github.com/godotengine/godot/pull/74861)).
#### Porting
- Android: Bump the target SDK version to 33 (Android 13) ([GH-75203](https://github.com/godotengine/godot/pull/75203)).
#### Project converter
- Remove Tween properties/signals from renames ([GH-75443](https://github.com/godotengine/godot/pull/75443)).
#### Rendering
- Incorporating the availability of screen and depth textures for the GLES3 backend ([GH-72361](https://github.com/godotengine/godot/pull/72361)).
#### Thirdparty
- mymindstorm/setup-emsdk updated to 12.
#### XR
- Replace OpenXR operating system alert dialog with a warning log message ([GH-73144](https://github.com/godotengine/godot/pull/73144)).
- Check hardware sRGB conversion when an sRGB target is used ([GH-74892](https://github.com/godotengine/godot/pull/74892)).
### Fixed
#### 2D
- Fix preview rendering and transform calculations in the tiles editor ([GH-74982](https://github.com/godotengine/godot/pull/74982)).
- Fix `ENTER_CANVAS` / `VISIBILITY_CHANGED` notification order when `CanvasItem` enters tree ([GH-75238](https://github.com/godotengine/godot/pull/75238)).
- Fix a crash in the tiles editor when merging atlases ([GH-75361](https://github.com/godotengine/godot/pull/75361)).
#### 3D
- Fix GridMap signal `cell_size_changed` disconnect error ([GH-74890](https://github.com/godotengine/godot/pull/74890)).
#### Animation
- Fix `AnimatedSprite2D` autoplay warning ([GH-75258](https://github.com/godotengine/godot/pull/75258)).
#### Buildsystem
- Fix xml namespace in org.godotengine.Godot.xml ([GH-74920](https://github.com/godotengine/godot/pull/74920)).
#### C#/.NET
- Fix building projects for MSBuild before 17.3 ([GH-74479](https://github.com/godotengine/godot/pull/74479)).
- Fix `Array.AddRange` index out of bounds ([GH-75357](https://github.com/godotengine/godot/pull/75357)).
#### Core
- Fix some race conditions that happen during initialization ([GH-73793](https://github.com/godotengine/godot/pull/73793)).
- Fix crash in resource load ([GH-74166](https://github.com/godotengine/godot/pull/74166)).
- Fix `randfn` to prevent it from generating nan values ([GH-74248](https://github.com/godotengine/godot/pull/74248)).
- Fix Variant hashing for floats ([GH-74600](https://github.com/godotengine/godot/pull/74600)).
- Fix type check for `max`/`min` ([GH-74770](https://github.com/godotengine/godot/pull/74770)).
- Fix `Array.slice()` rounding when step is other than 1 ([GH-74909](https://github.com/godotengine/godot/pull/74909)).
#### Editor
- Fix cancelling selection while gizmo editing making uncommitted changes ([GH-71156](https://github.com/godotengine/godot/pull/71156)).
- Fix `EditorUndoRedoManager`'s handling of `MERGE_ENDS` ([GH-74460](https://github.com/godotengine/godot/pull/74460)).
- Fix built-in scripts missing their methods on signal connection ([GH-74495](https://github.com/godotengine/godot/pull/74495)).
- Fix "Download Project Source" for the Web Editor ([GH-75194](https://github.com/godotengine/godot/pull/75194)).
- Fix incorrect sizes of some editor elements ([GH-75379](https://github.com/godotengine/godot/pull/75379), [GH-75381](https://github.com/godotengine/godot/pull/75381)).
#### Export
- Fix GDExtensions library export when multiple architectures are set ([GH-74057](https://github.com/godotengine/godot/pull/74057)).
#### GDScript
- Fix "Find in Files" search results not opening built-in script ([GH-74401](https://github.com/godotengine/godot/pull/74401)).
- Fix false positive `REDUNDANT_AWAIT` warning ([GH-74949](https://github.com/godotengine/godot/pull/74949)).
#### GUI
- Fix scrolling behavior with zero/low page value ([GH-67910](https://github.com/godotengine/godot/pull/67910)).
- Fix some ways to create inconsistent Viewport size states ([GH-73188](https://github.com/godotengine/godot/pull/73188)).
- Fix `GraphNode` resizing when its bottom border is too thin ([GH-73800](https://github.com/godotengine/godot/pull/73800)).
- Fix IME position in the single window mode sub-windows ([GH-74472](https://github.com/godotengine/godot/pull/74472)).
- Fix gutter set width results in receiving only half of the desired size ([GH-74537](https://github.com/godotengine/godot/pull/74537)).
- Fix `get_drag_data` not overridable in some Controls ([GH-75122](https://github.com/godotengine/godot/pull/75122)).
- Fix block caret size at the end of the line ([GH-75597](https://github.com/godotengine/godot/pull/75597)).
#### Import
- Fix `ResourceImporterLayeredTexture::import()` `high_quality` variable type ([GH-75244](https://github.com/godotengine/godot/pull/75244)).
#### Input
- Fix layout bug in `keyboard_get_keycode_from_physical` on Linux/X11 ([GH-75461](https://github.com/godotengine/godot/pull/75461)).
#### Navigation
- Fix GridMap free navigation RID error spam ([GH-74889](https://github.com/godotengine/godot/pull/74889)).
- Fix agents with disabled avoidance getting added to avoidance simulation ([GH-74893](https://github.com/godotengine/godot/pull/74893)).
#### Networking
- Fix list handling in `SceneReplicationConfig` ([GH-74552](https://github.com/godotengine/godot/pull/74552)).
#### Physics
- Fix `collide_shape` return type ([GH-75260](https://github.com/godotengine/godot/pull/75260)).
- Fix property hint for platform layers on 3D physics body ([GH-75544](https://github.com/godotengine/godot/pull/75544)).
#### Porting
- Android: Fix directory access when the running app has the `All files access` permission ([GH-75146](https://github.com/godotengine/godot/pull/75146)).
- macOS: Fix infinite loop caused by global menu callbacks which trigger EditorProgress dialog ([GH-75254](https://github.com/godotengine/godot/pull/75254)).
#### Rendering
- Fix spotlight shadows in volumetric fog ([GH-73919](https://github.com/godotengine/godot/pull/73919)).
- Fix issues with point size not functioning correctly in GLES3 ([GH-73966](https://github.com/godotengine/godot/pull/73966)).
- Update GPUParticles2D/3D speed scale on `ENTER_TREE` ([GH-75398](https://github.com/godotengine/godot/pull/75398)).
#### Shaders
- Fix ndc calculation for LinearSceneDepth VS node in GLES3 ([GH-74910](https://github.com/godotengine/godot/pull/74910)).
#### XR
- Fix typo in OpenXR pose orientation check ([GH-74928](https://github.com/godotengine/godot/pull/74928)).
## [4.0.1] - 2023-03-20
See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-0-1) for details.
### Added
#### Import
- Set the unlit / unshaded extension when importing / exporting glTF ([GH-74287](https://github.com/godotengine/godot/pull/74287)).
#### Project converter
- Add keycode project conversion ([GH-74237](https://github.com/godotengine/godot/pull/74237)).
- Add conversion for common Theme Overrides ([GH-74624](https://github.com/godotengine/godot/pull/74624)).
- Move tool declarations to top ([GH-74432](https://github.com/godotengine/godot/pull/74432)).
#### Tilemaps
- Remember previously selected TileMap tile ([GH-74039](https://github.com/godotengine/godot/pull/74039)).
### Changed
#### Animation
- Check for type mismatch in `PropertyTweener.from()` ([GH-74112](https://github.com/godotengine/godot/pull/74112)).
#### Buildsystem
- Safeguard Makefile commands for documentation ([GH-74042](https://github.com/godotengine/godot/pull/74042)).
#### C#/.NET
- Always show "Create C# solution" option ([GH-73904](https://github.com/godotengine/godot/pull/73904)).
#### Core
- Propagate errors when creating an OpenGL context fails in X11 ([GH-74563](https://github.com/godotengine/godot/pull/74563)).
#### Editor
- Automatically reparent editor message dialogs to avoid error spam ([GH-73365](https://github.com/godotengine/godot/pull/73365)).
- Translate strings which were previously missed ([GH-74211](https://github.com/godotengine/godot/pull/74211), [GH-74637](https://github.com/godotengine/godot/pull/74637)).
- Disallow creating a project in the Home or Documents folder ([GH-74964](https://github.com/godotengine/godot/pull/74964)).
#### GDScript
- Don't autocomplete numbers ([GH-74466](https://github.com/godotengine/godot/pull/74466)).
#### GUI
- Assume outline size is 1 if it's not set, but channel for outline is defined in a BitMap font ([GH-74212](https://github.com/godotengine/godot/pull/74212)).
- Do not draw virtual spaces (word break / justification points) ([GH-74488](https://github.com/godotengine/godot/pull/74488)).
- Generate empty textures for theme icons if the SVG module is disabled ([GH-74551](https://github.com/godotengine/godot/pull/74551)).
- Add invalid font scaling check, restrict Linux/BSD system fonts lookup to TrueType/CFF only ([GH-74702](https://github.com/godotengine/godot/pull/74702)).
#### Input
- Update modifier key status during IME input on Windows ([GH-74474](https://github.com/godotengine/godot/pull/74474)).
#### Navigation
- Allow negative NavigationAgent2D path debug line_width for thin lines ([GH-74800](https://github.com/godotengine/godot/pull/74800)).
#### Project converter
- Do not convert lines that start with a comment ([GH-74193](https://github.com/godotengine/godot/pull/74193)).
- Don't strip whitespace when converting ([GH-74232](https://github.com/godotengine/godot/pull/74232)).
#### Rendering
- Use MSAA 2D texture in multipass tonemapper ([GH-74150](https://github.com/godotengine/godot/pull/74150)).
- Use linear filtering without mipmaps for ProceduralSkyMaterial and PhysicalSkyMaterial ([GH-74740](https://github.com/godotengine/godot/pull/74740)).
### Fixed
#### Audio
- Improve logic related to editing audio buses and prevent crashes ([GH-74560](https://github.com/godotengine/godot/pull/74560)).
#### C#/.NET
- Fix crash when errors occur before language initialization ([GH-74127](https://github.com/godotengine/godot/pull/74127)).
- Get singleton instances using the Core name ([GH-74280](https://github.com/godotengine/godot/pull/74280)).
- Ensure that script names (and therefore class names) are valid identifiers ([GH-74330](https://github.com/godotengine/godot/pull/74330)).
- Ignore explicit interface implementations ([GH-74375](https://github.com/godotengine/godot/pull/74375)).
#### Core
- Set properties of ImageTexture3D when creating ([GH-74521](https://github.com/godotengine/godot/pull/74521)).
- Fix buffer overrun in CPUParticles3D in `precision=double` builds ([GH-74555](https://github.com/godotengine/godot/pull/74555)).
- Prevent crashing on startup if project has scripted theme types ([GH-74565](https://github.com/godotengine/godot/pull/74565)).
#### Editor
- Disable local space for Blender-style transforms ([GH-59443](https://github.com/godotengine/godot/pull/59443), [GH-74601](https://github.com/godotengine/godot/pull/74601)).
- Stop toaster notification circle flickering ([GH-74017](https://github.com/godotengine/godot/pull/74017)).
- Fix dock name lost translation after layout change ([GH-74158](https://github.com/godotengine/godot/pull/74158)).
- Fix crash when showing file in FileSystem dock ([GH-74591](https://github.com/godotengine/godot/pull/74591)).
- Prevent cache corruption when saving resources in the editor ([GH-74615](https://github.com/godotengine/godot/pull/74615)).
- Ensure that editor color map is initialized in the project manager ([GH-74750](https://github.com/godotengine/godot/pull/74750)).
- Fix MultiNodeEdit not cleared after deleting nodes ([GH-74795](https://github.com/godotengine/godot/pull/74795)).
- Fix error when opening Inspector's dots menu ([GH-74974](https://github.com/godotengine/godot/pull/74974)).
#### Export
- Fix various issues related to remote deploy and remote execute on Windows ([GH-74030](https://github.com/godotengine/godot/pull/74030)).
#### GDExtension
- Fix crash when dumping extension API in a non-writable directory ([GH-74590](https://github.com/godotengine/godot/pull/74590)).
- Fix extension bindings for motion collision/result structs ([GH-74671](https://github.com/godotengine/godot/pull/74671)).
#### GDScript
- Fix error spam when naming a func at the end of the script ([GH-73410](https://github.com/godotengine/godot/pull/73410)).
- Fix checking if a call is awaited in compiler ([GH-74147](https://github.com/godotengine/godot/pull/74147)).
- Fix autocomplete inside a block with a type test condition ([GH-74689](https://github.com/godotengine/godot/pull/74689)).
#### GUI
- Fix RichTextLabel crash with out of bound exception ([GH-68325](https://github.com/godotengine/godot/pull/68325)).
- Fix justification on punctuation characters ([GH-74477](https://github.com/godotengine/godot/pull/74477)).
- Add missing handler for removing font sizes in the theme editor ([GH-74547](https://github.com/godotengine/godot/pull/74547)).
#### Import
- Fix glTF mesh importer not freeing nodes correctly on import ([GH-74018](https://github.com/godotengine/godot/pull/74018)).
- Prevent infinite loop by disabling importer when canceling FBX2glTF setup ([GH-74293](https://github.com/godotengine/godot/pull/74293)).
- Fix blend-file import when using custom color management in blender ([GH-74496](https://github.com/godotengine/godot/pull/74496)).
#### Input
- Fix InputEventConfigurationDialog modifies original event ([GH-74858](https://github.com/godotengine/godot/pull/74858)).
#### Navigation
- Fix NavigationAgent3D debug path duplicated points ([GH-74976](https://github.com/godotengine/godot/pull/74976)).
#### Porting
- Android: Fix null-pointer dereference when using `gl_compatibility` renderer ([GH-74781](https://github.com/godotengine/godot/pull/74781)).
- Linux/X11: Check if required xkb functions exist before using it ([GH-74222](https://github.com/godotengine/godot/pull/74222)).
- Linux/X11: Fix broken shortcut key input ([GH-74535](https://github.com/godotengine/godot/pull/74535)).
#### Project converter
- Correct superclass constructors ([GH-74354](https://github.com/godotengine/godot/pull/74354)).
- Add parentheses around arguments when converting `xform` ([GH-74693](https://github.com/godotengine/godot/pull/74693)).
#### Rendering
- Add proper default texture filter and repeat modes for Canvas shaders in the OpenGL3 renderer ([GH-74315](https://github.com/godotengine/godot/pull/74315)).
- Fix instance uniforms breaking when setting a new mesh ([GH-74349](https://github.com/godotengine/godot/pull/74349)).
- Fix AABB calculation for meshes using Skeleton2D ([GH-74416](https://github.com/godotengine/godot/pull/74416)).
- Avoid overflow when calculating ptr address for 3D textures in RenderingDevice texture update ([GH-74526](https://github.com/godotengine/godot/pull/74526)).
- Fixes a canvas item set to clip children being drawn as black if no children are visible ([GH-74533](https://github.com/godotengine/godot/pull/74533)).
- Avoid copying CanvasTexture when updating proxy ([GH-74566](https://github.com/godotengine/godot/pull/74566)).
#### Tilemaps
- Fix TileSetEditor painting `texture_origin` Vector2i ([GH-73514](https://github.com/godotengine/godot/pull/73514)).
## [4.0] - 2023-03-01
The Godot 4.0 release was our biggest released to date, spanning 4 years of
@@ -791,7 +1457,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-4-is-rele
#### Thirdparty
- Bullet uppdated to version 3.17.
- Bullet updated to version 3.17.
- Embree updated to version 3.13.0.
- MbedTLS updated to version 2.16.11 (security update).
- NanoSVG updated to 2021-09-03 git snapshot (security update).
@@ -932,7 +1598,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-4-is-rele
- Fix and clean disabled shapes handling in Godot physics servers ([GH-49845](https://github.com/godotengine/godot/pull/49845)).
- Fix `KinematicBody` axis lock ([GH-45176](https://github.com/godotengine/godot/pull/45176)).
- Don't override `KinematicCollision` reference when still in use in script ([GH-52955](https://github.com/godotengine/godot/pull/52955)).
- Fix ragdoll simulation when parent was readded to scene ([GH-48823](https://github.com/godotengine/godot/pull/48823)).
- Fix ragdoll simulation when parent was re-added to scene ([GH-48823](https://github.com/godotengine/godot/pull/48823)).
- Ignore disabled shapes for mass property calculations ([GH-49699](https://github.com/godotengine/godot/pull/49699)).
#### Porting
@@ -1333,7 +1999,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
- Support for automatically building Android templates before exporting.
- This makes 3rd-party SDK integration easier.
- Support for [texture atlases in 2D](https://godotengine.org/article/atlas-support-returns-godot-3-2).
- Major improvements to the visual shader system. ([News post 1](https://godotengine.org/article/major-update-for-visual-shader-in-godot-3-2), [News post 2](https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2))
- Major improvements to the visual shader system ([News post 1](https://godotengine.org/article/major-update-for-visual-shader-in-godot-3-2), [News post 2](https://godotengine.org/article/major-update-visual-shaders-godot-3-2-part-2)).
- Redesigned visual shader editor with drag-and-drop capability.
- Textures can be dragged from the FileSystem dock to be added as nodes.
- Most functions available in GLSL are now exposed.
@@ -2440,6 +3106,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.0.3]: https://github.com/godotengine/godot/compare/4.0.2-stable...4.0.3-stable
[4.0.2]: https://github.com/godotengine/godot/compare/4.0.1-stable...4.0.2-stable
[4.0.1]: https://github.com/godotengine/godot/compare/4.0-stable...4.0.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
[3.4]: https://github.com/godotengine/godot/compare/3.3-stable...3.4-stable

View File

@@ -169,7 +169,7 @@ License: Expat
Files: ./thirdparty/doctest/
Comment: doctest
Copyright: 2016-2021, Viktor Kirilov
Copyright: 2016-2023, Viktor Kirilov
License: Expat
Files: ./thirdparty/embree/

View File

@@ -645,7 +645,7 @@ if selected_platform in platform_list:
print(
"Detected mingw version is not using posix threads. Only posix "
"version of mingw is supported. "
'Use "update-alternatives --config <platform>-w64-mingw32-[gcc|g++]" '
'Use "update-alternatives --config x86_64-w64-mingw32-g++" '
"to switch to posix threads."
)
Exit(255)
@@ -686,7 +686,8 @@ if selected_platform in platform_list:
if env["warnings"] == "extra":
env.Append(CCFLAGS=["/W4"])
elif env["warnings"] == "all":
env.Append(CCFLAGS=["/W3"])
# C4458 is like -Wshadow. Part of /W4 but let's apply it for the default /W3 too.
env.Append(CCFLAGS=["/W3", "/w34458"])
elif env["warnings"] == "moderate":
env.Append(CCFLAGS=["/W2"])
# Disable warnings which we don't plan to fix.
@@ -715,7 +716,7 @@ if selected_platform in platform_list:
common_warnings = []
if methods.using_gcc(env):
common_warnings += ["-Wshadow-local", "-Wno-misleading-indentation"]
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
if cc_version_major == 7: # Bogus warning fixed in 8+.
common_warnings += ["-Wno-strict-overflow"]
if cc_version_major < 11:
@@ -725,6 +726,7 @@ if selected_platform in platform_list:
if cc_version_major >= 12: # False positives in our error macros, see GH-58747.
common_warnings += ["-Wno-return-type"]
elif methods.using_clang(env) or methods.using_emcc(env):
common_warnings += ["-Wshadow-field-in-constructor", "-Wshadow-uncaptured-local"]
# We often implement `operator<` for structs of pointers as a requirement
# for putting them in `Set` or `Map`. We don't mind about unreliable ordering.
common_warnings += ["-Wno-ordered-compare-function-pointers"]
@@ -820,6 +822,15 @@ if selected_platform in platform_list:
env.module_list = modules_enabled
methods.sort_module_list(env)
if env.editor_build:
# Add editor-specific dependencies to the dependency graph.
env.module_add_dependencies("editor", ["freetype", "svg"])
# And check if they are met.
if not env.module_check_dependencies("editor"):
print("Not all modules required by editor builds are enabled.")
Exit(255)
methods.generate_version_header(env.module_version_string)
env["PROGSUFFIX_WRAP"] = suffix + env.module_version_string + ".console" + env["PROGSUFFIX"]
@@ -840,7 +851,7 @@ if selected_platform in platform_list:
if env["disable_3d"]:
if env.editor_build:
print("Build option 'disable_3d=yes' cannot be used for editor builds, but only for export templates.")
print("Build option 'disable_3d=yes' cannot be used for editor builds, only for export template builds.")
Exit(255)
else:
env.Append(CPPDEFINES=["_3D_DISABLED"])
@@ -848,7 +859,7 @@ if selected_platform in platform_list:
if env.editor_build:
print(
"Build option 'disable_advanced_gui=yes' cannot be used for editor builds, "
"but only for export templates."
"only for export template builds."
)
Exit(255)
else:

View File

@@ -401,6 +401,10 @@ void ProjectSettings::_get_property_list(List<PropertyInfo> *p_list) const {
vc.flags = PROPERTY_USAGE_EDITOR | PROPERTY_USAGE_STORAGE;
}
if (v->internal) {
vc.flags |= PROPERTY_USAGE_INTERNAL;
}
if (v->basic) {
vc.flags |= PROPERTY_USAGE_EDITOR_BASIC_SETTING;
}
@@ -1242,7 +1246,7 @@ void ProjectSettings::_add_builtin_input_map() {
action["events"] = events;
String action_name = "input/" + E.key;
GLOBAL_DEF_INTERNAL(action_name, action);
GLOBAL_DEF(action_name, action);
input_presets.push_back(action_name);
}
}
@@ -1266,6 +1270,10 @@ ProjectSettings::ProjectSettings() {
GLOBAL_DEF("application/config/custom_user_dir_name", "");
GLOBAL_DEF("application/config/project_settings_override", "");
GLOBAL_DEF("application/run/main_loop_type", "SceneTree");
GLOBAL_DEF("application/config/auto_accept_quit", true);
GLOBAL_DEF("application/config/quit_on_go_back", true);
// The default window size is tuned to:
// - Have a 16:9 aspect ratio,
// - Have both dimensions divisible by 8 to better play along with video recording,
@@ -1304,26 +1312,23 @@ ProjectSettings::ProjectSettings() {
}
extensions.push_back("gdshader");
GLOBAL_DEF("editor/run/main_run_args", "");
GLOBAL_DEF(PropertyInfo(Variant::PACKED_STRING_ARRAY, "editor/script/search_in_file_extensions"), extensions);
GLOBAL_DEF(PropertyInfo(Variant::STRING, "editor/script/templates_search_path", PROPERTY_HINT_DIR), "res://script_templates");
// For correct doc generation.
GLOBAL_DEF("editor/naming/default_signal_callback_name", "_on_{node_name}_{signal_name}");
GLOBAL_DEF("editor/naming/default_signal_callback_to_self_name", "_on_{signal_name}");
_add_builtin_input_map();
// Keep the enum values in sync with the `DisplayServer::ScreenOrientation` enum.
custom_prop_info["display/window/handheld/orientation"] = PropertyInfo(Variant::INT, "display/window/handheld/orientation", PROPERTY_HINT_ENUM, "Landscape,Portrait,Reverse Landscape,Reverse Portrait,Sensor Landscape,Sensor Portrait,Sensor");
GLOBAL_DEF("display/window/subwindows/embed_subwindows", true);
// Keep the enum values in sync with the `DisplayServer::VSyncMode` enum.
custom_prop_info["display/window/vsync/vsync_mode"] = PropertyInfo(Variant::INT, "display/window/vsync/vsync_mode", PROPERTY_HINT_ENUM, "Disabled,Enabled,Adaptive,Mailbox");
custom_prop_info["rendering/driver/threads/thread_model"] = PropertyInfo(Variant::INT, "rendering/driver/threads/thread_model", PROPERTY_HINT_ENUM, "Single-Unsafe,Single-Safe,Multi-Threaded");
GLOBAL_DEF("physics/2d/run_on_separate_thread", false);
GLOBAL_DEF("physics/3d/run_on_separate_thread", false);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/mode", PROPERTY_HINT_ENUM, "disabled,canvas_items,viewport"), "disabled");
GLOBAL_DEF_BASIC(PropertyInfo(Variant::STRING, "display/window/stretch/aspect", PROPERTY_HINT_ENUM, "ignore,keep,keep_width,keep_height,expand"), "keep");
GLOBAL_DEF_BASIC(PropertyInfo(Variant::FLOAT, "display/window/stretch/scale", PROPERTY_HINT_RANGE, "0.5,8.0,0.01"), 1.0);
GLOBAL_DEF(PropertyInfo(Variant::INT, "debug/settings/profiler/max_functions", PROPERTY_HINT_RANGE, "128,65535,1"), 16384);
GLOBAL_DEF(PropertyInfo(Variant::BOOL, "compression/formats/zstd/long_distance_matching"), Compression::zstd_long_distance_matching);
@@ -1339,18 +1344,26 @@ 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(PropertyInfo(Variant::INT, "gui/timers/incremental_search_max_interval_msec", PROPERTY_HINT_RANGE, "0,10000,1,or_greater"), 2000);
GLOBAL_DEF_BASIC("gui/common/snap_controls_to_pixels", true);
GLOBAL_DEF_BASIC("gui/fonts/dynamic_fonts/use_oversampling", true);
GLOBAL_DEF("rendering/rendering_device/staging_buffer/block_size_kb", 256);
GLOBAL_DEF("rendering/rendering_device/staging_buffer/max_size_mb", 128);
GLOBAL_DEF("rendering/rendering_device/staging_buffer/texture_upload_region_size_px", 64);
GLOBAL_DEF("rendering/rendering_device/vulkan/max_descriptors_per_pool", 64);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_filter", PROPERTY_HINT_ENUM, "Nearest,Linear,Linear Mipmap,Nearest Mipmap"), 1);
GLOBAL_DEF_BASIC(PropertyInfo(Variant::INT, "rendering/textures/canvas_textures/default_texture_repeat", PROPERTY_HINT_ENUM, "Disable,Enable,Mirror"), 0);
// These properties will not show up in the dialog nor in the documentation. If you want to exclude whole groups, see _get_property_list() method.
GLOBAL_DEF_INTERNAL("application/config/features", PackedStringArray());
GLOBAL_DEF_INTERNAL("internationalization/locale/translation_remaps", PackedStringArray());
GLOBAL_DEF_INTERNAL("internationalization/locale/translations", PackedStringArray());
GLOBAL_DEF_INTERNAL("internationalization/locale/translations_pot_files", PackedStringArray());
}
ProjectSettings::~ProjectSettings() {

View File

@@ -1052,6 +1052,7 @@ void GDExtensionAPIDump::generate_extension_json_file(const String &p_path) {
String text = json->stringify(api, "\t", false) + "\n";
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
ERR_FAIL_COND_MSG(fa.is_null(), vformat("Cannot open file '%s' for writing.", p_path));
fa->store_string(text);
}

View File

@@ -27,6 +27,7 @@ class GDExtensionInterfaceDump {
public:
static void generate_gdextension_interface_file(const String &p_path) {
Ref<FileAccess> fa = FileAccess::open(p_path, FileAccess::WRITE);
ERR_FAIL_COND_MSG(fa.is_null(), vformat("Cannot open file '%s' for writing.", p_path));
CharString cs(gdextension_interface_dump);
fa->store_buffer((const uint8_t *)cs.ptr(), cs.length());
};

View File

@@ -2,7 +2,7 @@
# Source: https://github.com/godotengine/godot
# Windows
__XINPUT_DEVICE__,XInput Gamepad,a:b12,b:b13,x:b14,y:b15,start:b4,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpdown:b1,dpleft:b2,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Windows,
__XINPUT_DEVICE__,XInput Gamepad,a:b12,b:b13,x:b14,y:b15,start:b4,guide:b10,back:b5,leftstick:b6,rightstick:b7,leftshoulder:b8,rightshoulder:b9,dpup:b0,dpdown:b1,dpleft:b2,dpright:b3,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,righttrigger:a5,platform:Windows,
# Android
Default Android Gamepad,Default Controller,leftx:a0,lefty:a1,dpdown:h0.4,rightstick:b8,rightshoulder:b10,rightx:a2,start:b6,righty:a3,dpleft:h0.8,lefttrigger:a4,x:b2,dpup:h0.1,back:b4,leftstick:b7,leftshoulder:b9,y:b3,a:b0,dpright:h0.2,righttrigger:a5,b:b1,platform:Android,

View File

@@ -35,6 +35,10 @@
#include "core/input/input_map.h"
#include "core/os/os.h"
#ifdef DEV_ENABLED
#include "core/os/thread.h"
#endif
static const char *_joy_buttons[(size_t)JoyButton::SDL_MAX] = {
"a",
"b",
@@ -486,6 +490,10 @@ Vector3 Input::get_gyroscope() const {
}
void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_emulated) {
// This function does the final delivery of the input event to user land.
// Regardless where the event came from originally, this has to happen on the main thread.
DEV_ASSERT(Thread::get_caller_id() == Thread::get_main_id());
// Notes on mouse-touch emulation:
// - Emulated mouse events are parsed, that is, re-routed to this method, so they make the same effects
// as true mouse events. The only difference is the situation is flagged as emulated so they are not
@@ -537,7 +545,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
touch_event->set_position(mb->get_position());
touch_event->set_double_tap(mb->is_double_click());
touch_event->set_device(InputEvent::DEVICE_ID_EMULATION);
_THREAD_SAFE_UNLOCK_
event_dispatch_function(touch_event);
_THREAD_SAFE_LOCK_
}
}
@@ -563,7 +573,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
drag_event->set_velocity(get_last_mouse_velocity());
drag_event->set_device(InputEvent::DEVICE_ID_EMULATION);
_THREAD_SAFE_UNLOCK_
event_dispatch_function(drag_event);
_THREAD_SAFE_LOCK_
}
}
@@ -664,7 +676,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
if (ge.is_valid()) {
if (event_dispatch_function) {
_THREAD_SAFE_UNLOCK_
event_dispatch_function(ge);
_THREAD_SAFE_LOCK_
}
}
@@ -687,7 +701,9 @@ void Input::_parse_input_event_impl(const Ref<InputEvent> &p_event, bool p_is_em
}
if (event_dispatch_function) {
_THREAD_SAFE_UNLOCK_
event_dispatch_function(p_event);
_THREAD_SAFE_LOCK_
}
}
@@ -831,6 +847,7 @@ bool Input::is_emulating_touch_from_mouse() const {
// Calling this whenever the game window is focused helps unsticking the "touch mouse"
// if the OS or its abstraction class hasn't properly reported that touch pointers raised
void Input::ensure_touch_mouse_raised() {
_THREAD_SAFE_METHOD_
if (mouse_from_touch_index != -1) {
mouse_from_touch_index = -1;
@@ -937,8 +954,15 @@ void Input::flush_buffered_events() {
_THREAD_SAFE_METHOD_
while (buffered_events.front()) {
_parse_input_event_impl(buffered_events.front()->get(), false);
// The final delivery of the input event involves releasing the lock.
// While the lock is released, another thread may lock it and add new events to the back.
// Therefore, we get each event and pop it while we still have the lock,
// to ensure the list is in a consistent state.
List<Ref<InputEvent>>::Element *E = buffered_events.front();
Ref<InputEvent> e = E->get();
buffered_events.pop_front();
_parse_input_event_impl(e, false);
}
}

View File

@@ -474,10 +474,15 @@ String InputEventKey::to_string() {
return vformat("InputEventKey: keycode=%s, mods=%s, physical=%s, pressed=%s, echo=%s", kc, mods, physical, p, e);
}
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode) {
Ref<InputEventKey> InputEventKey::create_reference(Key p_keycode, bool p_physical) {
Ref<InputEventKey> ie;
ie.instantiate();
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
if (p_physical) {
ie->set_physical_keycode(p_keycode & KeyModifierMask::CODE_MASK);
} else {
ie->set_keycode(p_keycode & KeyModifierMask::CODE_MASK);
}
ie->set_unicode(char32_t(p_keycode & KeyModifierMask::CODE_MASK));
if ((p_keycode & KeyModifierMask::SHIFT) != Key::NONE) {

View File

@@ -195,7 +195,7 @@ public:
virtual String as_text() const override;
virtual String to_string() override;
static Ref<InputEventKey> create_reference(Key p_keycode_with_modifier_masks);
static Ref<InputEventKey> create_reference(Key p_keycode_with_modifier_masks, bool p_physical = false);
InputEventKey() {}
};

View File

@@ -68,7 +68,7 @@ protected:
virtual String _get_root_string() const;
AccessType get_access_type() const;
String fix_path(String p_path) const;
virtual String fix_path(String p_path) const;
template <class T>
static Ref<DirAccess> _create_builtin() {

View File

@@ -80,7 +80,7 @@ protected:
static void _bind_methods();
AccessType get_access_type() const;
String fix_path(const String &p_path) const;
virtual String fix_path(const String &p_path) const;
virtual Error open_internal(const String &p_path, int p_mode_flags) = 0; ///< open a file
virtual uint64_t _get_modified_time(const String &p_file) = 0;
virtual void _set_access_type(AccessType p_access);

View File

@@ -144,7 +144,7 @@ uint64_t FileAccessMemory::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
}
memcpy(p_dst, &data[pos], read);
pos += p_length;
pos += read;
return read;
}
@@ -172,5 +172,5 @@ void FileAccessMemory::store_buffer(const uint8_t *p_src, uint64_t p_length) {
}
memcpy(&data[pos], p_src, write);
pos += p_length;
pos += write;
}

View File

@@ -60,6 +60,7 @@ Error HTTPClientTCP::connect_to_host(const String &p_host, int p_port, Ref<TLSOp
}
ERR_FAIL_COND_V(tls_options.is_valid() && tls_options->is_server(), ERR_INVALID_PARAMETER);
ERR_FAIL_COND_V_MSG(tls_options.is_valid() && !StreamPeerTLS::is_available(), ERR_UNAVAILABLE, "HTTPS is not available in this build.");
ERR_FAIL_COND_V(conn_host.length() < HOST_MIN_LEN, ERR_INVALID_PARAMETER);
if (conn_port < 0) {

View File

@@ -2649,7 +2649,7 @@ Error Image::compress_from_channels(CompressMode p_mode, UsedChannels p_channels
_image_compress_bptc_func(this, p_channels);
} break;
case COMPRESS_ASTC: {
ERR_FAIL_COND_V(!_image_compress_bptc_func, ERR_UNAVAILABLE);
ERR_FAIL_COND_V(!_image_compress_astc_func, ERR_UNAVAILABLE);
_image_compress_astc_func(this, p_astc_format);
} break;
case COMPRESS_MAX: {
@@ -3535,6 +3535,8 @@ void Image::_bind_methods() {
BIND_ENUM_CONSTANT(COMPRESS_ETC);
BIND_ENUM_CONSTANT(COMPRESS_ETC2);
BIND_ENUM_CONSTANT(COMPRESS_BPTC);
BIND_ENUM_CONSTANT(COMPRESS_ASTC);
BIND_ENUM_CONSTANT(COMPRESS_MAX);
BIND_ENUM_CONSTANT(USED_CHANNELS_L);
BIND_ENUM_CONSTANT(USED_CHANNELS_LA);

View File

@@ -75,7 +75,7 @@ struct _IP_ResolverPrivate {
Semaphore sem;
Thread thread;
bool thread_abort = false;
SafeFlag thread_abort;
void resolve_queues() {
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
@@ -111,7 +111,7 @@ struct _IP_ResolverPrivate {
static void _thread_function(void *self) {
_IP_ResolverPrivate *ipr = static_cast<_IP_ResolverPrivate *>(self);
while (!ipr->thread_abort) {
while (!ipr->thread_abort.is_set()) {
ipr->sem.wait();
ipr->resolve_queues();
}
@@ -343,12 +343,12 @@ IP::IP() {
singleton = this;
resolver = memnew(_IP_ResolverPrivate);
resolver->thread_abort = false;
resolver->thread_abort.clear();
resolver->thread.start(_IP_ResolverPrivate::_thread_function, resolver);
}
IP::~IP() {
resolver->thread_abort = true;
resolver->thread_abort.set();
resolver->sem.post();
resolver->thread.wait_to_finish();

View File

@@ -91,9 +91,12 @@ String JSON::_stringify(const Variant &p_var, const String &p_indent, int p_cur_
case Variant::PACKED_FLOAT64_ARRAY:
case Variant::PACKED_STRING_ARRAY:
case Variant::ARRAY: {
Array a = p_var;
if (a.size() == 0) {
return "[]";
}
String s = "[";
s += end_statement;
Array a = p_var;
ERR_FAIL_COND_V_MSG(p_markers.has(a.id()), "\"[...]\"", "Converting circular structure to JSON.");
p_markers.insert(a.id());

View File

@@ -310,12 +310,6 @@ Error ResourceLoader::load_threaded_request(const String &p_path, const String &
thread_load_mutex->unlock();
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "There is no thread loading source resource '" + p_source_resource + "'.");
}
//must be loading from this thread
if (thread_load_tasks[p_source_resource].loader_id != Thread::get_caller_id()) {
thread_load_mutex->unlock();
ERR_FAIL_V_MSG(ERR_INVALID_PARAMETER, "Threading loading resource'" + local_path + " failed: Source specified: '" + p_source_resource + "' but was not called by it.");
}
//must not be already added as s sub tasks
if (thread_load_tasks[p_source_resource].sub_tasks.has(local_path)) {
thread_load_mutex->unlock();
@@ -492,13 +486,21 @@ Ref<Resource> ResourceLoader::load_threaded_get(const String &p_path, Error *r_e
print_lt("GET: load count: " + itos(thread_loading_count) + " / wait count: " + itos(thread_waiting_count) + " / suspended count: " + itos(thread_suspended_count) + " / active: " + itos(thread_loading_count - thread_suspended_count));
}
bool still_valid = true;
bool was_thread = load_task.thread;
do {
load_task.cond_var->wait(thread_load_lock);
if (!thread_load_tasks.has(local_path)) { //may have been erased during unlock and this was always an invalid call
still_valid = false;
break;
}
} while (load_task.cond_var); // In case of spurious wakeup.
thread_suspended_count--;
if (was_thread) {
thread_suspended_count--;
}
if (!thread_load_tasks.has(local_path)) { //may have been erased during unlock and this was always an invalid call
if (!still_valid) {
if (r_error) {
*r_error = ERR_INVALID_PARAMETER;
}

View File

@@ -807,8 +807,8 @@ void Basis::get_axis_angle(Vector3 &r_axis, real_t &r_angle) const {
z = (rows[1][0] - rows[0][1]) / s;
r_axis = Vector3(x, y, z);
// CLAMP to avoid NaN if the value passed to acos is not in [0,1].
r_angle = Math::acos(CLAMP((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2, (real_t)0.0, (real_t)1.0));
// acos does clamping.
r_angle = Math::acos((rows[0][0] + rows[1][1] + rows[2][2] - 1) / 2);
}
void Basis::set_quaternion(const Quaternion &p_quaternion) {

View File

@@ -596,9 +596,9 @@ private:
}
};
enum Orientation { NONE,
CLOCKWISE,
COUNTER_CLOCKWISE };
enum Orientation { ORIENTATION_NONE,
ORIENTATION_CLOCKWISE,
ORIENTATION_COUNTER_CLOCKWISE };
Vector3 scaling;
Vector3 center;
@@ -1140,13 +1140,13 @@ ConvexHullInternal::Orientation ConvexHullInternal::get_orientation(const Edge *
CHULL_ASSERT(!m.is_zero());
int64_t dot = n.dot(m);
CHULL_ASSERT(dot != 0);
return (dot > 0) ? COUNTER_CLOCKWISE : CLOCKWISE;
return (dot > 0) ? ORIENTATION_COUNTER_CLOCKWISE : ORIENTATION_CLOCKWISE;
}
return COUNTER_CLOCKWISE;
return ORIENTATION_COUNTER_CLOCKWISE;
} else if (p_prev->prev == p_next) {
return CLOCKWISE;
return ORIENTATION_CLOCKWISE;
} else {
return NONE;
return ORIENTATION_NONE;
}
}
@@ -1176,7 +1176,7 @@ ConvexHullInternal::Edge *ConvexHullInternal::find_max_angle(bool p_ccw, const V
} else if ((cmp = cot.compare(p_min_cot)) < 0) {
p_min_cot = cot;
min_edge = e;
} else if ((cmp == 0) && (p_ccw == (get_orientation(min_edge, e, p_s, t) == COUNTER_CLOCKWISE))) {
} else if ((cmp == 0) && (p_ccw == (get_orientation(min_edge, e, p_s, t) == ORIENTATION_COUNTER_CLOCKWISE))) {
min_edge = e;
}
}
@@ -1375,7 +1375,7 @@ void ConvexHullInternal::merge(IntermediateHull &p_h0, IntermediateHull &p_h1) {
int64_t dot = (*e->target - *c0).dot(normal);
CHULL_ASSERT(dot <= 0);
if ((dot == 0) && ((*e->target - *c0).dot(t) > 0)) {
if (!start0 || (get_orientation(start0, e, s, Point32(0, 0, -1)) == CLOCKWISE)) {
if (!start0 || (get_orientation(start0, e, s, Point32(0, 0, -1)) == ORIENTATION_CLOCKWISE)) {
start0 = e;
}
}
@@ -1390,7 +1390,7 @@ void ConvexHullInternal::merge(IntermediateHull &p_h0, IntermediateHull &p_h1) {
int64_t dot = (*e->target - *c1).dot(normal);
CHULL_ASSERT(dot <= 0);
if ((dot == 0) && ((*e->target - *c1).dot(t) > 0)) {
if (!start1 || (get_orientation(start1, e, s, Point32(0, 0, -1)) == COUNTER_CLOCKWISE)) {
if (!start1 || (get_orientation(start1, e, s, Point32(0, 0, -1)) == ORIENTATION_COUNTER_CLOCKWISE)) {
start1 = e;
}
}

View File

@@ -74,11 +74,13 @@ public:
static _ALWAYS_INLINE_ double tanh(double p_x) { return ::tanh(p_x); }
static _ALWAYS_INLINE_ float tanh(float p_x) { return ::tanhf(p_x); }
static _ALWAYS_INLINE_ double asin(double p_x) { return ::asin(p_x); }
static _ALWAYS_INLINE_ float asin(float p_x) { return ::asinf(p_x); }
// Always does clamping so always safe to use.
static _ALWAYS_INLINE_ double asin(double p_x) { return p_x < -1 ? (-Math_PI / 2) : (p_x > 1 ? (Math_PI / 2) : ::asin(p_x)); }
static _ALWAYS_INLINE_ float asin(float p_x) { return p_x < -1 ? (-Math_PI / 2) : (p_x > 1 ? (Math_PI / 2) : ::asinf(p_x)); }
static _ALWAYS_INLINE_ double acos(double p_x) { return ::acos(p_x); }
static _ALWAYS_INLINE_ float acos(float p_x) { return ::acosf(p_x); }
// Always does clamping so always safe to use.
static _ALWAYS_INLINE_ double acos(double p_x) { return p_x < -1 ? Math_PI : (p_x > 1 ? 0 : ::acos(p_x)); }
static _ALWAYS_INLINE_ float acos(float p_x) { return p_x < -1 ? Math_PI : (p_x > 1 ? 0 : ::acosf(p_x)); }
static _ALWAYS_INLINE_ double atan(double p_x) { return ::atan(p_x); }
static _ALWAYS_INLINE_ float atan(float p_x) { return ::atanf(p_x); }

View File

@@ -35,7 +35,8 @@
real_t Quaternion::angle_to(const Quaternion &p_to) const {
real_t d = dot(p_to);
return Math::acos(CLAMP(d * d * 2 - 1, -1, 1));
// acos does clamping.
return Math::acos(d * d * 2 - 1);
}
Vector3 Quaternion::get_euler(EulerOrder p_order) const {

View File

@@ -126,10 +126,18 @@ public:
}
_FORCE_INLINE_ double randfn(double p_mean, double p_deviation) {
return p_mean + p_deviation * (cos(Math_TAU * randd()) * sqrt(-2.0 * log(randd()))); // Box-Muller transform
double temp = randd();
if (temp < CMP_EPSILON) {
temp += CMP_EPSILON; // To prevent generating of INF value in log function, resulting to return NaN value from this function.
}
return p_mean + p_deviation * (cos(Math_TAU * randd()) * sqrt(-2.0 * log(temp))); // Box-Muller transform.
}
_FORCE_INLINE_ float randfn(float p_mean, float p_deviation) {
return p_mean + p_deviation * (cos((float)Math_TAU * randf()) * sqrt(-2.0 * log(randf()))); // Box-Muller transform
float temp = randf();
if (temp < CMP_EPSILON) {
temp += CMP_EPSILON; // To prevent generating of INF value in log function, resulting to return NaN value from this function.
}
return p_mean + p_deviation * (cos((float)Math_TAU * randf()) * sqrt(-2.0 * log(temp))); // Box-Muller transform.
}
double random(double p_from, double p_to);

View File

@@ -59,15 +59,15 @@ public:
/*! Constructs a ray from origin, direction, and ray segment. Near
* has to be smaller than far. */
_FORCE_INLINE_ Ray(const Vector3 &org,
const Vector3 &dir,
float tnear = 0.0f,
float tfar = INFINITY) :
org(org),
tnear(tnear),
dir(dir),
_FORCE_INLINE_ Ray(const Vector3 &p_org,
const Vector3 &p_dir,
float p_tnear = 0.0f,
float p_tfar = INFINITY) :
org(p_org),
tnear(p_tnear),
dir(p_dir),
time(0.0f),
tfar(tfar),
tfar(p_tfar),
mask(-1),
u(0.0),
v(0.0),

View File

@@ -50,8 +50,8 @@ void Thread::_set_platform_functions(const PlatformFunctions &p_functions) {
platform_functions = p_functions;
}
void Thread::callback(Thread *p_self, const Settings &p_settings, Callback p_callback, void *p_userdata) {
Thread::caller_id = _thread_id_hash(p_self->thread.get_id());
void Thread::callback(ID p_caller_id, const Settings &p_settings, Callback p_callback, void *p_userdata) {
Thread::caller_id = p_caller_id;
if (platform_functions.set_priority) {
platform_functions.set_priority(p_settings.priority);
}
@@ -79,7 +79,7 @@ void Thread::start(Thread::Callback p_callback, void *p_user, const Settings &p_
std::thread empty_thread;
thread.swap(empty_thread);
}
std::thread new_thread(&Thread::callback, this, p_settings, p_callback, p_user);
std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);
thread.swap(new_thread);
id = _thread_id_hash(thread.get_id());
}

View File

@@ -82,7 +82,7 @@ private:
static thread_local ID caller_id;
std::thread thread;
static void callback(Thread *p_self, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata);
static void callback(ID p_caller_id, const Settings &p_settings, Thread::Callback p_callback, void *p_userdata);
static PlatformFunctions platform_functions;

View File

@@ -382,10 +382,10 @@ String Time::get_time_string_from_system(bool p_utc) const {
Dictionary Time::get_time_zone_from_system() const {
OS::TimeZoneInfo info = OS::get_singleton()->get_time_zone_info();
Dictionary timezone;
timezone["bias"] = info.bias;
timezone["name"] = info.name;
return timezone;
Dictionary ret_timezone;
ret_timezone["bias"] = info.bias;
ret_timezone["name"] = info.name;
return ret_timezone;
}
double Time::get_unix_time_from_system() const {

View File

@@ -712,7 +712,25 @@ String TranslationServer::get_tool_locale() {
#else
{
#endif
return get_locale();
// Look for best matching loaded translation.
String best_locale = "en";
int best_score = 0;
for (const Ref<Translation> &E : translations) {
const Ref<Translation> &t = E;
ERR_FAIL_COND_V(t.is_null(), best_locale);
String l = t->get_locale();
int score = compare_locales(locale, l);
if (score > 0 && score >= best_score) {
best_locale = l;
best_score = score;
if (score == 10) {
break; // Exact match, skip the rest.
}
}
}
return best_locale;
}
}

View File

@@ -59,11 +59,7 @@ public:
_FORCE_INLINE_ void push_back(T p_elem) {
if (unlikely(count == capacity)) {
if (capacity == 0) {
capacity = 1;
} else {
capacity <<= 1;
}
capacity = tight ? (capacity + 1) : MAX((U)1, capacity << 1);
data = (T *)memrealloc(data, capacity * sizeof(T));
CRASH_COND_MSG(!data, "Out of memory");
}
@@ -87,7 +83,7 @@ public:
}
/// Removes the item copying the last value into the position of the one to
/// remove. It's generally faster than `remove`.
/// remove. It's generally faster than `remove_at`.
void remove_at_unordered(U p_index) {
ERR_FAIL_INDEX(p_index, count);
count--;
@@ -143,12 +139,7 @@ public:
count = p_size;
} else if (p_size > count) {
if (unlikely(p_size > capacity)) {
if (capacity == 0) {
capacity = 1;
}
while (capacity < p_size) {
capacity <<= 1;
}
capacity = tight ? p_size : nearest_power_of_2_templated(p_size);
data = (T *)memrealloc(data, capacity * sizeof(T));
CRASH_COND_MSG(!data, "Out of memory");
}

View File

@@ -305,9 +305,9 @@ struct BuildIndexSequence<0, Is...> : IndexSequence<Is...> {};
#endif
// Macro GD_IS_DEFINED() allows to check if a macro is defined. It needs to be defined to anything (say 1) to work.
#define __GDARG_PLACEHOLDER_1 0,
#define __GDARG_PLACEHOLDER_1 false,
#define __gd_take_second_arg(__ignored, val, ...) val
#define ____gd_is_defined(arg1_or_junk) __gd_take_second_arg(arg1_or_junk 1, 0)
#define ____gd_is_defined(arg1_or_junk) __gd_take_second_arg(arg1_or_junk true, false)
#define ___gd_is_defined(val) ____gd_is_defined(__GDARG_PLACEHOLDER_##val)
#define GD_IS_DEFINED(x) ___gd_is_defined(x)

View File

@@ -466,7 +466,7 @@ Array Array::slice(int p_begin, int p_end, int p_step, bool p_deep) const {
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.");
int result_size = (end - begin) / p_step;
int result_size = (end - begin) / p_step + (((end - begin) % p_step != 0) ? 1 : 0);
result.resize(result_size);
for (int src_idx = begin, dest_idx = 0; dest_idx < result_size; ++dest_idx) {

View File

@@ -2941,7 +2941,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
return hash_one_uint64((uint64_t)_data._int);
} break;
case FLOAT: {
return hash_murmur3_one_float(_data._float);
return hash_murmur3_one_double(_data._float);
} break;
case STRING: {
return reinterpret_cast<const String *>(_data._mem)->hash();
@@ -3158,7 +3158,7 @@ uint32_t Variant::recursive_hash(int recursion_count) const {
}
return hash_fmix32(h);
} else {
return hash_murmur3_one_float(0.0);
return hash_murmur3_one_double(0.0);
}
} break;
@@ -3659,9 +3659,9 @@ String Variant::get_call_error_text(Object *p_base, const StringName &p_method,
err_text = "Cannot convert argument " + itos(errorarg + 1) + " from [missing argptr, type unknown] to " + Variant::get_type_name(Variant::Type(ce.expected));
}
} else if (ce.error == Callable::CallError::CALL_ERROR_TOO_MANY_ARGUMENTS) {
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount);
err_text = "Method expected " + itos(ce.expected) + " arguments, but called with " + itos(p_argcount);
} else if (ce.error == Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS) {
err_text = "Method expected " + itos(ce.argument) + " arguments, but called with " + itos(p_argcount);
err_text = "Method expected " + itos(ce.expected) + " arguments, but called with " + itos(p_argcount);
} else if (ce.error == Callable::CallError::CALL_ERROR_INVALID_METHOD) {
err_text = "Method not found";
} else if (ce.error == Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL) {

View File

@@ -1906,7 +1906,7 @@ static void _register_variant_builtin_methods() {
bind_method(Vector4, distance_squared_to, sarray("to"), varray());
bind_method(Vector4, dot, sarray("with"), varray());
bind_method(Vector4, inverse, sarray(), varray());
bind_method(Vector4, is_equal_approx, sarray("with"), varray());
bind_method(Vector4, is_equal_approx, sarray("to"), varray());
bind_method(Vector4, is_zero_approx, sarray(), varray());
bind_method(Vector4, is_finite, sarray(), varray());

View File

@@ -374,6 +374,7 @@ struct VariantUtilityFunctions {
r_error.error = Callable::CallError::CALL_OK;
if (from.get_type() != to.get_type()) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
r_error.expected = from.get_type();
r_error.argument = 1;
return Variant();
}
@@ -542,7 +543,8 @@ struct VariantUtilityFunctions {
}
Variant base = *p_args[0];
Variant ret;
for (int i = 1; i < p_argcount; i++) {
for (int i = 0; i < p_argcount; i++) {
Variant::Type arg_type = p_args[i]->get_type();
if (arg_type != Variant::INT && arg_type != Variant::FLOAT) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
@@ -550,6 +552,9 @@ struct VariantUtilityFunctions {
r_error.argument = i;
return Variant();
}
if (i == 0) {
continue;
}
bool valid;
Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid);
if (!valid) {
@@ -582,7 +587,8 @@ struct VariantUtilityFunctions {
}
Variant base = *p_args[0];
Variant ret;
for (int i = 1; i < p_argcount; i++) {
for (int i = 0; i < p_argcount; i++) {
Variant::Type arg_type = p_args[i]->get_type();
if (arg_type != Variant::INT && arg_type != Variant::FLOAT) {
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
@@ -590,6 +596,9 @@ struct VariantUtilityFunctions {
r_error.argument = i;
return Variant();
}
if (i == 0) {
continue;
}
bool valid;
Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid);
if (!valid) {

View File

@@ -40,13 +40,13 @@
// Defines the main "branch" version. Patch versions in this branch should be
// forward-compatible.
// Example: "3.1"
#define VERSION_BRANCH "" _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
#define VERSION_BRANCH _MKSTR(VERSION_MAJOR) "." _MKSTR(VERSION_MINOR)
#if VERSION_PATCH
// Example: "3.1.4"
#define VERSION_NUMBER "" VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
#define VERSION_NUMBER VERSION_BRANCH "." _MKSTR(VERSION_PATCH)
#else // patch is 0, we don't include it in the "pretty" version number.
// Example: "3.1" instead of "3.1.0"
#define VERSION_NUMBER "" VERSION_BRANCH
#define VERSION_NUMBER VERSION_BRANCH
#endif // VERSION_PATCH
// Version number encoded as hexadecimal int with one byte for each number,
@@ -57,16 +57,16 @@
// Describes the full configuration of that Godot version, including the version number,
// the status (beta, stable, etc.) and potential module-specific features (e.g. mono).
// Example: "3.1.4.stable.mono"
#define VERSION_FULL_CONFIG "" VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
#define VERSION_FULL_CONFIG VERSION_NUMBER "." VERSION_STATUS VERSION_MODULE_CONFIG
// Similar to VERSION_FULL_CONFIG, but also includes the (potentially custom) VERSION_BUILD
// description (e.g. official, custom_build, etc.).
// Example: "3.1.4.stable.mono.official"
#define VERSION_FULL_BUILD "" VERSION_FULL_CONFIG "." VERSION_BUILD
#define VERSION_FULL_BUILD VERSION_FULL_CONFIG "." VERSION_BUILD
// Same as above, but prepended with Godot's name and a cosmetic "v" for "version".
// Example: "Godot v3.1.4.stable.official.mono"
#define VERSION_FULL_NAME "" VERSION_NAME " v" VERSION_FULL_BUILD
#define VERSION_FULL_NAME VERSION_NAME " v" VERSION_FULL_BUILD
// Git commit hash, generated at build time in `core/version_hash.gen.cpp`.
extern const char *const VERSION_HASH;

View File

@@ -1,28 +1,28 @@
BASEDIR = .
CLASSES = $(BASEDIR)/classes/ $(BASEDIR)/../modules/
CLASSES = "$(BASEDIR)/classes/" "$(BASEDIR)/../modules/"
OUTPUTDIR = $(BASEDIR)/_build
TOOLSDIR = $(BASEDIR)/tools
JSDIR = $(BASEDIR)/../platform/web
JSDIR = "$(BASEDIR)/../platform/web"
LANGARG ?= en
LANGCMD = -l $(LANGARG)
.ONESHELL:
clean:
rm -rf $(OUTPUTDIR)
rm -rf "$(OUTPUTDIR)"
doxygen:
rm -rf $(OUTPUTDIR)/doxygen
mkdir -p $(OUTPUTDIR)/doxygen
rm -rf "$(OUTPUTDIR)/doxygen"
mkdir -p "$(OUTPUTDIR)/doxygen"
doxygen Doxyfile
rst:
rm -rf $(OUTPUTDIR)/rst
mkdir -p $(OUTPUTDIR)/rst
python3 $(TOOLSDIR)/make_rst.py -o $(OUTPUTDIR)/rst $(LANGCMD) $(CLASSES)
rm -rf "$(OUTPUTDIR)/rst"
mkdir -p "$(OUTPUTDIR)/rst"
python3 "$(TOOLSDIR)/make_rst.py" -o "$(OUTPUTDIR)/rst" "$(LANGCMD)" $(CLASSES)
rstjs:
rm -rf $(OUTPUTDIR)/rstjs
mkdir -p $(OUTPUTDIR)/rstjs
npm --prefix $(JSDIR) ci
npm --prefix $(JSDIR) run docs -- --destination $(OUTPUTDIR)/rstjs/html5_shell_classref.rst
rm -rf "$(OUTPUTDIR)/rstjs"
mkdir -p "$(OUTPUTDIR)/rstjs"
npm --prefix "$(JSDIR)" ci
npm --prefix "$(JSDIR)" run docs -- --destination "$(OUTPUTDIR)/rstjs/html5_shell_classref.rst"

View File

@@ -65,7 +65,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN].
Returns the arc cosine of [param x] in radians. Use to get the angle of cosine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method acos] from returning [constant @GDScript.NAN].
[codeblock]
# c is 0.523599 or 30 degrees if converted with rad_to_deg(c)
var c = acos(0.866025)
@@ -76,7 +76,7 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN].
Returns the arc sine of [param x] in radians. Use to get the angle of sine [param x]. [param x] will be clamped between [code]-1.0[/code] and [code]1.0[/code] (inclusive), in order to prevent [method asin] from returning [constant @GDScript.NAN].
[codeblock]
# s is 0.523599 or 30 degrees if converted with rad_to_deg(s)
var s = asin(0.5)
@@ -622,7 +622,7 @@
<description>
Linearly interpolates between two values by the factor defined in [param weight]. To perform interpolation, [param weight] should be between [code]0.0[/code] and [code]1.0[/code] (inclusive). However, values outside this range are allowed and can be used to perform [i]extrapolation[/i]. If this is not desired, use [method clampf] on the result of this function.
[codeblock]
lerp(0, 4, 0.75) # Returns 3.0
lerpf(0, 4, 0.75) # Returns 3.0
[/codeblock]
See also [method inverse_lerp] which performs the reverse of this operation. To perform eased interpolation with [method lerp], combine it with [method ease] or [method smoothstep].
</description>
@@ -645,8 +645,8 @@
<return type="float" />
<param index="0" name="x" type="float" />
<description>
Returns the natural logarithm of [param x]. This is the amount of time needed to reach a certain level of continuous growth.
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm.
Returns the [url=https://en.wikipedia.org/wiki/Natural_logarithm]natural logarithm[/url] of [param x] (base [url=https://en.wikipedia.org/wiki/E_(mathematical_constant)][i]e[/i][/url], with [i]e[/i] being approximately 2.71828). This is the amount of time needed to reach a certain level of continuous growth.
[b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. To use base 10 logarithm, use [code]log(x) / log(10)[/code].
[codeblock]
log(10) # Returns 2.302585
[/codeblock]
@@ -826,17 +826,21 @@
</method>
<method name="print_rich" qualifiers="vararg">
<description>
Converts one or more arguments of any type to string in the best way possible and prints them to the console. The following BBCode tags are supported: b, i, u, s, indent, code, url, center, right, color, bgcolor, fgcolor. Color tags only support named colors such as [code]red[/code], [i]not[/i] hexadecimal color codes. Unsupported tags will be left as-is in standard output.
When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Displaying ANSI escape codes is currently only supported on Linux and macOS. Support for ANSI escape codes may vary across terminal emulators, especially for italic and strikethrough.
Converts one or more arguments of any type to string in the best way possible and prints them to the console.
The following BBCode tags are supported: [code]b[/code], [code]i[/code], [code]u[/code], [code]s[/code], [code]indent[/code], [code]code[/code], [code]url[/code], [code]center[/code], [code]right[/code], [code]color[/code], [code]bgcolor[/code], [code]fgcolor[/code].
Color tags only support the following named colors: [code]black[/code], [code]red[/code], [code]green[/code], [code]yellow[/code], [code]blue[/code], [code]magenta[/code], [code]pink[/code], [code]purple[/code], [code]cyan[/code], [code]white[/code], [code]orange[/code], [code]gray[/code]. Hexadecimal color codes are not supported.
URL tags only support URLs wrapped by an URL tag, not URLs with a different title.
When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.
[codeblocks]
[gdscript]
print_rich("[code][b]Hello world![/b][/code]") # Prints out: [b]Hello world![/b]
print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
[/gdscript]
[csharp]
GD.PrintRich("[code][b]Hello world![/b][/code]"); // Prints out: [b]Hello world![/b]
GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
[/csharp]
[/codeblocks]
[b]Note:[/b] Consider using [method push_error] and [method push_warning] to print error and warning messages instead of [method print] or [method print_rich]. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed.
[b]Note:[/b] On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output.
</description>
</method>
<method name="print_verbose" qualifiers="vararg">
@@ -1142,9 +1146,9 @@
<description>
Returns [code]-1.0[/code] if [param x] is negative, [code]1.0[/code] if [param x] is positive, and [code]0.0[/code] if [param x] is zero.
[codeblock]
sign(-6.5) # Returns -1.0
sign(0.0) # Returns 0.0
sign(6.5) # Returns 1.0
signf(-6.5) # Returns -1.0
signf(0.0) # Returns 0.0
signf(6.5) # Returns 1.0
[/codeblock]
</description>
</method>
@@ -1154,9 +1158,9 @@
<description>
Returns [code]-1[/code] if [param x] is negative, [code]1[/code] if [param x] is positive, and [code]0[/code] if if [param x] is zero.
[codeblock]
sign(-6) # Returns -1
sign(0) # Returns 0
sign(6) # Returns 1
signi(-6) # Returns -1
signi(0) # Returns 0
signi(6) # Returns 1
[/codeblock]
</description>
</method>
@@ -1226,8 +1230,8 @@
Returns the multiple of [param step] that is the closest to [param x]. This can also be used to round a floating point number to an arbitrary number of decimals.
A type-safe version of [method snapped], returning a [float].
[codeblock]
snapped(32.0, 2.5) # Returns 32.5
snapped(3.14159, 0.01) # Returns 3.14
snappedf(32.0, 2.5) # Returns 32.5
snappedf(3.14159, 0.01) # Returns 3.14
[/codeblock]
</description>
</method>
@@ -1239,8 +1243,8 @@
Returns the multiple of [param step] that is the closest to [param x].
A type-safe version of [method snapped], returning an [int].
[codeblock]
snapped(53, 16) # Returns 48
snapped(4096, 100) # Returns 4100
snappedi(53, 16) # Returns 48
snappedi(4096, 100) # Returns 4100
[/codeblock]
</description>
</method>
@@ -2432,10 +2436,10 @@
Enum value which doesn't correspond to any MIDI message. This is used to initialize [enum MIDIMessage] properties with a generic state.
</constant>
<constant name="MIDI_MESSAGE_NOTE_OFF" value="8" enum="MIDIMessage">
MIDI note OFF message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
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.
</constant>
<constant name="MIDI_MESSAGE_NOTE_ON" value="9" enum="MIDIMessage">
MIDI note ON message. See the documentation of [InputEventMIDI] for information of how to use MIDI inputs.
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.
</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".
@@ -2773,6 +2777,7 @@
The property is shown in the [EditorInspector] (default).
</constant>
<constant name="PROPERTY_USAGE_INTERNAL" value="8" enum="PropertyUsageFlags" is_bitfield="true">
The property is excluded from the class reference.
</constant>
<constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags" is_bitfield="true">
The property can be checked in the [EditorInspector].
@@ -2838,10 +2843,10 @@
The property is read-only in the [EditorInspector].
</constant>
<constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags" is_bitfield="true">
Default usage (storage, editor and network).
Default usage (storage and editor).
</constant>
<constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags" is_bitfield="true">
Default usage but without showing the property in the editor (storage, network).
Default usage but without showing the property in the editor (storage).
</constant>
<constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags" is_bitfield="true">
Flag for a normal method.

View File

@@ -188,7 +188,7 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="dir" type="Vector3" />
<description>
Returns [code]true[/code] if the given ray intersects with this [AABB]. Ray length is infinite.
Returns the point of intersection of the given ray with this [AABB] or [code]null[/code] if there is no intersection. Ray length is infinite.
</description>
</method>
<method name="intersects_segment" qualifiers="const">
@@ -196,7 +196,7 @@
<param index="0" name="from" type="Vector3" />
<param index="1" name="to" type="Vector3" />
<description>
Returns [code]true[/code] if the [AABB] intersects the line segment between [param from] and [param to].
Returns the point of intersection between [param from] and [param to] with this [AABB] or [code]null[/code] if there is no intersection.
</description>
</method>
<method name="is_equal_approx" qualifiers="const">
@@ -237,7 +237,7 @@
<return type="bool" />
<param index="0" name="right" type="AABB" />
<description>
Returns [code]true[/code] if the vectors are not equal.
Returns [code]true[/code] if the AABBs 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>

View File

@@ -15,27 +15,27 @@
var key = "My secret key!!!" # Key must be either 16 or 32 bytes.
var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed.
# Encrypt ECB
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8())
var encrypted = aes.update(data.to_utf8())
aes.start(AESContext.MODE_ECB_ENCRYPT, key.to_utf8_buffer())
var encrypted = aes.update(data.to_utf8_buffer())
aes.finish()
# Decrypt ECB
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8())
aes.start(AESContext.MODE_ECB_DECRYPT, key.to_utf8_buffer())
var decrypted = aes.update(encrypted)
aes.finish()
# Check ECB
assert(decrypted == data.to_utf8())
assert(decrypted == data.to_utf8_buffer())
var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes.
# Encrypt CBC
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8(), iv.to_utf8())
encrypted = aes.update(data.to_utf8())
aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
encrypted = aes.update(data.to_utf8_buffer())
aes.finish()
# Decrypt CBC
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8(), iv.to_utf8())
aes.start(AESContext.MODE_CBC_DECRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer())
decrypted = aes.update(encrypted)
aes.finish()
# Check CBC
assert(decrypted == data.to_utf8())
assert(decrypted == data.to_utf8_buffer())
[/gdscript]
[csharp]
using Godot;
@@ -50,27 +50,27 @@
string key = "My secret key!!!"; // Key must be either 16 or 32 bytes.
string data = "My secret text!!"; // Data size must be multiple of 16 bytes, apply padding if needed.
// Encrypt ECB
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8());
byte[] encrypted = _aes.Update(data.ToUtf8());
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer());
byte[] encrypted = _aes.Update(data.ToUtf8Buffer());
_aes.Finish();
// Decrypt ECB
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8());
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer());
byte[] decrypted = _aes.Update(encrypted);
_aes.Finish();
// Check ECB
Debug.Assert(decrypted == data.ToUtf8());
Debug.Assert(decrypted == data.ToUtf8Buffer());
string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes.
// Encrypt CBC
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8(), iv.ToUtf8());
encrypted = _aes.Update(data.ToUtf8());
_aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
encrypted = _aes.Update(data.ToUtf8Buffer());
_aes.Finish();
// Decrypt CBC
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8(), iv.ToUtf8());
_aes.Start(AesContext.Mode.EcbDecrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer());
decrypted = _aes.Update(encrypted);
_aes.Finish();
// Check CBC
Debug.Assert(decrypted == data.ToUtf8());
Debug.Assert(decrypted == data.ToUtf8Buffer());
}
}
[/csharp]

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors.
Physics body for 2D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors.
</brief_description>
<description>
Animatable body for 2D physics.

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors.
Physics body for 3D physics which moves only by script or animation (while affecting other bodies on its path). Useful for moving platforms and doors.
</brief_description>
<description>
Animatable body for 3D physics.

View File

@@ -230,7 +230,7 @@
</methods>
<members>
<member name="assigned_animation" type="String" setter="set_assigned_animation" getter="get_assigned_animation">
If playing, the the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
If playing, the current animation's key, otherwise, the animation last played. When set, this changes the animation, but will not play it unless already playing. See also [member current_animation].
</member>
<member name="audio_max_polyphony" type="int" setter="set_audio_max_polyphony" getter="get_audio_max_polyphony" default="32">
The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers.

View File

@@ -128,7 +128,7 @@
The magnitude of area-specific wind force.
</member>
<member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath(&quot;&quot;)">
The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform.
The [Node3D] which is used to specify the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform.
</member>
</members>
<signals>

View File

@@ -41,7 +41,6 @@
[b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior.
[b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
</description>
<tutorials>
</tutorials>
@@ -442,12 +441,23 @@
<return type="Variant" />
<description>
Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
To find the maximum value using a custom comparator, you can use [method reduce]. In this example every array element is checked and the first maximum value is returned:
[codeblock]
func _ready():
var arr = [Vector2(0, 1), Vector2(2, 0), Vector2(1, 1), Vector2(1, 0), Vector2(0, 2)]
# In this example we compare the lengths.
print(arr.reduce(func(max, val): return val if is_length_greater(val, max) else max))
func is_length_greater(a, b):
return a.length() &gt; b.length()
[/codeblock]
</description>
</method>
<method name="min" qualifiers="const">
<return type="Variant" />
<description>
Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned.
See also [method max] for an example of using a custom comparator.
</description>
</method>
<method name="pick_random" qualifiers="const">

View File

@@ -1,16 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AudioStreamGenerator" inherits="AudioStream" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Audio stream that generates sounds procedurally.
An audio stream with utilities for procedural sound generation.
</brief_description>
<description>
This audio stream does not play back sounds, but expects a script to generate audio data for it instead. See also [AudioStreamGeneratorPlayback].
[AudioStreamGenerator] is a type of audio stream that does not play back sounds on its own; instead, it expects a script to generate audio data for it. See also [AudioStreamGeneratorPlayback].
Here's a sample on how to use it to generate a sine wave:
[codeblock]
var playback # Will hold the AudioStreamGeneratorPlayback.
@onready var sample_hz = $AudioStreamPlayer.stream.mix_rate
var pulse_hz = 440.0 # The frequency of the sound wave.
func _ready():
$AudioStreamPlayer.play()
playback = $AudioStreamPlayer.get_stream_playback()
fill_buffer()
func fill_buffer():
var phase = 0.0
var increment = pulse_hz / sample_hz
var frames_available = playback.get_frames_available()
for i in range(frames_available):
playback.push_frame(Vector2.ONE * sin(phase * TAU))
phase = fmod(phase + increment, 1.0)
[/codeblock]
In the example above, the "AudioStreamPlayer" node must use an [AudioStreamGenerator] as its stream. The [code]fill_buffer[/code] function provides audio data for approximating a sine wave.
See also [AudioEffectSpectrumAnalyzer] for performing real-time audio spectrum analysis.
[b]Note:[/b] Due to performance constraints, this class is best used from C# or from a compiled language via GDExtension. If you still want to use this class from GDScript, consider using a lower [member mix_rate] such as 11,025 Hz or 22,050 Hz.
</description>
<tutorials>
<link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link>
<link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link>
</tutorials>
<members>
<member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.5">

View File

@@ -356,13 +356,13 @@
[b]Note:[/b] [member specular_mode] only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, [VoxelGI], SDFGI or [ReflectionProbe]s. To disable reflections from these sources as well, set [member metallic_specular] to [code]0.0[/code] instead.
</member>
<member name="subsurf_scatter_enabled" type="bool" setter="set_feature" getter="get_feature" default="false">
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges.
If [code]true[/code], subsurface scattering is enabled. Emulates light that penetrates an object's surface, is scattered, and then emerges. Subsurface scattering quality is controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_quality].
</member>
<member name="subsurf_scatter_skin_mode" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], subsurface scattering will use a special mode optimized for the color and density of human skin, such as boosting the intensity of the red channel in subsurface scattering.
</member>
<member name="subsurf_scatter_strength" type="float" setter="set_subsurface_scattering_strength" getter="get_subsurface_scattering_strength" default="0.0">
The strength of the subsurface scattering effect.
The strength of the subsurface scattering effect. The depth of the effect is also controlled by [member ProjectSettings.rendering/environment/subsurface_scattering/subsurface_scattering_scale], which is set globally.
</member>
<member name="subsurf_scatter_texture" type="Texture2D" setter="set_texture" getter="get_texture">
Texture used to control the subsurface scattering strength. Stored in the red texture channel. Multiplied by [member subsurf_scatter_strength].
@@ -390,7 +390,7 @@
Repeat flags for the texture. See [enum TextureFilter] for options.
</member>
<member name="transparency" type="int" setter="set_transparency" getter="get_transparency" enum="BaseMaterial3D.Transparency" default="0">
If [code]true[/code], transparency is enabled on the body. Some transparency modes will disable shadow casting. Any transparency mode other than Disabled has a greater performance impact compared to opaque rendering. See also [member blend_mode].
The material's transparency mode. Some transparency modes will disable shadow casting. Any transparency mode other than [constant TRANSPARENCY_DISABLED] has a greater performance impact compared to opaque rendering. See also [member blend_mode].
</member>
<member name="use_particle_trails" type="bool" setter="set_flag" getter="get_flag" default="false">
If [code]true[/code], enables parts of the shader required for [GPUParticles3D] trails to function. This also requires using a mesh with appropriate skinning, such as [RibbonTrailMesh] or [TubeTrailMesh]. Enabling this feature outside of materials used in [GPUParticles3D] meshes will break material rendering.

View File

@@ -294,7 +294,7 @@
Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles.
</member>
<member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false">
If set to true, three different scale curves can be specified, one per scale axis.
If set to [code]true[/code], three different scale curves can be specified, one per scale axis.
</member>
<member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0">
Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes.

View File

@@ -76,14 +76,16 @@
<method name="bind" qualifiers="vararg const">
<return type="Callable" />
<description>
Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call].
Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
</description>
</method>
<method name="bindv">
<return type="Callable" />
<param index="0" name="arguments" type="Array" />
<description>
Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call].
Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. See also [method unbind].
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
</description>
</method>
<method name="call" qualifiers="vararg const">
@@ -187,7 +189,13 @@
<return type="Callable" />
<param index="0" name="argcount" type="int" />
<description>
Returns a copy of this [Callable] with the arguments unbound, as defined by [param argcount]. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method.
Returns a copy of this [Callable] with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to [param argcount]. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also [method bind].
[b]Note:[/b] When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left.
[codeblock]
func _ready():
foo.unbind(1).call(1, 2) # Calls foo(1).
foo.bind(3, 4).unbind(1).call(1, 2) # Calls foo(1, 3, 4), note that it does not change the arguments from bind.
[/codeblock]
</description>
</method>
</methods>

View File

@@ -237,7 +237,7 @@
<param index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" />
<param index="3" name="texture" type="Texture2D" default="null" />
<description>
Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors].
Draws a solid polygon of any number of points, convex or concave. Unlike [method draw_colored_polygon], each point's color can be changed individually. See also [method draw_polyline] and [method draw_polyline_colors]. If you need more flexibility (such as being able to use bones), use [method RenderingServer.canvas_item_add_triangle_array] instead.
</description>
</method>
<method name="draw_polyline">
@@ -279,7 +279,7 @@
<param index="2" name="filled" type="bool" default="true" />
<param index="3" name="width" type="float" default="-1.0" />
<description>
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified.
Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect].
If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code].
[b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code].
[b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]).
@@ -380,7 +380,7 @@
<param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" />
<param index="4" name="transpose" type="bool" default="false" />
<description>
Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
Draws a textured rectangle at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_rect] and [method draw_texture_rect_region].
</description>
</method>
<method name="draw_texture_rect_region">
@@ -392,7 +392,7 @@
<param index="4" name="transpose" type="bool" default="false" />
<param index="5" name="clip_uv" type="bool" default="true" />
<description>
Draws a textured rectangle region at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped.
Draws a textured rectangle from a texture's region (specified by [param src_rect]) at a given position, optionally modulated by a color. If [param transpose] is [code]true[/code], the texture will have its X and Y coordinates swapped. See also [method draw_texture_rect].
</description>
</method>
<method name="force_update_transform">
@@ -423,6 +423,7 @@
<return type="Vector2" />
<description>
Returns the mouse's position in the [CanvasLayer] that this [CanvasItem] is in using the coordinate system of the [CanvasLayer].
[b]Note:[/b] For screen-space coordinates (e.g. when using a non-embedded [Popup]), you can use [method DisplayServer.mouse_get_position].
</description>
</method>
<method name="get_global_transform" qualifiers="const">
@@ -502,7 +503,7 @@
<method name="is_visible_in_tree" qualifiers="const">
<return type="bool" />
<description>
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is consequently not drawn (see [method _draw]).
</description>
</method>
<method name="make_canvas_position_local" qualifiers="const">
@@ -569,13 +570,14 @@
The rendering layers in which this [CanvasItem] responds to [Light2D] nodes.
</member>
<member name="material" type="Material" setter="set_material" getter="get_material">
The material applied to textures on this [CanvasItem].
The material applied to this [CanvasItem].
</member>
<member name="modulate" type="Color" setter="set_modulate" getter="get_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem].
The color applied to this [CanvasItem]. This property does affect child [CanvasItem]s, unlike [member self_modulate] which only affects the node itself.
</member>
<member name="self_modulate" type="Color" setter="set_self_modulate" getter="get_self_modulate" default="Color(1, 1, 1, 1)">
The color applied to textures on this [CanvasItem]. This is not inherited by children [CanvasItem]s.
The color applied to this [CanvasItem]. This property does [b]not[/b] affect child [CanvasItem]s, unlike [member modulate] which affects both the node itself and its children.
[b]Note:[/b] Internal children (e.g. sliders in [ColorPicker] or tab bar in [TabContainer]) are also not affected by this property (see [code]include_internal[/code] parameter of [method Node.get_child] and other similar methods).
</member>
<member name="show_behind_parent" type="bool" setter="set_draw_behind_parent" getter="is_draw_behind_parent_enabled" default="false">
If [code]true[/code], the object draws behind its parent.
@@ -596,7 +598,7 @@
The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask.
</member>
<member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true">
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its ancestors are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]).
[b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead.
</member>
<member name="y_sort_enabled" type="bool" setter="set_y_sort_enabled" getter="is_y_sort_enabled" default="false">

View File

@@ -15,6 +15,12 @@
<link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link>
</tutorials>
<methods>
<method name="apply_floor_snap">
<return type="void" />
<description>
Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_floor_angle" qualifiers="const">
<return type="float" />
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
@@ -67,8 +73,8 @@
[codeblocks]
[gdscript]
for i in get_slide_collision_count():
var collision = get_slide_collision(i)
print("Collided with: ", collision.collider.name)
var collision = get_slide_collision(i)
print("Collided with: ", collision.get_collider().name)
[/gdscript]
[csharp]
for (int i = 0; i &lt; GetSlideCollisionCount(); i++)
@@ -152,7 +158,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap].
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.

View File

@@ -17,6 +17,12 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
<method name="apply_floor_snap">
<return type="void" />
<description>
Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when [method is_on_floor] returns [code]true[/code].
</description>
</method>
<method name="get_floor_angle" qualifiers="const">
<return type="float" />
<param index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
@@ -144,7 +150,7 @@
</member>
<member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1">
Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction].
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping.
As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use [method apply_floor_snap].
</member>
<member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true">
If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still.

View File

@@ -537,7 +537,7 @@
Marks the option as a member.
</constant>
<constant name="KIND_ENUM" value="5" enum="CodeCompletionKind">
Marks the option as a enum entry.
Marks the option as an enum entry.
</constant>
<constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind">
Marks the option as a constant.

View File

@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionPolygon2D" inherits="Node2D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Defines a 2D collision polygon.
Node that represents a 2D collision polygon.
</brief_description>
<description>
Provides a concave or convex 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices. See also [ConvexPolygonShape2D].
Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices.
Depending on the build mode, this node effectively provides several convex shapes (by convex decomposition of the polygon) or a single concave shape made of the polygon's segments.
In the editor, a [CollisionPolygon2D] can be generated from a [Sprite2D]'s outline by selecting a [Sprite2D] node, going to the [b]Sprite2D[/b] menu at the top of the 2D editor viewport then choosing [b]Create CollisionPolygon2D Sibling[/b].
</description>
<tutorials>
@@ -24,15 +25,16 @@
The margin used for one-way collision (in pixels). Higher values will make the shape thicker, and work better for colliders that enter the polygon at a high velocity.
</member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PackedVector2Array], not a reference.
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]Warning:[/b] The returned value is a clone of the [PackedVector2Array], not a reference.
</member>
</members>
<constants>
<constant name="BUILD_SOLIDS" value="0" enum="BuildMode">
Collisions will include the polygon and its contained area.
Collisions will include the polygon and its contained area. In this mode the node has the same effect as several [ConvexPolygonShape2D] nodes, one for each convex shape in the convex decomposition of the polygon (but without the overhead of multiple nodes).
</constant>
<constant name="BUILD_SEGMENTS" value="1" enum="BuildMode">
Collisions will only include the polygon edges.
Collisions will only include the polygon edges. In this mode the node has the same effect as a single [ConcavePolygonShape2D] made of segments, with the restriction that each segment (after the first one) starts where the previous one ends, and the last one ends where the first one starts (forming a closed but hollow polygon).
</constant>
</constants>
</class>

View File

@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="CollisionPolygon3D" inherits="Node3D" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Editor-only node for defining a collision polygon in 3D space.
Node that represents a 3D collision polygon, given by the thickening of a 2D polygon in the local XY plane along the local Z axis.
</brief_description>
<description>
Allows editing a concave or convex collision polygon's vertices on a selected plane. Can also set a depth perpendicular to that plane. This class is only available in the editor. It will not appear in the scene tree at run-time. Creates several [ConvexPolygonShape3D]s at run-time to represent the original polygon using convex decomposition.
[b]Note:[/b] Since this is an editor-only helper, properties modified during gameplay will have no effect.
Provides a 3D collision polygon to a [CollisionObject3D] parent, by thickening a 2D (convex or concave) polygon in the local XY plane along the local Z axis. The 2D polygon in the local XY plane can be drawn in the editor or specified by a list of vertices. That 2D polygon is thickened evenly in the local Z and -Z directions.
This node has the same effect as several [ConvexPolygonShape3D] nodes, created by thickening the 2D convex polygons in the convex decomposition of the given 2D polygon (but without the overhead of multiple nodes).
[b]Warning:[/b] A non-uniformly scaled CollisionPolygon3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change its [member polygon]'s vertices instead.
</description>
<tutorials>
</tutorials>
<members>
<member name="depth" type="float" setter="set_depth" getter="get_depth" default="1.0">
Length that the resulting collision extends in either direction perpendicular to its polygon.
Length that the resulting collision extends in either direction perpendicular to its 2D polygon.
</member>
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false">
If [code]true[/code], no collision will be produced.
@@ -21,7 +21,7 @@
The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details.
</member>
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
Array of vertices which define the polygon.
Array of vertices which define the 2D polygon in the local XY plane.
[b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
</member>
</members>

View File

@@ -4,7 +4,7 @@
Node that represents collision shape data in 2D space.
</brief_description>
<description>
Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject2D.shape_owner_get_shape] to get the actual shape.
Editor facility for creating and editing collision shapes in 2D space. Set the [member shape] property to configure the shape.
You can use this node to represent all sorts of collision shapes, for example, add this to an [Area2D] to give it a detection shape, or add it to a [PhysicsBody2D] to create a solid object.
</description>
<tutorials>

View File

@@ -4,7 +4,7 @@
Node that represents collision shape data in 3D space.
</brief_description>
<description>
Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape. [b]IMPORTANT[/b]: this is an Editor-only helper to create shapes, use [method CollisionObject3D.shape_owner_get_shape] to get the actual shape.
Editor facility for creating and editing collision shapes in 3D space. Set the [member shape] property to configure the shape.
You can use this node to represent all sorts of collision shapes, for example, add this to an [Area3D] to give it a detection shape, or add it to a [PhysicsBody3D] to create a solid object.
[b]Warning:[/b] A non-uniformly scaled CollisionShape3D node will probably not function as expected. Please make sure to keep its scale uniform (i.e. the same on all axes), and change the size of its [member shape] resource instead.
</description>

View File

@@ -5,10 +5,11 @@
</brief_description>
<description>
A cubemap that is loaded from a [code].ccube[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemap] can use one of 4 compresson methods:
- Uncompressed (uncompressed on the GPU)
- Lossless (WebP or PNG, uncompressed on the GPU)
- Lossy (WebP, uncompressed on the GPU)
- VRAM Compressed (compressed on the GPU)
- VRAM Uncompressed (uncompressed on the GPU)
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
See [Cubemap] for a general description of cubemaps.

View File

@@ -5,10 +5,11 @@
</brief_description>
<description>
A cubemap array that is loaded from a [code].ccubearray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedCubemapArray] can use one of 4 compresson methods:
- Uncompressed (uncompressed on the GPU)
- Lossless (WebP or PNG, uncompressed on the GPU)
- Lossy (WebP, uncompressed on the GPU)
- VRAM Compressed (compressed on the GPU)
- VRAM Uncompressed (uncompressed on the GPU)
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
See [CubemapArray] for a general description of cubemap arrays.

View File

@@ -5,10 +5,11 @@
</brief_description>
<description>
A texture that is loaded from a [code].ctex[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compression methods (including a lack of any compression):
- Uncompressed (uncompressed on the GPU)
- Lossless (WebP or PNG, uncompressed on the GPU)
- Lossy (WebP, uncompressed on the GPU)
- VRAM Compressed (compressed on the GPU)
- VRAM Uncompressed (uncompressed on the GPU)
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
</description>

View File

@@ -5,10 +5,11 @@
</brief_description>
<description>
A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2DArray] can use one of 4 compresson methods:
- Uncompressed (uncompressed on the GPU)
- Lossless (WebP or PNG, uncompressed on the GPU)
- Lossy (WebP, uncompressed on the GPU)
- VRAM Compressed (compressed on the GPU)
- VRAM Uncompressed (uncompressed on the GPU)
- Basis Universal (compressed on the GPU. Lower file sizes than VRAM Compressed, but slower to compress and lower quality than VRAM Compressed)
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
See [Texture2DArray] for a general description of texture arrays.

View File

@@ -4,13 +4,7 @@
Base class for texture arrays that can optionally be compressed.
</brief_description>
<description>
A texture array that is loaded from a [code].ctexarray[/code] file. This file format is internal to Godot; it is created by importing other image formats with the import system. [CompressedTexture2D] can use one of 4 compresson methods:
- Uncompressed (uncompressed on the GPU)
- Lossless (WebP or PNG, uncompressed on the GPU)
- Lossy (WebP, uncompressed on the GPU)
- VRAM Compressed (compressed on the GPU)
Only [b]VRAM Compressed[/b] actually reduces the memory usage on the GPU. The [b]Lossless[/b] and [b]Lossy[/b] compression methods will reduce the required storage on disk, but they will not reduce memory usage on the GPU as the texture is sent to the GPU uncompressed.
Using [b]VRAM Compressed[/b] also improves loading times, as VRAM-compressed textures are faster to load compared to textures using lossless or lossy compression. VRAM compression can exhibit noticeable artifacts and is intended to be used for 3D rendering, not 2D.
Base class for [CompressedTexture2DArray] and [CompressedTexture3D]. Cannot be used directly, but contains all the functions necessary for accessing the derived resource types. See also [TextureLayered].
</description>
<tutorials>
</tutorials>

View File

@@ -4,16 +4,19 @@
Concave polygon shape resource for 2D physics.
</brief_description>
<description>
2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. It is made out of segments and is optimal for complex polygonal concave collisions. However, it is not advised to use for [RigidBody2D] nodes. A CollisionPolygon2D in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better for static collisions.
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first.
2D concave polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node.
The shape consists of a collection of line segments, and as such it does not include any "inside" that the segments might be enclosing. If the segments do enclose anything, then the shape is [i]hollow[/i], as opposed to a [ConvexPolygonShape2D] which is solid. See also [CollisionPolygon2D].
Being made out of line segments, this shape is the most freely configurable single 2D shape. It can be used to form (hollow) polygons of any nature, convex or concave.
[b]Note:[/b] When used for collision, [b]ConcavePolygonShape2D[/b] is intended to work with static [PhysicsBody2D] nodes like [StaticBody2D] and is not recommended to use with [RigidBody2D] nodes in a mode other than Static. A [CollisionPolygon2D] in convex decomposition mode (solids) or several convex objects are advised for that instead. Otherwise, a concave polygon 2D shape is better suited for static bodies.
[b]Warning:[/b] The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body [i]Ball[/i] traveling toward a static body [i]Box[/i] at high speed. If the box uses a [b]ConcavePolygonShape2D[/b] consisting of four segments, then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual segments of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body.
[b]Warning:[/b] Using this shape for an [Area2D] (via a [CollisionShape2D] node) may give unexpected results: the area will only detect collisions with the segments in the [ConcavePolygonShape2D] (and not with any "inside" of the shape, for example).
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape2D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape2D] will perform better. For dynamic physics bodies that need concave collision, several [ConvexPolygonShape2D]s can be used to represent its collision by using convex decomposition; see [ConvexPolygonShape2D]'s documentation for instructions. However, consider using primitive collision shapes such as [CircleShape2D] or [RectangleShape2D] first.
</description>
<tutorials>
</tutorials>
<members>
<member name="segments" type="PackedVector2Array" setter="set_segments" getter="get_segments" default="PackedVector2Array()">
The array of points that make up the [ConcavePolygonShape2D]'s line segments.
The array of points that make up the [ConcavePolygonShape2D]'s line segments. The array (of length divisible by two) is naturally divided into pairs (one pair for each segment); each pair consists of the starting point of a segment and the endpoint of a segment.
</member>
</members>
</class>

View File

@@ -4,10 +4,13 @@
Concave polygon shape resource (also called "trimesh") for 3D physics.
</brief_description>
<description>
3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. This shape is created by feeding a list of triangles. Despite its name, [ConcavePolygonShape3D] can also store convex polygon shapes. However, unlike [ConvexPolygonShape3D], [ConcavePolygonShape3D] is [i]not[/i] limited to storing convex shapes exclusively.
[b]Note:[/b] When used for collision, [ConcavePolygonShape3D] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] with a mode other than Static.
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. 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. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first.
3D concave polygon shape resource (also called "trimesh") to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node.
The shape consists of a collection of triangle faces, and as such it does not include any "inside" that the faces might be enclosing. If the faces enclose anything, then the shape is [i]hollow[/i], as opposed to a [ConvexPolygonShape3D] which is solid. See also [CollisionPolygon3D].
Being made out of triangle faces, this shape is the most freely configurable single 3D shape. Despite its name, it can be used to form (hollow) polyhedra of any nature, convex or concave.
[b]Note:[/b] When used for collision, [b]ConcavePolygonShape3D[/b] is intended to work with static [PhysicsBody3D] nodes like [StaticBody3D] and will not work with [CharacterBody3D] or [RigidBody3D] in a mode other than Static.
[b]Warning:[/b] The nature of this shape makes it extra prone to being tunneled through by (small) fast physics bodies. For example, consider a (small) rigid body [i]Ball[/i] traveling toward a static body [i]Box[/i] at high speed. If the box uses a [b]ConcavePolygonShape3D[/b] consisting of twelve triangle faces (two triangle faces for each of the six sides of the box), then the ball might end up inside the box or tunnel all the way through the box, if it goes fast enough. This is (partly) because the ball can only collide against the individual faces of the hollow box. In interactions with rigid bodies tunneling can be avoided by enabling continuous collision detection on the rigid body.
[b]Warning:[/b] Using this shape for an [Area3D] (via a [CollisionShape3D] node, created e.g. by using the [i]Create Trimesh Collision Sibling[/i] option in the [i]Mesh[/i] menu that appears when selecting a [MeshInstance3D] node) may give unexpected results: the area will only detect collisions with the triangle faces in the [ConcavePolygonShape3D] (and not with any "inside" of the shape, for example); moreover it will only detect all such collisions if [member backface_collision] is [code]true[/code].
[b]Performance:[/b] Due to its complexity, [ConcavePolygonShape3D] is the slowest collision shape to check collisions against. Its use should generally be limited to level geometry. For convex geometry, using [ConvexPolygonShape3D] will perform better. 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. However, consider using primitive collision shapes such as [SphereShape3D] or [BoxShape3D] first.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>
@@ -16,14 +19,14 @@
<method name="get_faces" qualifiers="const">
<return type="PackedVector3Array" />
<description>
Returns the faces (an array of triangles).
Returns the faces of the trimesh shape as an array of vertices. The array (of length divisible by three) is naturally divided into triples; each triple of vertices defines a triangle.
</description>
</method>
<method name="set_faces">
<return type="void" />
<param index="0" name="faces" type="PackedVector3Array" />
<description>
Sets the faces (an array of triangles).
Sets the faces of the trimesh shape from an array of vertices. The [param faces] array should be composed of triples such that each triple of vertices defines a triangle.
</description>
</method>
</methods>

View File

@@ -15,6 +15,7 @@
<return type="float" />
<param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
<description>
Returns the value of the specified parameter.
</description>
</method>
<method name="set_param">
@@ -22,6 +23,7 @@
<param index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" />
<param index="1" name="value" type="float" />
<description>
Sets the value of the specified parameter.
</description>
</method>
</methods>

View File

@@ -209,6 +209,7 @@
<return type="void" />
<description>
Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input].
[b]Note:[/b] This does not affect the methods in [Input], only the way events are propagated.
</description>
</method>
<method name="add_theme_color_override">
@@ -399,7 +400,7 @@
<return type="float" />
<param index="0" name="offset" type="int" enum="Side" />
<description>
Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
Returns the offset for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top].
</description>
</method>
<method name="get_parent_area_size" qualifiers="const">
@@ -840,7 +841,7 @@
<param index="0" name="side" type="int" enum="Side" />
<param index="1" name="neighbor" type="NodePath" />
<description>
Sets the anchor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
Sets the focus neighbor for the specified [enum Side] to the [Control] at [param neighbor] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top].
</description>
</method>
<method name="set_global_position">
@@ -937,10 +938,10 @@
Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one.
</member>
<member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the right of this one.
</member>
<member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one.
Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the top of this one.
</member>
<member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath(&quot;&quot;)">
Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action.

View File

@@ -4,9 +4,11 @@
Convex polygon shape resource for 2D physics.
</brief_description>
<description>
2D convex polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node. A convex polygon, whatever its shape, is internally decomposed into as many convex polygons as needed to ensure all collision checks against it are always done on convex polygons (which are faster to check). See also [CollisionPolygon2D].
The main difference between a [ConvexPolygonShape2D] and a [ConcavePolygonShape2D] is that a concave polygon assumes it is concave and uses a more complex method of collision detection, and a convex one forces itself to be convex to speed up collision detection.
[b]Performance:[/b] [ConvexPolygonShape2D] is faster to check collisions against compared to [ConcavePolygonShape2D], but it is slower than primitive collision shapes such as [CircleShape2D] or [RectangleShape2D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape.
2D convex polygon shape to be added as a [i]direct[/i] child of a [PhysicsBody2D] or [Area2D] using a [CollisionShape2D] node.
The shape is a [i]solid[/i] that includes all the points that it encloses, as opposed to [ConcavePolygonShape2D] which is hollow if it encloses anything. See also [CollisionPolygon2D].
The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike [ConcavePolygonShape2D]). The convexity limits the possible geometric shape of a single [ConvexPolygonShape2D]: it cannot be concave.
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved using several [ConvexPolygonShape2D] nodes or by using the [CollisionPolygon2D] node in Solids build 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] or [RectangleShape2D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes.
</description>
<tutorials>
</tutorials>
@@ -15,13 +17,14 @@
<return type="void" />
<param index="0" name="point_cloud" type="PackedVector2Array" />
<description>
Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details.
Based on the set of points provided, this assigns the [member points] property using the convex hull algorithm, removing all unneeded points. See [method Geometry2D.convex_hull] for details.
</description>
</method>
</methods>
<members>
<member name="points" type="PackedVector2Array" setter="set_points" getter="get_points" default="PackedVector2Array()">
The polygon's list of vertices. Can be in either clockwise or counterclockwise order. Only set this property with convex hull points, use [method set_point_cloud] to generate a convex hull shape from concave shape points.
The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order.
[b]Warning:[/b] Only set this property to a list of points that actually form a convex hull. Use [method set_point_cloud] to generate the convex hull of an arbitrary set of points.
</member>
</members>
</class>

View File

@@ -4,9 +4,11 @@
Convex polygon shape resource for 3D physics.
</brief_description>
<description>
3D convex polygon shape resource to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node. Unlike [ConcavePolygonShape3D], [ConvexPolygonShape3D] cannot store concave polygon shapes. [ConvexPolygonShape3D]s can be manually drawn in the editor using the [CollisionPolygon3D] node.
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] [ConvexPolygonShape3D]s. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). This is available in the editor by selecting the [MeshInstance3D], going to the [b]Mesh[/b] menu and choosing [b]Create Multiple Convex Collision Siblings[/b]. Alternatively, [method MeshInstance3D.create_multiple_convex_collisions] can be called in a script to perform this decomposition at run-time.
[b]Performance:[/b] [ConvexPolygonShape3D] is faster to check collisions against compared to [ConcavePolygonShape3D], but it is slower than primitive collision shapes such as [SphereShape3D] or [BoxShape3D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by a primitive shape.
3D convex polygon shape resource to be added as a [i]direct[/i] child of a [PhysicsBody3D] or [Area3D] using a [CollisionShape3D] node.
The shape is a [i]solid[/i] that includes all the points that it encloses, as opposed to [ConcavePolygonShape3D] which is hollow if it encloses anything. See also [CollisionPolygon3D].
The solid nature of the shape makes it well-suited for both detection and physics; in physics body interactions this allows depenetrating even those shapes which end up (e.g. due to high speed) fully inside the convex shape (similarly to primitive shapes, but unlike [ConcavePolygonShape3D] and [HeightMapShape3D]). The convexity restricts the possible geometric shape of a single [ConvexPolygonShape3D]: it cannot be concave.
[b]Convex decomposition:[/b] Concave objects' collisions can be represented accurately using [i]several[/i] convex shapes. This allows dynamic physics bodies to have complex concave collisions (at a performance cost). It can be achieved by using several [ConvexPolygonShape3D] nodes or by using the [CollisionPolygon3D] node. To generate a collision polygon from a mesh, select the [MeshInstance3D] node, go to the [b]Mesh[/b] menu that appears above the viewport and choose [b]Create Multiple Convex Collision Siblings[/b]. Alternatively, [method MeshInstance3D.create_multiple_convex_collisions] can be called in a script to perform this decomposition at run-time.
[b]Performance:[/b] [ConvexPolygonShape3D] is faster to check collisions against compared to [ConcavePolygonShape3D], but it is slower than primitive collision shapes such as [SphereShape3D] or [BoxShape3D]. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes.
</description>
<tutorials>
<link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link>

View File

@@ -24,7 +24,7 @@
cert.save("user://generated.crt")
# Encryption
var data = "Some data"
var encrypted = crypto.encrypt(key, data.to_utf8())
var encrypted = crypto.encrypt(key, data.to_utf8_buffer())
# Decryption
var decrypted = crypto.decrypt(key, encrypted)
# Signing
@@ -33,7 +33,7 @@
var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key)
# Checks
assert(verified)
assert(data.to_utf8() == decrypted)
assert(data.to_utf8_buffer() == decrypted)
[/gdscript]
[csharp]
using Godot;
@@ -56,7 +56,7 @@
_cert.Save("user://generated.crt");
// Encryption
string data = "Some data";
byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8());
byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer());
// Decryption
byte[] decrypted = _crypto.Decrypt(_key, encrypted);
// Signing
@@ -65,7 +65,7 @@
bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key);
// Checks
Debug.Assert(verified);
Debug.Assert(data.ToUtf8() == decrypted);
Debug.Assert(data.ToUtf8Buffer() == decrypted);
}
}
[/csharp]

View File

@@ -138,7 +138,7 @@
<param index="1" name="cubic" type="bool" default="false" />
<param index="2" name="apply_tilt" type="bool" default="false" />
<description>
Similar with [code]interpolate_baked()[/code]. The the return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes.
Similar with [code]interpolate_baked()[/code]. The return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes.
</description>
</method>
<method name="samplef" qualifiers="const">

View File

@@ -15,7 +15,7 @@
</member>
<member name="resource_local_to_scene" type="bool" setter="set_local_to_scene" getter="is_local_to_scene" overrides="Resource" default="false" />
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0">
The format the texture should be generated with. When passing a CurveTexture as a input to a [Shader], this may need to be adjusted.
The format the texture should be generated with. When passing a CurveTexture as an input to a [Shader], this may need to be adjusted.
</member>
<member name="width" type="int" setter="set_width" getter="get_width" default="256">
The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage.

View File

@@ -23,8 +23,8 @@
func _process(delta):
while server.is_connection_available():
var peer : PacketPeerUDP = server.take_connection()
var dtls_peer : PacketPeerDTLS = dtls.take_connection(peer)
var peer: PacketPeerUDP = server.take_connection()
var dtls_peer: PacketPeerDTLS = dtls.take_connection(peer)
if dtls_peer.get_status() != PacketPeerDTLS.STATUS_HANDSHAKING:
continue # It is normal that 50% of the connections fails due to cookie exchange.
print("Peer connected!")
@@ -35,7 +35,7 @@
if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
while p.get_available_packet_count() &gt; 0:
print("Received message from client: %s" % p.get_packet().get_string_from_utf8())
p.put_packet("Hello DTLS client".to_utf8())
p.put_packet("Hello DTLS client".to_utf8_buffer())
[/gdscript]
[csharp]
// ServerNode.cs
@@ -77,7 +77,7 @@
while (p.GetAvailablePacketCount() &gt; 0)
{
GD.Print($"Received Message From Client: {p.GetPacket().GetStringFromUtf8()}");
p.PutPacket("Hello DTLS Client".ToUtf8());
p.PutPacket("Hello DTLS Client".ToUtf8Buffer());
}
}
}
@@ -103,7 +103,7 @@
if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED:
if !connected:
# Try to contact server
dtls.put_packet("The answer is... 42!".to_utf8())
dtls.put_packet("The answer is... 42!".to_utf8_buffer())
while dtls.get_available_packet_count() &gt; 0:
print("Connected: %s" % dtls.get_packet().get_string_from_utf8())
connected = true
@@ -133,7 +133,7 @@
if (!_connected)
{
// Try to contact server
_dtls.PutPacket("The Answer Is..42!".ToUtf8());
_dtls.PutPacket("The Answer Is..42!".ToUtf8Buffer());
}
while (_dtls.GetAvailablePacketCount() &gt; 0)
{

View File

@@ -107,7 +107,7 @@
<member name="texture_orm" type="Texture2D" setter="set_texture" getter="get_texture">
[Texture2D] storing ambient occlusion, roughness, and metallic for the decal. Use this to add extra detail to decals.
[b]Note:[/b] Unlike [BaseMaterial3D] whose filter mode can be adjusted on a per-material basis, the filter mode for [Decal] textures is set globally with [member ProjectSettings.rendering/textures/decals/filter].
[b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create a ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
[b]Note:[/b] Setting this texture alone will not result in a visible decal, as [member texture_albedo] must also be set. To create an ORM-only decal, load an albedo texture into [member texture_albedo] and set [member albedo_mix] to [code]0.0[/code]. The albedo texture's alpha channel will be used to determine where the underlying surface's ORM map should be overridden (and its intensity).
</member>
<member name="upper_fade" type="float" setter="set_upper_fade" getter="get_upper_fade" default="0.3">
Sets the curve over which the decal will fade as the surface gets further from the center of the [AABB]. Only positive values are valid (negative values will be clamped to [code]0.0[/code]). See also [member lower_fade].

View File

@@ -135,7 +135,6 @@
[/csharp]
[/codeblocks]
[b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior.
[b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values.
</description>
<tutorials>
<link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>

View File

@@ -173,6 +173,7 @@
<description>
Returns a [PackedStringArray] containing filenames of the directory contents, excluding directories. The array is sorted alphabetically.
Affected by [member include_hidden].
[b]Note:[/b] When used on a [code]res://[/code] path in an exported project, only the files actually included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level [code].godot/[/code] folder, only paths to [code]*.gd[/code] and [code]*.import[/code] files are returned (plus a few files such as [code]project.godot[/code] or [code]project.binary[code] and the project icon). In an exported project, the list of returned files will also vary depending on whether [member ProjectSettings.editor/export/convert_text_resources_to_binary] is [code]true[/code].
</description>
</method>
<method name="get_files_at" qualifiers="static">
@@ -290,7 +291,7 @@
</methods>
<members>
<member name="include_hidden" type="bool" setter="set_include_hidden" getter="get_include_hidden">
If [code]true[/code], hidden files are included when the navigating directory.
If [code]true[/code], hidden files are included when navigating the directory.
Affects [method list_dir_begin], [method get_directories] and [method get_files].
</member>
<member name="include_navigational" type="bool" setter="set_include_navigational" getter="get_include_navigational">

View File

@@ -190,7 +190,7 @@
<description>
Adds a new checkable item with text [param label] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
@@ -213,7 +213,7 @@
<description>
Adds a new checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
@@ -236,7 +236,7 @@
<description>
Adds a new item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
@@ -259,7 +259,7 @@
<description>
Adds a new radio-checkable item with text [param label] and icon [param icon] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
@@ -282,7 +282,7 @@
<description>
Adds a new item with text [param label] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
[b]Supported system menu IDs:[/b]
@@ -307,7 +307,7 @@
Adds a new item with text [param label] to the global menu with ID [param menu_root].
Contrarily to normal binary items, multistate items can have more than two states, as defined by [param max_states]. Each press or activate of the item will increase the state by one. The default value is defined by [param default_state].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] By default, there's no indication of the current item state, it should be changed manually.
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
@@ -330,7 +330,7 @@
<description>
Adds a new radio-checkable item with text [param label] to the global menu with ID [param menu_root].
Returns index of the inserted item, it's not guaranteed to be the same as [param index] value.
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
An [param accelerator] can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The [param accelerator] is generally a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See [method global_menu_set_item_checked] for more info on how to control it.
[b]Note:[/b] The [param callback] and [param key_callback] Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to [param tag].
[b]Note:[/b] This method is implemented on macOS.
@@ -462,7 +462,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
Returns number of states of an multistate item. See [method global_menu_add_multistate_item] for details.
Returns number of states of a multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -471,7 +471,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
Returns the state of an multistate item. See [method global_menu_add_multistate_item] for details.
Returns the state of a multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -507,7 +507,7 @@
<param index="0" name="menu_root" type="String" />
<param index="1" name="idx" type="int" />
<description>
Returns the tooltip associated with the specified index index [param idx].
Returns the tooltip associated with the specified index [param idx].
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -565,7 +565,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="keycode" type="int" enum="Key" />
<description>
Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using boolean OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
Sets the accelerator of the item at index [param idx]. [param keycode] can be a single [enum Key], or a combination of [enum KeyModifierMask]s and [enum Key]s using bitwise OR such as [code]KEY_MASK_CTRL | KEY_A[/code] ([kbd]Ctrl + A[/kbd]).
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -576,7 +576,7 @@
<param index="2" name="callback" type="Callable" />
<description>
Sets the callback of the item at index [param idx]. Callback is emitted when an item is pressed.
[b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
[b]Note:[/b] The [param callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the [code]tag[/code] parameter when the menu item was created.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -638,7 +638,7 @@
<param index="2" name="key_callback" type="Callable" />
<description>
Sets the callback of the item at index [param idx]. Callback is emitted when its accelerator is activated.
[b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the tag parameter when the menu item was created.
[b]Note:[/b] The [param key_callback] Callable needs to accept exactly one Variant parameter, the parameter passed to the Callable will be the value passed to the [code]tag[/code] parameter when the menu item was created.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -648,7 +648,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="max_states" type="int" />
<description>
Sets number of state of an multistate item. See [method global_menu_add_multistate_item] for details.
Sets number of state of a multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -669,7 +669,7 @@
<param index="1" name="idx" type="int" />
<param index="2" name="state" type="int" />
<description>
Sets the state of an multistate item. See [method global_menu_add_multistate_item] for details.
Sets the state of a multistate item. See [method global_menu_add_multistate_item] for details.
[b]Note:[/b] This method is implemented on macOS.
</description>
</method>
@@ -815,7 +815,7 @@
<method name="mouse_get_position" qualifiers="const">
<return type="Vector2i" />
<description>
Returns the mouse cursor's current position.
Returns the mouse cursor's current position in screen coordinates.
</description>
</method>
<method name="mouse_set_mode">
@@ -943,7 +943,7 @@
<return type="void" />
<param index="0" name="image" type="Image" />
<description>
Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead.
Sets the window icon (usually displayed in the top-left corner) with an [Image]. To use icons in the operating system's native format, use [method set_native_icon] instead.
</description>
</method>
<method name="set_native_icon">
@@ -1037,8 +1037,8 @@
<param index="1" name="callable" type="Callable" />
<description>
Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary.
- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance id.
- [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance id.
- [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance ID.
- [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance ID.
[b]Note:[/b] The granularity of the boundary callbacks is engine dependent.
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
</description>
@@ -1575,7 +1575,7 @@
Default landscape orientation.
</constant>
<constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation">
Default portrait orienstation.
Default portrait orientation.
</constant>
<constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation">
Reverse landscape orientation (upside down).
@@ -1694,7 +1694,7 @@
[b]Note:[/b] Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode.
</constant>
<constant name="WINDOW_FLAG_RESIZE_DISABLED" value="0" enum="WindowFlags">
The window can't be resizing by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
The window can't be resized by dragging its resize grip. It's still possible to resize the window using [method window_set_size]. This flag is ignored for full screen windows.
</constant>
<constant name="WINDOW_FLAG_BORDERLESS" value="1" enum="WindowFlags">
The window do not have native title bar and other decorations. This flag is ignored for full-screen windows.
@@ -1711,7 +1711,7 @@
The window can't be focused. No-focus window will ignore all input, except mouse clicks.
</constant>
<constant name="WINDOW_FLAG_POPUP" value="5" enum="WindowFlags">
Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have [code]transient parent[/code] set (see [method window_set_transient]).
Window is part of menu or [OptionButton] dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see [method window_set_transient]).
</constant>
<constant name="WINDOW_FLAG_EXTEND_TO_TITLE" value="6" enum="WindowFlags">
Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons.

View File

@@ -67,7 +67,7 @@
The view format in which the [EditorFileDialog] displays resources to the user.
</member>
<member name="file_mode" type="int" setter="set_file_mode" getter="get_file_mode" enum="EditorFileDialog.FileMode" default="4">
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode]
The dialog's open or save mode, which affects the selection behavior. See [enum FileMode].
</member>
<member name="filters" type="PackedStringArray" setter="set_filters" getter="get_filters" default="PackedStringArray()">
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.

View File

@@ -64,7 +64,9 @@
<return type="bool" />
<description>
Returns [code]true[/code] if the editor is marked as self-contained, [code]false[/code] otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an [code]editor_data/[/code] folder next to the editor binary. This makes portable usage easier and ensures the Godot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects.
Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary while the editor is not running. See also [method get_self_contained_file].
Self-contained mode can be enabled by creating a file named [code]._sc_[/code] or [code]_sc_[/code] in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also [method get_self_contained_file].
[b]Note:[/b] On macOS, quarantine flag should be manually removed before using self-contained mode, see [url=https://docs.godotengine.org/en/stable/tutorials/export/running_on_macos.html]Running on macOS[/url].
[b]Note:[/b] On macOS, placing [code]_sc_[/code] or any other file inside .app bundle will break digital signature and make it non-portable, consider placing it in the same folder as the .app bundle instead.
[b]Note:[/b] The Steam release of Godot uses self-contained mode by default.
</description>
</method>

View File

@@ -10,13 +10,13 @@
[gdscript]
extends EditorResourceConversionPlugin
func _handles(resource : Resource):
func _handles(resource: Resource):
return resource is ImageTexture
func _converts_to():
return "PortableCompressedTexture2D"
func _convert(itex : Resource):
func _convert(itex: Resource):
var ptex = PortableCompressedTexture2D.new()
ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS)
return ptex

View File

@@ -87,7 +87,7 @@
<method name="get_changed_settings" qualifiers="const">
<return type="PackedStringArray" />
<description>
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED]
Gets an array of the settings which have been changed since the last save. Note that internally [code]changed_settings[/code] is cleared after a successful save, so generally the most appropriate place to use this method is when processing [constant NOTIFICATION_EDITOR_SETTINGS_CHANGED].
</description>
</method>
<method name="get_favorites" qualifiers="const">
@@ -295,7 +295,7 @@
If [code]true[/code], render the grid on an XZ plane.
</member>
<member name="editors/3d/grid_yz_plane" type="bool" setter="" getter="">
If [code]true[/code], render the grid on an YZ plane. This can be useful for 3D side-scrolling games.
If [code]true[/code], render the grid on a YZ plane. This can be useful for 3D side-scrolling games.
</member>
<member name="editors/3d/navigation/emulate_3_button_mouse" type="bool" setter="" getter="">
If [code]true[/code], enables 3-button mouse emulation mode. This is useful on laptops when using a trackpad.
@@ -695,7 +695,7 @@
If [code]true[/code], colors the background of the line the caret is currently on with [member text_editor/theme/highlighting/current_line_color].
</member>
<member name="text_editor/appearance/caret/type" type="int" setter="" getter="">
The shape of the caret to use in the script editor. [b]Line[/b] displays a vertical line to the left of the current character, whereas [b]Block[/b] displays a outline over the current character.
The shape of the caret to use in the script editor. [b]Line[/b] displays a vertical line to the left of the current character, whereas [b]Block[/b] displays an outline over the current character.
</member>
<member name="text_editor/appearance/guidelines/line_length_guideline_hard_column" type="int" setter="" getter="">
The column at which to display a subtle line as a line length guideline for scripts. This should generally be greater than [member text_editor/appearance/guidelines/line_length_guideline_soft_column].

View File

@@ -10,6 +10,8 @@
- If the object is a built-in resource, use the scene from its path;
- If the object is external resource or anything else, use global history.
This guessing can sometimes yield false results, so you can provide a custom context object when creating an action.
[EditorUndoRedoManager] is intended to be used by Godot editor plugins. You can obtain it using [method EditorPlugin.get_undo_redo]. For non-editor uses or plugins that don't need to integrate with the editor's undo history, use [UndoRedo] instead.
The manager's API is mostly the same as in [UndoRedo], so you can refer to its documentation for more examples. The main difference is that [EditorUndoRedoManager] uses object + method name for actions, instead of [Callable].
</description>
<tutorials>
</tutorials>

View File

@@ -124,7 +124,7 @@
<param index="0" name="remote" type="String" />
<param index="1" name="force" type="bool" />
<description>
Pushes changes to the [code]remote[/code]. Optionally, if [code]force[/code] is set to true, a force push will override the change history already present on the remote.
Pushes changes to the [param remote]. If [param force] is [code]true[/code], a force push will override the change history already present on the remote.
</description>
</method>
<method name="_remove_branch" qualifiers="virtual">

View File

@@ -306,7 +306,7 @@
[b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor.
</member>
<member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0">
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. This also affects [Timer] and [SceneTreeTimer] (see [method SceneTree.create_timer] for how to control this).
</member>
</members>
</class>

View File

@@ -277,7 +277,7 @@
[b]Note:[/b] SSR is only supported in the Forward+ rendering method, not Mobile or Compatibility.
</member>
<member name="ssr_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15">
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).
</member>
<member name="ssr_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0">
The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. Only positive values are valid (negative values will be clamped to [code]0.0[/code]).

View File

@@ -49,6 +49,7 @@
[/codeblocks]
</description>
<tutorials>
<link title="Evaluating Expressions">$DOCS_URL/tutorials/scripting/evaluating_expressions.html</link>
</tutorials>
<methods>
<method name="execute">

View File

@@ -54,7 +54,7 @@
</methods>
<members>
<member name="access" type="int" setter="set_access" getter="get_access" enum="FileDialog.Access" default="0">
The file system access scope. See enum [code]Access[/code] constants.
The file system access scope. See [enum Access] constants.
[b]Warning:[/b] Currently, in sandboxed environments such as Web builds or sandboxed macOS apps, FileDialog cannot access the host file system. See [url=https://github.com/godotengine/godot-proposals/issues/1123]godot-proposals#1123[/url].
</member>
<member name="current_dir" type="String" setter="set_current_dir" getter="get_current_dir">
@@ -74,7 +74,7 @@
The available file type filters. For example, this shows only [code].png[/code] and [code].gd[/code] files: [code]set_filters(PackedStringArray(["*.png ; PNG Images","*.gd ; GDScript Files"]))[/code]. Multiple file types can also be specified in a single filter. [code]"*.png, *.jpg, *.jpeg ; Supported Images"[/code] will show both PNG and JPEG files when selected.
</member>
<member name="mode_overrides_title" type="bool" setter="set_mode_overrides_title" getter="is_mode_overriding_title" default="true">
If [code]true[/code], changing the [code]Mode[/code] property will set the window title accordingly (e.g. setting mode to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
If [code]true[/code], changing the [member file_mode] property will set the window title accordingly (e.g. setting [member file_mode] to [constant FILE_MODE_OPEN_FILE] will change the window title to "Open a File").
</member>
<member name="root_subfolder" type="String" setter="set_root_subfolder" getter="get_root_subfolder" default="&quot;&quot;">
If non-empty, the given sub-folder will be "root" of this [FileDialog], i.e. user won't be able to go to its parent directory.

View File

@@ -1,8 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="FileSystemDock" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Editor dock for managing files in the project.
</brief_description>
<description>
This class is available only in [EditorPlugin]s and can't be instantiated. You can access it using [method EditorInterface.get_file_system_dock].
While FileSystemDock doesn't expose any methods for file manipulation, you can listen for various file-related signals.
</description>
<tutorials>
</tutorials>
@@ -11,49 +14,58 @@
<return type="void" />
<param index="0" name="path" type="String" />
<description>
Sets the given [param path] as currently selected, ensuring that the selected file/directory is visible.
</description>
</method>
</methods>
<signals>
<signal name="display_mode_changed">
<description>
Emitted when the user switches file display mode or split mode.
</description>
</signal>
<signal name="file_removed">
<param index="0" name="file" type="String" />
<description>
Emitted when the given [param file] was removed.
</description>
</signal>
<signal name="files_moved">
<param index="0" name="old_file" type="String" />
<param index="1" name="new_file" type="String" />
<description>
Emitted when a file is moved from [param old_file] path to [param new_file] path.
</description>
</signal>
<signal name="folder_moved">
<param index="0" name="old_folder" type="String" />
<param index="1" name="new_folder" type="String" />
<description>
Emitted when a folder is moved from [param old_folder] path to [param new_folder] path.
</description>
</signal>
<signal name="folder_removed">
<param index="0" name="folder" type="String" />
<description>
Emitted when the given [param folder] was removed.
</description>
</signal>
<signal name="inherit">
<param index="0" name="file" type="String" />
<description>
Emitted when a new scene is created that inherits the scene at [param file] path.
</description>
</signal>
<signal name="instantiate">
<param index="0" name="files" type="PackedStringArray" />
<description>
Emitted when the given scenes are being instantiated in the editor.
</description>
</signal>
<signal name="resource_removed">
<param index="0" name="resource" type="Resource" />
<description>
Emitted when an external [param resource] had its file removed.
</description>
</signal>
</signals>

View File

@@ -271,6 +271,17 @@
<description>
Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code].
Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant.
To print available variation axes of a variable font:
[codeblock]
var fv = FontVariation.new()
fv.set_base_font = load("res://RobotoFlex.ttf")
var variation_list = fv.get_supported_variation_list()
for tag in variation_list:
var name = TextServerManager.get_primary_interface().tag_to_name(tag)
var values = variation_list[tag]
print("variation axis: %s (%d)\n\tmin, max, default: %s" % [name, tag, values])
[/codeblock]
[b]Note:[/b] To set and get variation coordinates of a [FontVariation], use [member FontVariation.variation_opentype].
</description>
</method>
<method name="get_underline_position" qualifiers="const">

View File

@@ -12,7 +12,7 @@
- Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants.
- Monospace image font importer: All supported image formats.
[b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way.
[b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
[b]Note:[/b] A glyph is a bitmap or shape used to draw one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source.
[b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code.
[codeblocks]
[gdscript]

View File

@@ -22,6 +22,13 @@
GetNode("Label").AddThemeFontSizeOverride("font_size", 64);
[/csharp]
[/codeblocks]
To set the coordinate of multiple variation axes:
[codeblock]
var fv = FontVariation.new();
var ts = TextServerManager.get_primary_interface()
fv.base_font = load("res://BarlowCondensed-Regular.ttf")
fv.variation_opentype = { ts.name_to_tag("wght"): 900, ts.name_to_tag("custom_hght"): 900 }
[/codeblock]
</description>
<tutorials>
</tutorials>
@@ -40,7 +47,7 @@
Base font used to create a variation. If not set, default [Theme] font is used.
</member>
<member name="fallbacks" type="Font[]" setter="set_fallbacks" getter="get_fallbacks" default="[]">
Array of fallback [Font]s. If not set [member base_font] fallback are ussed.
Array of fallback [Font]s to use as a substitute if a glyph is not found in this [FontVariation]. If not set, [member base_font]'s fallbacks are used instead.
</member>
<member name="opentype_features" type="Dictionary" setter="set_opentype_features" getter="get_opentype_features" default="{}">
A set of OpenType feature tags. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
@@ -66,6 +73,8 @@
</member>
<member name="variation_opentype" type="Dictionary" setter="set_variation_opentype" getter="get_variation_opentype" default="{}">
Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url].
[b]Note:[/b] This [Dictionary] uses OpenType tags as keys. Variation axes can be identified both by tags([code]int[/code]) and names ([code]string[/code]). Some axes might be accessible by multiple names. For example, [code]wght[/code] refers to the same axis as [code]weight[/code]. Tags on the other hand are unique. To convert between names and tags, use [method TextServer.name_to_tag] and [method TextServer.tag_to_name].
[b]Note:[/b] To get available variation axes of a font, use [method Font.get_supported_variation_list].
</member>
<member name="variation_transform" type="Transform2D" setter="set_variation_transform" getter="get_variation_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
2D transform, applied to the font outlines, can be used for slanting, flipping and rotating glyphs.

View File

@@ -50,7 +50,7 @@
Represents the size of the [enum Resolution] enum.
</constant>
<constant name="UPDATE_MODE_WHEN_MOVED" value="0" enum="UpdateMode">
Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction.
Only update the heightmap when the [GPUParticlesCollisionHeightField3D] node is moved, or when the camera moves if [member follow_camera_enabled] is [code]true[/code]. An update can be forced by slightly moving the [GPUParticlesCollisionHeightField3D] in any direction, or by calling [method RenderingServer.particles_collision_height_field_update].
</constant>
<constant name="UPDATE_MODE_ALWAYS" value="1" enum="UpdateMode">
Update the heightmap every frame. This has a significant performance cost. This update should only be used when geometry that particles can collide with changes significantly during gameplay.

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