Commit graph

6049 commits

Author SHA1 Message Date
Hugo Locurcio
ce97ddbcb1
Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3
- Use lowercase driver names for the `--rendering-driver`
  command line argument.
2021-10-30 02:05:49 +02:00
Aaron Franke
6772ebcea0
Move the docs for constructors and operators out of methods section 2021-10-29 12:34:57 -05:00
Hugo Locurcio
89cf17c96f
Use maximum zlib compression when generating editor translation headers
With comments stripped, this reduces the combined generated translation
size from 28.7 MB to 28.4 MB (-240 KB).
2021-10-29 19:07:48 +02:00
Ignacio Roldán Etcheverry
7d99ccda1d
Merge pull request #54361 from raulsntos/csharp-call-able-callable
Implement Call methods in C# Callable
2021-10-29 17:27:04 +02:00
Fabio Alessandrelli
dae626ad64
Merge pull request #54344 from mhilbrunner/rpc-error-msgs
Websockets: Fix buffer size checks in put_packet(), silent failures/connection hangs
2021-10-29 16:12:34 +02:00
Max Hilbrunner
38126690c7 Websockets: Fix buffer size checks in put_packet()
Also check the error return value of wslay_event_queue_msg()
2021-10-29 15:35:57 +02:00
Raul Santos
21afb63485 Implement Call methods in C# Callable
Implements Callable.Call and Callable.CallDeferred methods in C#
2021-10-28 22:49:17 +02:00
Rémi Verschelde
f7d852b532
Merge pull request #54350 from akien-mga/clang-format-dont-align-operands 2021-10-28 17:10:52 +02:00
Rémi Verschelde
0ae65472e7
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 15:57:41 +02:00
Rémi Verschelde
6b090e325a
Merge pull request #53526 from KoBeWi/super_print 2021-10-28 15:47:52 +02:00
Rémi Verschelde
3a6be64c12
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 15:43:36 +02:00
Rémi Verschelde
3b11e33a09
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 15:19:35 +02:00
Max Hilbrunner
626ca50676 Improve GDScript indentation error message 2021-10-28 13:01:53 +02:00
Max Hilbrunner
7a55aac49c Fix Macros -> Mactos typo in WEBSOCKETMACTOS_H 2021-10-28 12:45:00 +02:00
bruvzg
63f3051154 Implement TextServer strip_diacritics function. 2021-10-28 10:12:57 +03:00
bruvzg
44a241b241 ICU: Update to version 70.1 2021-10-28 09:15:28 +03:00
kobewi
de4f29f458 Remove node_hrcr hack 2021-10-28 01:43:34 +02:00
Rémi Verschelde
c2640e2b21
Merge pull request #54254 from mhilbrunner/ticks-msec-64 2021-10-26 14:53:56 +02:00
Max Hilbrunner
5dc02eb8b0 Save all 64 bits of get_ticks_msec() in more cases 2021-10-26 13:58:58 +02:00
Lyuma
cada1a4747 gltf: 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:12:43 -07:00
reduz
d03b7fbe09 Refactored Node3D rotation modes
* Made the Basis euler orders indexed via enum.
* Node3D has a new rotation_order property to choose Euler rotation order.
* Node3D has also a rotation_mode property to choose between Euler, Quaternion and Basis

