Commit graph

4635 commits

Author SHA1 Message Date
Arnav Vijaywargiya
a51f3f2a58
Fixed incorrect property types
(cherry picked from commit 0c46f73b5e)
2022-01-12 17:28:07 +01:00
Haoyu Qiu
e1f96d5ee8
Fix crash on importing FBX file
(cherry picked from commit af67e4c291)
2022-01-12 17:28:07 +01:00
K. S. Ernest (iFire) Lee
44d436add6
Skip Draco-compressed glTF 3d format files.
(cherry picked from commit b468104842)
2022-01-12 17:28:07 +01:00
Rémi Verschelde
79aa64efff
Merge pull request #56296 from timothyqiu/pending-func-states 2022-01-12 16:47:56 +01:00
K. S. Ernest (iFire) Lee
08b89a95d2 Fix wrong RGBA channel mapping when saving OpenEXR. 2022-01-12 01:50:56 -08:00
Haoyu Qiu
e1557dc4c8 i18n: Make VisualScript node caption & text translatable 2022-01-11 21:16:33 +08:00
Rémi Verschelde
cb44064048
Merge pull request #56604 from V-Sekai/csg_selection_3_x 2022-01-10 12:32:28 +01:00
Bartłomiej T. Listwon
22750b1c03 Replace String::find_last with rfind where possible (backward compatible with old API) 2022-01-08 22:40:44 +01:00
Haoyu Qiu
37a38ece59 Allow showing both left and right side panels 2022-01-08 20:20:36 +08:00
LATRio
47f0cf7460 Add type validations when setting basic type 2022-01-08 11:30:55 +09:00
SaracenOne
b7273b6f7a Fix selection of CSG objects 2022-01-07 20:08:42 +00:00
Rémi Verschelde
b197de6f5f
Fix typos with codespell
Using codespell 2.1.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
dof
doubleclick
fave
findn
GIRD
leapyear
lod
merchantibility
nd
numer
ois
ony
que
readded
seeked
statics
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2022-01-07 00:14:54 +01:00
bruvzg
6f81a8ee2c
Fix multiple missing UTF-8 decoding.
(cherry picked from commit c69e0d16bc)
2022-01-06 21:44:40 +01:00
kobewi
9b149d5848
Add physics material to GridMap
(cherry picked from commit 59a9b2192e)
2022-01-06 21:44:40 +01:00
RedMser
f76430670c
Fix glTF scene export crash on null normal texture
Also removes a redundant get_texture call directly below
the modified code block.

Fixes #56379

