Commit Graph

5993 Commits

Author SHA1 Message Date
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 `StringName`s 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
Rémi Verschelde 9ed4f8367b
Merge pull request #48332 from TokageItLab/implement-ping-pong 2021-10-11 22:55:01 +02:00
Rémi Verschelde 5edfdc53eb
Merge pull request #53681 from Paulb23/rejig-syntax-highligher-bind
Move add_syntax_highlighter bind to ScriptEditorBase
2021-10-11 19:56:43 +02:00
Yuri Roubinsky 188e08307e
Merge pull request #53647 from Chaosus/gds_fix_builtin_functions_autocompletion 2021-10-11 20:29:43 +03:00
Paulb23 3010bca41b Move add_syntax_highlighter bind to ScriptEditorBase 2021-10-11 18:13:31 +01:00
Yuri Roubinsky e270d1cce3 Fix autocompletion of built-in functions in GDScript 2021-10-11 19:06:17 +03:00
George Marques a6414b34e9
Merge pull request #53430 from DavidSichma/typed_safe_setter
Made typed member setters safe
2021-10-11 11:16:19 -03:00
George Marques f930d54140
Merge pull request #53103 from ZuBsPaCe/gdscript-analyze-properties-fix
GDScript: Report property type errors
2021-10-11 11:01:39 -03:00
Yuri Sizov 41e271af6e Remove redundant String operation from GDScript enum exports 2021-10-11 02:11:32 +03:00
Raul Santos ba4a88eaed Fix C# List<T> marshalling 2021-10-10 11:40:07 +02:00
Tokage 372ba76663 implement ping-pong loop in animation
Co-authored-by: Chaosus <chaosus89@gmail.com>
2021-10-09 18:08:43 +09:00
mashumafi 575d4e00b6 Enhance and cleanup stringify for Vector 2021-10-09 06:19:25 +00:00
Rémi Verschelde 5ae569560d
Fix missing argument names in bindings
While at it, tweak some boolean setters to use `p_enabled` for the bool.

Also renames `draw_minimap()` to `set_draw_minimap()`.
2021-10-09 00:20:10 +02:00
David Sichma d28f2ee7a5
Only emit typed member setters if safe to do so
Instructions are now only emitted if input type matches expected type.
Otherwise usual setter fallback.
2021-10-08 23:54:55 +02:00
Duroxxigar 54d305eebe Improved readability for failing error conditions 2021-10-08 17:29:25 -04:00
ZuBsPaCe 551ceb590b GDScript: Report property type errors
Inline getters & setters are now FunctionNodes.
Their names are set in the parser, not in the compiler.
GDScript-Analyzer will now run through getter and setter.
Also report wrong type or signature errors regarding getset properties.
Added GDScript tests for getters and setters.
#53102
2021-10-08 22:06:15 +02:00
Raul Santos 0be9664b42 Support marshaling generic Godot.Object
Allows using generic C# types in signals as long as they inherit
from `Godot.Object`.
2021-10-08 20:00:47 +02:00
Raul Santos 1f62d309d8 Support arrays of StringName, NodePath and RID in mono 2021-10-08 18:50:21 +02:00
Max Hilbrunner 5733c13f53
Merge pull request #53536 from Faless/mp/4.x_rpc_config
[Net] Add call_local argument to Node.rpc_config.
2021-10-08 14:15:01 +02:00
George Marques b010f96c89
Merge pull request #53336 from briansemrau/gdscript-i'm-not-my-own-local-class
[GDScript 2.0] fix script base class self-assignment
2021-10-08 09:10:19 -03:00
Fabio Alessandrelli 54ec66a700 [Net] Rename RPCConfig.sync to call_local.
For consistency with the other user facing changes.
2021-10-08 12:39:09 +02:00
George Marques 3a856b4fcc
GDScript: Use getter return type for the property type
The PropertyInfo hints are more relevant for the inspector. The getter
return type is more reliable and less likely to be incorrect and it is
what's going to be called in the end.
2021-10-07 20:22:19 -03:00
Rémi Verschelde 49e7e049ab
Merge pull request #53422 from KoBeWi/add_LUA_to_Godot 2021-10-07 23:37:37 +02:00
Rémi Verschelde 6090f90743
Merge pull request #53545 from vnen/gdscript-release 2021-10-07 23:28:34 +02:00
George Marques 082f624ef4
GDScript: Fix method ptrcall on release 2021-10-07 15:08:21 -03:00
kobewi 31012fd060 Change print_line() to use any number of Variants 2021-10-07 16:28:22 +02:00
Hugo Locurcio bcf4a56c74
Replace references to VisualServer in code comments with RenderingServer
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00
Rémi Verschelde 6eb2094d4d
Merge pull request #53494 from mhilbrunner/stop-drop-and-dont-lie
Fix outdated no_call_local, use call_remote
2021-10-07 08:29:25 +02:00
George Marques dfe3a2fad0
GDScript: Set status on parsing steps beforehand
To avoid potential dependency cycles. If any happens it will not get
into infinite recursion anymore and errors will cascade later on.
2021-10-06 21:24:27 -03:00
Max Hilbrunner 44b68f08b4 Fix outdated no_call_local, use call_remote 2021-10-06 23:51:57 +02:00
Rémi Verschelde 164dc11e04
Merge pull request #45699 from TokageItLab/implement-skeleton-editor-gizmo
Implement Skeleton Editor Gizmo
2021-10-06 21:11:20 +02:00
Rémi Verschelde 98b81ad35c
Merge pull request #53479 from vnen/gdscript-subscript-object-self 2021-10-06 19:48:23 +02:00
Rémi Verschelde ba0a103e29
Merge pull request #53478 from vnen/gdscript-avoid-hard-inference 2021-10-06 19:31:56 +02:00
Silc Renew f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
George Marques 1f55bd190c
GDScript: Allow subscript on self and object types 2021-10-06 12:01:34 -03:00
George Marques 6bdb28f5e4
GDScript: Avoid hard errors on inferred types
Since inference isn't always correct, they are now treated as unsafe
instead of errors.