Exposing these modes as well as the order makes Godot a lot friendlier for animators, which can choose the best way to interpolate rotations.
The new *Basis* mode makes the (exposed) transform property obsolete, so it was removed (can still be accessed by code of course).
2021-10-25 14:34:00 -03:00
bruvzg
ebbc25e89c Ignore empty Font resources as theme override.
Add range hint to font_size properties.
Remove excessive `base_size` Font property.
2021-10-25 14:05:37 +03:00
Rémi Verschelde
6ccc3e4d87
Merge pull request #54130 from raulsntos/csharp-exports
Keep order for C# exported members
2021-10-24 21:17:58 +02:00
Silc 'Tokage' Renew
653e2a550c Fixed animation insertion in SkeletonEditor 2021-10-23 16:50:00 +09:00
Aaron Franke
474d0f58f5
Add support for the RISC-V architecture
Supports RV64GC (RISC-V 64-bit with general-purpose and compressed-instruction extensions)
2021-10-22 12:51:10 -05:00
Rémi Verschelde
beb3875cdf
Merge pull request #53781 from m4gr3d/restrict_project_data_dir_config_master 2021-10-22 19:30:35 +02:00
Raul Santos
c6ecc04114
Keep order for C# exported members 2021-10-22 19:25:01 +02:00
Rémi Verschelde
9f7218eb69
Merge pull request #54088 from madmiraal/remove-unimplemented-methods 2021-10-22 12:59:32 +02:00
Bartłomiej T. Listwon
42cce2891f Don't ignore the type mismatch in setter function 2021-10-22 12:44:33 +02:00
Marcel Admiraal
87a4ba492e Remove unimplemented methods 2021-10-21 18:44:25 +01:00
Rémi Verschelde
133c1eb0af
Merge pull request #52367 from Duroxxigar/improve-nav-error-messages
Improve readability for failing errors in nav area
2021-10-21 19:36:16 +02:00
PouleyKetchoupp
e6f7235ffb Fix SoftDynamicBody3D crash when setting disable mode
Proper logic for changing physics state when disabled and disabled mode
is changed (it was unnecessarily making calls to re-initialize physics).

Extra error handling in soft body implementations to avoid crashes with
invalid mesh.
2021-10-21 08:56:12 -07:00
Rémi Verschelde
b9a59f60c1
Mono: Fix build after #52940
Chose to pass unhandled exceptions to the toaster, we might want to reconsider
if those are already reported somewhere else (e.g. in the Mono panel).
2021-10-20 11:07:20 +02:00
Rémi Verschelde
9471de7e00
Merge pull request #53081 from williamd67/GPULightmapper-first-dilate-than-denoise 2021-10-19 13:23:22 +02:00
Bastiaan Olij
96b707215d Add support for returning the play area from XRInterface 2021-10-19 21:17:04 +11:00
Rémi Verschelde
4387f9645b
Merge pull request #52940 from groud/toast_notification 2021-10-19 09:57:13 +02:00
Rémi Verschelde
723b988fde
Merge pull request #52210 from BastiaanOlij/enhance_xr_trackers 2021-10-19 08:11:32 +02:00
Ignacio Roldán Etcheverry
cad05f012d C#: Fix property set call boxing value when unboxed was expected 2021-10-19 00:33:51 +02:00
ne0fhyk
b5c750fa65 Restrict the project data directory configuration 2021-10-18 14:10:38 -07:00
Rémi Verschelde
297c5c72e9
Merge pull request #53760 from V-Sekai/import-post 2021-10-18 11:32:36 +02:00
Rémi Verschelde
850394bc07
Merge pull request #53946 from BenjaminNavarro/fix_dbg_check 2021-10-18 10:40:55 +02:00
Rémi Verschelde
76d90bb568
Merge pull request #53943 from raulsntos/fixup-53581 2021-10-18 10:38:41 +02:00
Benjamin Navarro
560d9a4cc0 Fix incorrect debug check for setters
the check read the return type of the setter, which doesn't exist and
lead to a segmentation fault. Now we check the first function parameter.
Probably a bad copy/paste of the getter case
2021-10-18 09:01:16 +02:00
Raul Santos
bc47bacc9e Fix marshaling generic Godot.Object in C# 2021-10-18 03:07:47 +02:00
Anutrix
a4b736658e Remove unused imports in .py, SCsub and SConstruct files 2021-10-18 01:50:34 +05:30
opl-
ad14b80e2a Fix name used instead of doc for GDScript signals 2021-10-17 05:54:27 +02:00
Bastiaan Olij
5d1ea92daf Rework XR positional trackers 2021-10-17 12:12:20 +11:00
Rémi Verschelde
a4e1a07d83
Merge pull request #53865 from reduz/implement-blend-shape-tracks 2021-10-16 16:48:10 +02:00
Rémi Verschelde
d6aab5c1bf
SCons: Fix missing mono .gen.cpp sources after #53860 2021-10-16 15:53:14 +02:00
reduz
ae1c016547 Implement Animation Blend Shape Tracks
* New track type BLEND_SHAPE
* Blend shapes are imported via this new track type
* Processing is more optimized (no longer relies on variants)
* Modified the Blend Shape API in MeshInstance3D to use indices rather than StringNames (more optimizes)
* Promo: Fixed a small bug in gizmo updating in Node3D that affected performance