(cherry picked from commit 0e36d5e782)
2022-01-06 00:21:37 +01:00
Raul Santos
172f66a40e
Fix KeyValuePairAt memory leak
(cherry picked from commit 1fdfc379b6)
2022-01-06 00:21:36 +01:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Max Hilbrunner
717801c9cb Fix docs links in 3.x after docs reorg 2022-01-05 11:54:52 +01:00
Rémi Verschelde
1e2ef49b77
Merge pull request #56391 from raulsntos/fix-56385 2022-01-05 10:44:54 +01:00
Hugo Locurcio
a6db1c758a
Improve lerp(), lerp_angle() and inverse_lerp() documentation
This clarifies that `lerp()` can be used both for interpolation
and extrapolation.
2022-01-04 00:41:37 +01:00
Zae
d5ad76a3c8 [3.x] [Mono] Add support for file-scoped namespace declaration. 2022-01-02 18:02:00 +08:00
Raul Santos
36cd00a84b
Init params_buffer_size member in GDMonoMethod 2022-01-01 02:23:40 +01:00
Raul Santos
907e709f9d Fix getting properties state when reloading C#
When reloading C# classes and keep their properties values they are
retrieved and stored in a state list.
Retrieving the properties was only getting the fields of the C# class
and not inherited fields so those properties values were lost on reload.
Now we also try to find the field in the parent classes.
2021-12-28 19:14:49 +01:00
Haoyu Qiu
53af7ee482 Clear pending function states when reloading GDScript 2021-12-28 15:29:21 +08:00
Raul Santos
cf98ff248a
Check a csproj exists before trying to edit it
When folders are moved/removed from the file system, the `.csproj`
may need to be edited to update the path of C# scripts or remove them.
If a C# solution has not been created, the `.csproj` file does not exist
and therefore there is no need to edit it.
2021-12-20 16:49:16 +01:00
Rémi Verschelde
14d439d868
Merge pull request #53130 from Faless/net/3.x_enet_opts 2021-12-16 10:36:01 +01:00
Fabio Alessandrelli
ce98beb522
Merge pull request #54381 from mhilbrunner/rpc-error-msgs-3.x
[3.x] Websockets: Fix buffer size checks in put_packet(), silent failures/connection hangs
2021-12-15 13:48:53 +01:00
Fabio Alessandrelli
9b8db7c63a [Net] Fix WebRTC returning packets from peers too early.
Due to the async nature of WebRTC implementations, the multiplayer peer
could end up having queued packets from a given connection before it is
able to emit the "peer_added" signal.
This commit ensures that packets from peers which are not notified yet
are skipped by `get_packet` and `get_available_packet_count`.
2021-12-15 11:20:17 +01:00
Rémi Verschelde
db020eae29
Merge pull request #55859 from akien-mga/3.x-gltf-module-cleanup 2021-12-13 13:46:03 +01:00
Rémi Verschelde
e4c40d8e6a
glTF: Cleanup includes and defines, split PackedSceneGLTF to own file 2021-12-12 12:08:18 +01:00
David Snopek
f2fe60b989 Switch WebXRInterface from using external textures to using the render targets from Godot 2021-12-11 14:37:53 -06:00
Aaron Franke
7bf7bd70ac
[3.x] Misc build system fixes 2021-12-10 12:15:16 -06:00
Rémi Verschelde
eac0d90c39
Merge pull request #55560 from pycbouh/docs-overridden-cross-linked-3.x
[3.x] Make overridden properties link to parent definition
2021-12-10 12:42:09 +01:00
Francois Belair
b8f2f48d86
Remove extraneous return to LSP
(cherry picked from commit ad01201f34)
2021-12-09 22:08:48 +01:00
Cory Petkovsek
3d20218dae Clears RIDs wherever they are freed by VisualServer or PhysicsServer and possibly reused. Fixes #53374 2021-12-10 02:31:30 +08:00
kobewi
6eb1c92cea Fix custom built-in script names 2021-12-08 14:04:10 +01:00
Raul Santos
ffbd59572e
Various fixes to C# documentation
(cherry picked from commit 2deabd553f)
2021-12-08 11:28:12 +01:00
Francois Belair
ba1d6b7532
Prevent LSP adding signal func to non GDScripts
(cherry picked from commit 66f1b4bf66)
2021-12-06 17:51:11 +01:00
Vincent
d6fb13234e
AudioStreamMP3: expose loop properties to the editor
(cherry picked from commit 8263646f68)
2021-12-06 16:52:00 +01:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
Rémi Verschelde
c42e9bd589
Merge pull request #55564 from raulsntos/csharp-delegates-for-generic-class-3.x
[3.x] Fix C# `get_all_delegates` method for generic classes
2021-12-04 14:12:11 +01:00
Raul Santos
613751a742 Fix get_all_delegates method for generic classes
If the class is generic, we must get its generic type definition and use
it to retrieve the delegates.
2021-12-04 01:51:50 +01:00
kobewi
f899b76747 Improve save handling for built-in scripts 2021-12-04 01:28:52 +01:00
Yuri Sizov
1cf6d21f69 Make overridden properties link to parent definition
Co-authored-by: Josh DeGraw <joshmdegraw@gmail.com>
2021-12-03 17:48:49 +03:00
Rémi Verschelde
796f875870
Revert "Expose Variant operator= to GDNative" 2021-12-02 11:45:11 +01:00
PouleyKetchoupp
f29f996199
Fix shape index in multiple physics queries with Bullet
Two main changes:

- Better handling of concave shapes to make sure the queries don't
return a triangle index instead of shape index.
Note: A concave shape within a compound shape will always return a shape
index of 0 because of Bullet limitations.

- Extra check for compound shapes in some queries to avoid undefined
behavior, because the shape index can have an uninitialized value with
convex shapes in some cases.

(cherry picked from commit 02d40de30d)
2021-12-01 23:49:26 +01:00
Rémi Verschelde
e154ce78cb
Merge pull request #54508 from BimDav/variant_operator_assign_gdnative 2021-12-01 17:08:39 +01:00
Vincent
8a4c583538
Fix crash when loading an invalid mp3 file
(cherry picked from commit 2d0068d1cb)
2021-12-01 16:47:30 +01:00
Rémi Verschelde
c9208704de
Merge pull request #54614 from aaronfranke/3.x-math-api 2021-11-29 12:57:25 +01:00
Aaron Franke
1d8cef8236
[3.x] Backport some APIs in math structs 2021-11-27 01:19:45 -06:00
Aaron Franke
5ec0a8df5e
[3.x] Add documentation to operators for math types 2021-11-27 01:15:43 -06:00
kobewi
5caab0a8ef
Correct the doc about ease()
(cherry picked from commit 44e6655924)
2021-11-25 22:23:53 +01:00
jitspoe
734b4a46bc Fix crash when exporting gltf mesh that has no skin.
(cherry picked from commit 209ac9569c4c5180aea4b330ed7f6d2a572d5e82)
2021-11-22 22:46:53 -05:00
Marcel Admiraal
216fb38da1 Add shape data to area overlap data. 2021-11-21 07:18:49 +00:00
Rémi Verschelde
5c6e39b2a6
wslay: Sync with upstream 45d22583b
45d22583b4

Mostly style changes, a couple new methods and fixes.
Tweak file structure a bit.

(cherry picked from commit a706ef3272)
2021-11-20 11:50:59 +01:00
Rémi Verschelde
724c207005
libwebp: Sync with upstream 1.2.1
Changes: https://chromium.googlesource.com/webm/libwebp/+/1.2.1/NEWS
(cherry picked from commit 41ce417847)
2021-11-20 11:50:34 +01:00
Rémi Verschelde
31dbc59c39
tinyexr: Sync with upstream 1.0.1
Removes miniz as a bundled dependency, relies on our own zlib instead.

Includes a couple commits ahead of `v1.0.1` tag to fix MinGW builds.

(cherry picked from commit 46d3effa99)
2021-11-20 11:48:49 +01:00
Marcel Admiraal
702529d63e Give each RigidBody its own DirectBodyState wrapper. 2021-11-20 08:17:04 +00:00
Marcel Admiraal
2176b694ac
Trigger RigidBodyBullet space override updates when Area properties change.
(cherry picked from commit 41d85ed5a9)
2021-11-18 20:31:41 +01:00
Marcel Admiraal
84af1d9248
Update Bullet Area overlaps when Area properties or shapes change.
(cherry picked from commit 0d3e8538ef)
2021-11-18 20:31:40 +01:00
Marcel Admiraal
14ecd66a21
Ignore Bullet collision contact points with distance = 0
(cherry picked from commit 27b52f6c46)
2021-11-18 20:27:24 +01:00
Marcel Admiraal
4d3690eba5 Remove unimplemented methods 2021-11-18 12:47:36 +00:00
Rémi Verschelde
3ac2999f22
Replace Godot docs URL with $DOCS_URL in XML class reference 2021-11-15 17:22:47 +01:00
kobewi
175870ccc7
Show built-in script names in the debugger
(cherry picked from commit 3b320cd9fe)
2021-11-15 17:22:47 +01:00
Daniel Kolesa
5fe78a3a25
Add support for PowerPC family
(cherry picked from commit 3a84a64d2f)
2021-11-15 17:22:46 +01:00
Rémi Verschelde
5752457854
Merge pull request #54911 from akien-mga/3.x-modules-check-enabled 2021-11-12 14:49:39 +01:00
Rémi Verschelde
6f4858f184
Modules: Make sure to include modules_enabled.gen.h where needed
Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <aksoftware91@gmail.com>
2021-11-12 13:45:33 +01:00
Hugo Locurcio
4c88a82f50
Move Mono unhandled exception setting to be located within a subsection
Settings that aren't within a subsection are difficult to reach when
other settings do have a subsection.