This also removes inferred type when a variable is reassigned. Since
it's not aware of branching, the types might become invalid in a later
context.
2021-10-06 11:42:19 -03:00
George Marques d6c799006a
GDScript: Make all warnings enabled in test generation
The test generation doesn't initialize the language (since it's already
initialized in main), but it still needs the warning enabled so it
matches the actual tests.
2021-10-06 11:39:00 -03:00
Infinixius 547ed239c0
Fix small typos regarding WebSocketPeer 2021-10-06 09:12:05 -04:00
Rémi Verschelde 862994a8ef
doc: Update links to latest documentation after content reorganization 2021-10-06 13:48:48 +02:00
Rémi Verschelde a7ba227631
Merge pull request #52711 from m4gr3d/provide_getter_for_project_data_dir_master 2021-10-05 21:02:27 +02:00
Rémi Verschelde 788b3aa27a
doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphs
And fix up formatting not supported by makerst.
2021-10-05 19:13:20 +02:00
kobewi 9e5fdbc79d Fix LUA-style assignment in Dictionary 2021-10-05 12:17:13 +02:00
Rémi Verschelde b1c6826b9f
Merge pull request #52963 from Pineapple/WIN32_LEAN_AND_MEAN_master 2021-10-05 12:03:05 +02:00
Brian Semrau c18a27a9cd GDScript fix wrong base class assignment 2021-10-04 20:38:08 -04:00
George Marques 7725ebf3d2
GDScript: Use path cache when checking preloaded scripts
The path itself might not always be set in some cases, especially when
the script is just created and is already in the resource cache. Using
get_path() in this case gets the correct resource path.

This also adds a null check for safety in case the path is incorrect or
missing, to avoid a crash in the engine.
2021-10-04 20:48:39 -03:00
kobewi 6397eaa27e Fix some leftover references to idle_frame 2021-10-04 20:57:31 +02:00
Rémi Verschelde 7fe0f4a426
Merge pull request #52914 from vnen/gdscript-assign-member-with-op 2021-10-04 20:26:19 +02:00
Rémi Verschelde 48768663d6
Merge pull request #53399 from V-Sekai/extension-game-convert 2021-10-04 20:11:38 +02:00
George Marques 84956fee4b
GDScript: Fix member assignment with operation
It was wrongly updating the assigned value with the result of the
operation.
2021-10-04 14:09:54 -03:00
K. S. Ernest (iFire) Lee fc1634806a Enable GLTFDocumentExtensionConvertImporterMesh only in games. 2021-10-04 09:47:34 -07:00
Rémi Verschelde bb201c5887
Merge pull request #53303 from akien-mga/53295-gdscript-completion-quote-style 2021-10-04 17:17:27 +02:00
Rémi Verschelde 4a4995524c
Merge pull request #53338 from briansemrau/gdscript-handle-for-with-null-list 2021-10-04 17:11:43 +02:00
Rémi Verschelde 1fc771bfc6
Merge pull request #53366 from KoBeWi/your_argument_is_null_and_void 2021-10-04 17:11:31 +02:00
Rémi Verschelde b85dfd990e
GDScript completion: Handle quote style ad-hoc to remove editor dependency
`core` and `scene` shouldn't depend on `editor`, so they can't query this style
setting in `get_argument_options`. But we can handle it after the fact in
GDScript's completion code.

Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04 16:16:05 +02:00
Rémi Verschelde 2a09e11986
Merge pull request #52802 from V-Sekai/gltf-extensions 2021-10-04 15:52:24 +02:00
Haoyu Qiu f3816898fa Fix crash when pinned SoftBody point is out of range 2021-10-04 16:42:53 +08:00