Dedicated BlendShape tracks are required for both optimization and eventually implementing them in animation compression.
2021-10-16 08:36:05 -03:00
William Deurwaarder
5465ef83cb GPULightmapper: execute dilate also after denoise
Dilate fills gaps that are caused by the rasterization. As dilate is based on
the alpha-channel which is not part of denoise, dilate can be run after denoise
as well. So that colors are not denoised/mixed over seams.
2021-10-16 11:28:37 +02:00
William Deurwaarder
a7599076d2 GPULightmapper: execute dilate before denoise
Dilate fills gaps that are caused by the rasterization. Previously denoise
was done before dilate which caused the gaps to become filled (non-zero). This
resulted that the gaps were not recognized by
dilate  and the background color leaked.

This is fixed by executing dilate before denoise.
2021-10-16 11:28:37 +02:00
Rémi Verschelde
08d1ce718d
Merge pull request #53856 from vnen/gdscript-setter-crash 2021-10-15 21:35:42 +02:00
George Marques
b0725a3b7d
GDScript: Avoid crash if missing setter signature 2021-10-15 15:53:24 -03:00
Raul Santos
035e14c69d Fix hint_string for C# enum arrays 2021-10-15 19:23:40 +02:00
Rémi Verschelde
fe4ca9e4df
Merge pull request #53849 from bruvzg/ts_index_checks 2021-10-15 19:13:58 +02:00
bruvzg
efb1c03243 [TextServer] Add texture index, offsets array size and Unicode char validation. 2021-10-15 18:36:00 +03:00
Rémi Verschelde
f113dc9863
Merge pull request #53627 from raulsntos/fix-list-marshal 2021-10-15 17:35:45 +02:00
Rémi Verschelde
6fb06ec47e
Merge pull request #53581 from raulsntos/mono-marshal-generics 2021-10-15 17:35:21 +02:00
Rémi Verschelde
4a0a91facf
Merge pull request #53576 from raulsntos/fix-mono-to-variant-array 2021-10-15 17:34:43 +02:00
Rémi Verschelde
1efe7093be
Merge pull request #53833 from akien-mga/remove-webm-support 2021-10-15 17:33:06 +02:00
Rémi Verschelde
3f888966c0
Merge pull request #53843 from vnen/gdscript-typed-array-subscript-constant
Fix inferred typed array marked as constant
2021-10-15 16:49:29 +02:00
Rémi Verschelde
d15512c17f
Merge pull request #53844 from williamd67/GPULightmapper-increase-ray-triangle-hit-rate 2021-10-15 16:31:55 +02:00
George Marques
540821a264
GDScript: Fix inferred typed array marked as constant 2021-10-15 10:40:50 -03:00
William Deurwaarder
a3f315c81b GPULightmapper: increase ray triangle hit rate
Currently the method ray_hits_triangle determines triangles not to be hit by
a ray due to an epsilon that is too big. In practice those triangles are hit by
those rays.

This is fixed by introducing a smaller epsilon.
2021-10-15 15:19:43 +02:00
reduz
b3bf90b3ce Add scene Post-Import Plugin support.
* New plugin system to control the whole import workflow
* Can add options and run code at every import step (general, per node, mesh, animation, material etc.)