This also adds documentation for the project setting.
2021-11-10 20:57:35 +01:00
Rémi Verschelde
5defa1c167
Merge pull request #54805 from Klowner/3.4-gltf-cubic-spline-interpolate
Fix incorrect glTF cubic spline interpolation times/values size error
2021-11-10 08:04:43 +01:00
PouleyKetchoupp
b93aeec4a2 Fix errors in KinematicBody when floor is destroyed or removed
In all physics servers, body_get_direct_state() now silently returns
nullptr when the body has been already freed or is removed from space,
so the client code can detect this state and invalidate the body rid.

In 2D, there is no change in behavior (just no more errors).

In 3D, the Bullet server returned a valid direct body state when the
body was removed from the physics space, but in this case it didn't
make sense to use the information from the body state.
2021-11-09 15:15:40 -07:00
Rémi Verschelde
b0cd38b7e3
Merge pull request #42625 from RandomShaper/fix_dict_3.2 2021-11-09 15:55:43 +01:00
Mark Riedesel
999bba6916 Fix glTF cubic spline track interpolation incorrectly reporting times/values size mismatch (3.4 specific) 2021-11-09 09:47:37 -05:00
Pedro J. Estébanez
a7aad78fd0 Add recursive comparison to Array and Dictionary
...and expose it to GDScript.

Co-authored-by: Emmanuel Leblond <emmanuel.leblond@gmail.com>
2021-11-09 15:08:22 +01:00
Hugo Locurcio
63d214f04b
Remove hash symbol in front of opcode error messages in GDScript
The hash symbol creates spurious issue references on GitHub if
the message is posted outside a code block, which means some issues
have a lot more references than originally intended.
2021-11-09 12:20:51 +01:00
Rémi Verschelde
3be409aa5e
Merge pull request #54039 from nekomatata/fix-soft-body-memory-corruption-bullet-3.x 2021-11-08 23:59:05 +01:00
Rémi Verschelde
2f10793467
Merge pull request #54117 from Pineapple/dont-ignore-type-mismatch-in-setter 2021-11-08 19:26:58 +01:00
Rémi Verschelde
bd828c4d81
Merge pull request #54227 from akien-mga/3.x-gdscript-multiline-indexing 2021-11-08 15:03:24 +01:00
Rémi Verschelde
d0b1e3d002
Merge pull request #53942 from raulsntos/no-boxing 2021-11-08 13:15:25 +01:00
Rémi Verschelde
837f2c5f82
Merge pull request #54746 from neikeq/issue-42076
C#: Don't use ActivityThread to determine Android nativeLibraryDir
2021-11-08 10:02:48 +01:00
Ignacio Roldán Etcheverry
690bf12c4c C#: Don't use ActivityThread to determine Android nativeLibraryDir 2021-11-08 02:35:06 +01:00
Rémi Verschelde
14c366ddd7
Bump version to 3.5-beta 2021-11-05 16:10:17 +01:00
Ignacio Roldán Etcheverry
e282ee0a48 C#: Fix property set call boxing value when unboxed was expected 2021-11-03 13:02:53 +01:00
Ignacio Etcheverry
b775573a21 Don't box params on Native->C# calls with Variant params
Godot uses Variant parameters for calls to script methods.
Up until now we were boxing such parameters when marshalling
them for invokation, even if they were value types.