This constitutes a first version of these plugins. The ability to interact with the import preview dialog will likely be added later on.
2021-10-15 09:12:04 -03:00
Rémi Verschelde
ae74e78909
Remove WebM support (and deps libvpx and opus)
We've had many issues with WebM support and specifically the libvpx library
over the years, mostly due to its poor integration in Godot's buildsystem,
but without anyone really interested in improving this state.

With the new GDExtensions in Godot 4.0, we intend to move video decoding to
first-party extensions, and this would likely be done using something like
libvlc to expose more codecs.

Removing the `webm` module means we can remove libsimplewebm, libvpx and
opus, which we were only used for that purpose. Both libvpx and opus were
fairly complex pieces of the buildsystem, so this is a nice cleanup.

This also removes the compile-time dependency on `yasm`.

Fixes lots of compilation or non-working WebM issues which will be linked
in the PR.
2021-10-15 12:09:11 +02:00
Rémi Verschelde
027d1f1551
Merge pull request #53822 from vnen/gdscript-await-issues
Fix a few issues with await in GDScript
2021-10-15 07:26:48 +02:00
George Marques
84abb9a76c
GDScript: Fix typing for await expression
Don't grab the type of the awaited value unless it's constant (which
makes it synchronous) or call (which always use the proper return type).
2021-10-14 20:30:06 -03:00
George Marques
749d89ae38
GDScript: Remove error when coroutine is called without await
In the case the call happens as a statement, since the return value
isn't used in this case.
2021-10-14 20:12:01 -03:00
George Marques
056a54db7b
GDScript: Properly return value with await on non-coroutine
If the keyword `await` is used without a coroutine, it should still
return the value synchronally.
2021-10-14 19:58:10 -03:00
George Marques
d36213bab8
GDScript: Make sure calls don't use return when not needed 2021-10-14 19:55:45 -03:00
K. S. Ernest (iFire) Lee
8f0c056431 Fix specific warnings issues by Clang
Found by `scons dev=yes` on llvm-mingw.
2021-10-14 14:14:26 -07:00
Rémi Verschelde
472ff40f71
Merge pull request #53807 from vnen/dont-share-arrays-and-dicts 2021-10-14 20:42:22 +02:00
George Marques
4c14051b3f
Zero Dictionary and Array variants when changing type with reset
So they don't reference to the old values anymore and instead refer to
a new value.
2021-10-14 11:22:17 -03:00
George Marques
bf322bacdd
Merge pull request #53726 from briansemrau/gd-outer-class
GDScript 2.0: Access outer scope classes
2021-10-14 10:12:52 -03:00
Gilles Roudière
0587e5e018 Implement toast notifications in the editor 2021-10-14 13:30:54 +02:00
Brian Semrau
0ff0f64cd4 GDScript: Access outer scope classes 2021-10-13 22:39:12 -04:00
K. S. Ernest (iFire) Lee
e3d1189916 Restore gltf animation export after split. 2021-10-13 15:18:27 -07:00
reduz
2dc823273e Remove REST transform influence in skeleton bones
* Animations and Skeletons are now pose-only.
* Rest transform is kept as reference (when it exists) and for IK
* Improves 3D model compatibility (non uniform transforms will properly work, as well as all animations coming from Autodesk products).
2021-10-13 14:51:29 -03:00
Rémi Verschelde
3e86ca5586
Merge pull request #53689 from reduz/remove-animation-transform3d-track 2021-10-13 12:40:33 +02:00
K. S. Ernest (iFire) Lee
b7ceec9d7b Error check GLTFDocumentExtensionConvertImporterMesh::import_post. 2021-10-13 02:55:09 -07:00
Rémi Verschelde
9e05f80dae
Merge pull request #53744 from williamd67/GPULightmapper-prevent-endless-loop 2021-10-13 11:40:37 +02:00
Rémi Verschelde
2c46a1f327
Merge pull request #53743 from williamd67/GPULightmapper-process-rays-to-sky 2021-10-13 11:40:27 +02:00
Rémi Verschelde
2eeb9a8d0e
Merge pull request #53322 from williamd67/GPULightmapper-skip-smoothen-positions-flat-triangle 2021-10-13 11:40:14 +02:00
reduz
ec19ed3723 Remove animation 3D transform track, replace by loc/rot/scale tracks.
* `Animation.TYPE_TRANSFORM3D` track is gone.
* Added POSITION_3D, ROTATION_3D, SCALE_3D tracks.
* GLTF2, Collada, FBX importers will only import the track types found.
* Skeleton3D bone poses are now Pos/Rot/Scale, pose matrix removed.
* AnimationPlayer and AnimationTree animate these tracks separately, only when found.
* Removed BakeReset code, is useless with these changes.