Now Godot allocates the marshalled parameters on the stack,
reducing the GC allocations resulted from boxing.
2021-11-03 13:02:53 +01:00
Yuri Sizov
d764e1fae7 Fix maximum allowed size atlas in CPU lightmapper 2021-11-02 15:50:50 +03:00
BimDav
084b21c4a8 expose Variant operator= to GDNative 2021-11-02 12:11:27 +01:00
Rémi Verschelde
e4996887ca
Merge pull request #48625 from The-O-King/compression_options 2021-11-02 08:58:22 +01:00
Lyuma
e575b27b15 3.x backport glTF: Fix override materials and non-empty arrays
Keep track of MeshInstance and GeometryInstance override materials in the GLTFMesh object.
Ensure all arrays are non-empty to conform with "minItems":1 in glTF spec.
2021-11-01 23:40:12 -07:00
Omar El Sheikh
203295f17d Added Mesh Compression Import Options
Fleshed out the "Optimize Mesh" options found in the mesh import UI
Gave a checkbox to every vertex attribute that can be compressed

Surfaced option to enable/disable Octahedral compression for
normal/tangent vectors

Also surfaces the vertex position compression option which previously
inaccessible because the defaults did not compress vertex positions

Supports all current importers (obj, fbx, collada, gltf)
2021-11-01 12:54:28 -04:00
Raul Santos
21f68e7bdb
Ensure C# script properties are added to the end
Ensures that the `get_property_list` and `get_script_property_list`
methods push the script properties to the end of the given list, this
prevents the script property from appearing after the script variables.
2021-10-30 16:55:21 +02:00
Max Hilbrunner
6a92a2e92d Websockets: Fix buffer size checks in put_packet() 2021-10-29 15:43:17 +02:00
Rémi Verschelde
14ef65e49b
Merge pull request #54348 from akien-mga/3.x-clang-format-dont-align-operands 2021-10-28 15:43:15 +02:00
Rémi Verschelde
87c80f529f
clang-format: Enable BreakBeforeTernaryOperators
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
2021-10-28 14:50:33 +02:00
Rémi Verschelde
1b65550ec7
clang-format: Various fixes to comments alignment from clang-format 13
All reviewed manually and occasionally rewritten to avoid bad auto formatting.
2021-10-28 14:50:32 +02:00
Rémi Verschelde
42d385b312
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 13:23:38 +02:00
Rémi Verschelde
23955fc282
Merge pull request #54262 from raulsntos/csproj-globbing-3.x 2021-10-26 21:56:58 +02:00
Rémi Verschelde
5d0ec1779d
Merge pull request #54272 from pycbouh/gdscript-ignore-groups-completion-3.x 2021-10-26 20:02:01 +02:00
Yuri Sizov
b3fc278dcf Ignore property groups and categories in GDScript code completion 2021-10-26 20:01:49 +03:00
Max Hilbrunner
e29126914d
Save all 64 bits of get_ticks_msec() in more cases
(cherry picked from commit 5dc02eb8b0)
2021-10-26 18:23:31 +02:00
Raul Santos
ced4f3519d Avoid modifying csproj globbing includes
Check if the found globbing include already matches the new path on
moving scripts to avoid modifying users' csproj files.
2021-10-26 18:21:19 +02:00
Lyuma
e49f8c5823 3.x: Fix validation errors due to chunk padding and empty skins.
GLB chunk padding length calculation was backwards and missing for the BIN chunk.
Fixed error caused by "skins":[] when no skins were present.
Finally, encode animations before textures to avoid accessor misalignment due to texture byteLength.
2021-10-25 21:17:13 -07:00