This is the first in a series of commits designed to make the animation system in Godot more useful, which includes:

* Better compatibility with Autodesk products
* Better reusability of animations across models (including retargeting).
* Proper animation compression.
* etc.

*Note* GLTF2 animation saving went broken with this PR, needs to be fixed in a subsequent one.
2021-10-12 20:08:42 -03:00
William Deurwaarder
f3f64389ca GPULightmapper: prevent loop with max iterations
In case the calculation of the delta contained infinity values (division by
zero), than later the calculation of the next cell failed as the infinity value
was multiplied by zero which resulted in a nan. The nan-value caused that the
next cell was equal to the current cell which resulted in an end-less loop,
which only terminates by the maximum iterations protection.

This is solved by replacing infinity with grid_size which acts as infinity.
2021-10-12 23:43:34 +02:00
William Deurwaarder
fbd95c3e53 GPULightmapper: process rays to sky in all bounces as active
Before this change only rays to the sky (RAY_MISS) in the first bounce were
processed as active rays. This caused artifacts, areas were too light, when
more than one bounce were processed.

Now rays to the sky are processed as active rays for all bounces.
2021-10-12 23:25:45 +02:00
Rémi Verschelde
88463c3eee
Merge pull request #53712 from CakHuri/nullptr
Replace NULL with nullptr
2021-10-12 22:30:43 +02:00
William Deurwaarder
9e58b02252 GPULightmapper: skip smoothen positions for flat triangles
Smoothening positions for flat, non-smoothened, triangles is unnecessary and
caused positions to move outside their  triangle which caused side-effects as
rays from those positions intersected with triangles which could not be
reached from the original triangle.

This is solved by skipping smoothening of positions for flat triangles.
A triangle is determined to be flas as its vertex normals are equal.
2021-10-12 18:23:16 +02:00
Rémi Verschelde
e4288bf728
Merge pull request #53720 from vnen/gdscript-typed-array-custom-class 2021-10-12 16:51:50 +02:00
George Marques
34288b24a6
GDScript: Fix typed array with custom classes 2021-10-12 10:41:04 -03:00
M. Huri
033dc4dbef Replaced NULL with nullptr 2021-10-12 20:20:19 +07:00
George Marques
45f546c1d8
GDScript: Make setter parameter type same as variable type 2021-10-12 09:39:23 -03:00
Rémi Verschelde
b67e68bce3
Merge pull request #53697 from bruvzg/ts_string_names 2021-10-12 12:45:24 +02:00
bruvzg
8e98e71997 Move static feature set and number system StringNames to the singleton.
Remove `hb_` prefix from the custom bitmap font functions to avoid potential conflicts with the HarfBuzz.
Cleanup commented debug code.
Update numbering system data to CLDR 39.
2021-10-12 12:47:18 +03:00
Rémi Verschelde
0fd50ff217
Merge pull request #52736 from aaronfranke/lgtm-mult
Fix some LGTM errors of "Multiplication result converted to larger type"
2021-10-12 08:38:46 +02:00
Aaron Franke
7e51e4cb84
Fix some LGTM errors of "Multiplication result converted to larger type" 2021-10-12 00:17:27 -05:00
M. Huri
b981c111c9 Fixed a typo in csg module 2021-10-12 11:12:19 +07:00
Juan Linietsky
610de0974d
Revert "Implement reverse playback and ping-pong loop in AnimationPlayer and NodeAnimation" 2021-10-11 19:27:50 -03:00