Commit graph

6451 commits

Author SHA1 Message Date
Marvin Ewald cea0630fef Fix typed arrays for Object based types
Fixes https://github.com/godotengine/godot/issues/53771.
2022-02-19 16:27:06 +01:00
SaracenOne ae0026bc7b Make 'is_attribute' false during parse error to prevent crash 2022-02-18 12:52:46 +00:00
Markus Sauermann bac8e451c0 Describe usage of float in range documentation 2022-02-18 00:59:22 +01:00
SaracenOne ab2a8bd1d8 Fix using typed arrays based on script classes 2022-02-17 17:34:53 +00:00
SaracenOne 62d87fbd8b Return a correctly typed variant in case of a function error to prevent hard crashes 2022-02-17 15:45:19 +00:00
Rémi Verschelde b890e5b8ad
Merge pull request #58189 from fazil47/gltf-export-default-material-fix
Default material is assigned to meshes without material for glTF export
2022-02-17 09:16:36 +01:00
Ellen Poe 76f667bf2a
Merge pull request #58130 from timothyqiu/ogg-seek-crash
Fix infinite recursion when seeking Ogg Vorbis file
2022-02-16 20:14:31 -08:00
MythTitans 509e03c821 Fix normals computation at the 'seam' of smoothed sphere and cylinder shapes 2022-02-16 22:23:28 +01:00
Rémi Verschelde 009254d87c
Merge pull request #58187 from jakobbouchard/notification-switch-chunk-c
Convert _notification methods to switch - Chunk C
2022-02-16 20:58:55 +01:00
SaracenOne 657b9b6596 Fix local variables not showing when breaking on final line 2022-02-16 18:12:38 +00:00
Jakob Bouchard 6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05:00
Rémi Verschelde 5d5f80b529
Merge pull request #58190 from MisoMosiSpy/vs_icons 2022-02-16 17:18:15 +01:00
MisoMosiSpy fa2026365d Added icons for missing types in visual script’s icon list. 2022-02-16 20:31:18 +05:30
Fazil Babu 771170e7b0 Default material is assigned to meshes without material for glTF export 2022-02-16 20:19:19 +05:30
SaracenOne d45c3cdd1d Fix error when assigning to an explicitly annotated variant from an ambiguous source 2022-02-16 13:25:27 +00:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
Haoyu Qiu 1262d331c0 Fix VisualScript crash when using Set Index node 2022-02-16 15:27:41 +08:00
Haoyu Qiu 19a2ec3d04 Add GridMap.get_used_cells_by_item 2022-02-16 13:04:31 +08:00
Rémi Verschelde 11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
Rémi Verschelde 760a95e86a
Merge pull request #57877 from bruvzg/subpixel_gl_pos 2022-02-15 13:58:38 +01:00
Rémi Verschelde 78a767edb3
Merge pull request #35679 from Calinou/doc-add-xml-schema 2022-02-15 13:14:58 +01:00
Haoyu Qiu b4ffaebb87 Fix infinite recursion when seeking Ogg Vorbis file 2022-02-15 15:11:05 +08:00
Hugo Locurcio b68dd2e189
Add an XML schema for documentation
This makes it easier to spot syntax errors when editing the
class reference. The schema is referenced locally so validation
can still work offline.

Each class XML's schema conformance is also checked on GitHub Actions.
2022-02-15 00:03:31 +01:00
Rémi Verschelde d02db6306e
Merge pull request #58105 from trollodel/nuke_p_editor_editor_plugin 2022-02-14 21:10:38 +01:00
trollodel cd1d7294d8 Remove the EditorNode parameter from EditorPlugins create methods
Remove EditorNode usage from the Navigation editor plugin.
2022-02-14 18:21:42 +01:00
Haoyu Qiu b5badd12c6 Fix crash and memory leak when importing OGG Vorbis 2022-02-15 00:25:02 +08:00
Rémi Verschelde f810f76890
Merge pull request #57306 from trollodel/remove_editornode_param 2022-02-14 16:40:40 +01:00
trollodel 05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
kleonc 5422d863e1 NavMap Fix polygons being treated like triangle strips instead of triangle fans 2022-02-13 19:26:17 +01:00
Rémi Verschelde 7224389468
Merge pull request #57954 from TokageItLab/refactor-cubic-interpolate
Implement `cubic_interpolate()` as MathFunc for refactoring
2022-02-13 10:34:13 +01:00
jmb462 e5657a4fbf Fix renaming function dialog in VisualScript does not work correctly 2022-02-12 21:28:28 +01:00
bruvzg 29199579f7
Add sub-pixel glyph positioning support. 2022-02-12 19:55:52 +02:00
Hendrik Brucker 77fb65debf Use EditorFileDialog instead of FileDialog in the project manager 2022-02-12 12:06:51 +01:00
Rémi Verschelde d1dbe21c56
Merge pull request #57980 from akien-mga/vulkan-1.3.204 2022-02-12 10:21:27 +01:00
Silc 'Tokage' Renew 865da09871 Implement cubic_interpolate() as MathFunc for refactoring 2022-02-12 18:11:17 +09:00
Rémi Verschelde 7a7fabe4f6
Merge pull request #57641 from Geometror/compilation-time-improvements-1 2022-02-12 09:46:02 +01:00
Hendrik Brucker b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
strank dcf19f8914 Fix "Identifier not found" compiler error when accessing inherited signals or functions as callables. 2022-02-11 20:45:04 -05:00
Rémi Verschelde 18d6b75ba8
RendererRD: Remove binding specifier for push constants
This is unsupported and glslang made it raise an error in 11.7.0:
https://github.com/KhronosGroup/glslang/pull/2810

Co-authored-by: Clay John <claynjohn@gmail.com>
2022-02-11 18:42:32 +01:00
Fazil Babu 92f4c33492 CSG Meshes can be exported as glTF 2022-02-11 22:48:28 +05:30
Ignacio Roldán Etcheverry f4478843ca
Merge pull request #57917 from raulsntos/csharp-signal-documentation
Support signals in C# generated documentation
2022-02-11 14:51:57 +01:00
Raul Santos f380a8e0ec Support signals in C# documentation 2022-02-10 16:02:31 +01:00
Rémi Verschelde 1bdb82c64e
Fix typos with codespell
Using codespell 2.2-dev from current git.

Added `misc/scripts/codespell.sh` to make it easier to run it once in a
while and update the skip and ignore lists.
2022-02-10 12:30:19 +01:00
Rémi Verschelde 90162851a7
Core: Move generated VERSION_HASH to a .cpp file
This lets us have its definition in `core/version.h` and avoid
rebuilding a handful of files every time the commit hash changes.
2022-02-09 09:20:17 +01:00
Rémi Verschelde ba1024f42d
Merge pull request #57822 from Calinou/ios-remove-armv7 2022-02-08 23:25:16 +01:00
Rémi Verschelde 25d4c14fef
Merge pull request #57627 from JFonS/occluder_improvements 2022-02-08 23:23:50 +01:00
Ignacio Roldán Etcheverry f05f2dd80f
Merge pull request #57076 from IgorKordiukiewicz/fix-mono-string-capitalize
String.Capitalize() in C# now matches the behaviour of String::capitalize() in C++
2022-02-08 22:16:54 +01:00
Hugo Locurcio 74fc4410f4
Remove support for ARMv7 (32-bit) on iOS
All iOS devices since the iPhone 5S support ARMv8 (64-bit).

The last iOS version supported on ARMv7 devices is 10.x, which is
too old to run Godot 4.0 projects since the minimum supported
iOS version is 11.0.
2022-02-08 22:11:29 +01:00
Rémi Verschelde 4a2f22daf4
Merge pull request #57798 from akien-mga/scons-module-tests-simplify 2022-02-08 14:36:31 +01:00
Rémi Verschelde 3495288b03
SCons: Improve logic to generate modules_tests.gen.h
This removes the need for `AlwaysBuild` by ensuring that the proper
files are being tracked as `Depends`.
2022-02-08 13:01:35 +01:00
Rémi Verschelde f9e496168f
Merge pull request #57786 from 0And/vectorslerp 2022-02-08 12:56:43 +01:00
Rémi Verschelde a66e55069e
Merge pull request #57796 from akien-mga/revert-sname-theme-setters 2022-02-08 11:13:24 +01:00
Rémi Verschelde 6eeeb9a63c
Re-add missing SNAME macros in get_theme_* calls
They were removed in the previous commit reverting the addition of `SNAME`
to `add_theme_*` and theme setter methods, which is not wanted.
2022-02-08 10:31:56 +01:00
Rémi Verschelde fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
Rémi Verschelde 317cd0b19a
Refactor some object type checking code with cast_to
Less stringly typed logic, and less String allocations and comparisons.
2022-02-08 10:08:34 +01:00
Andrew Jacob 8675ff0a74 Allow C# Vector2/3 slerp values to have any length 2022-02-07 22:58:43 -07:00
Rémi Verschelde d35269ab21
Merge pull request #57764 from timothyqiu/octant-delete 2022-02-07 18:28:27 +01:00
Rémi Verschelde 05bad19a9a
Merge pull request #57752 from Calinou/doc-csg-nodes-performance 2022-02-07 18:27:58 +01:00
Haoyu Qiu 5d4a141c97 Fix GridMap memory leak 2022-02-08 00:27:01 +08:00
Hugo Locurcio 5268786ac0
Document performance limitations with CSG nodes, link to tutorial 2022-02-07 15:55:02 +01:00
Fabio Alessandrelli 086256431a [Net] Add type check to GDScriptRPCCallable.
It will print an error when using an RPC defined on an object which does
not extend Node.
2022-02-07 13:39:45 +01:00
Fabio Alessandrelli 994638da4f [Net] Implement GDScript custom RPC callable. 2022-02-07 13:39:10 +01:00
Rémi Verschelde 1694626e03
Merge pull request #57305 from bruvzg/macos_cleanup 2022-02-07 13:36:09 +01:00
Rémi Verschelde 6a56314eab
Merge pull request #57748 from fabriceci/rename-script-template-variable 2022-02-07 13:22:23 +01:00
jfons dd970482c5 Improvements and fixes to occluders
Improvements:
* Occluder3D is now an abstract type inherited by: ArrayOccluder3D, QuadOccluder3D, BoxOccluder3D, SphereOccluder3D and PolygonOccluder3D. ArrayOccluder3D serves the same purpose as the old Occluder3D (triangle mesh occluder) while the rest are primitives that can be used to manually place simple occluders.
* Occluder baking can now apply simplification. The "bake_simplification_distance" property can be used to set a world-space distance as the desired maximum error, set to 0.1 by default.
* Occluders can now be generated on import. Using the "occ" and "occonly" keywords (similar to "col" and "colonly" for colliders) or by enabling on MeshInstance3Ds in the scene's import window.

Fixes:
* Fixed saving of occluder files after bake.
* Fixed a small error where occluders didn't correctly update in the rendering server.

Bonus content:
* Generalized "CollisionPolygon3DEditor" so it can also be used to edit Resources. Renamed it to "Polygon3DEditor" since it was already being used by other things, not just colliders.
* Fixed a small bug in "EditorPropertyArray" where a call to "remove" was left after the "remove_at" rename.
2022-02-07 13:04:51 +01:00
Rémi Verschelde bfb75d107c
Merge pull request #57741 from Chaosus/vs_fixes 2022-02-07 12:50:44 +01:00
fabriceci e81ccaf270 rename jump force to jump velocity 2022-02-07 11:46:30 +01:00
Rémi Verschelde b024602660
Merge pull request #57725 from jmb462/missing-sname-theme-setters 2022-02-07 11:46:25 +01:00
Yuri Roubinsky a6e280c5de Add some more fixes to visual shader 2022-02-07 11:28:42 +03:00
Raul Santos 303f0c8626 Attach mono thread before getting nativeName field
In order to access the `nativeName` constant field from a C# class, the
mono scope thread must be attached or the mono domain will be null.
2022-02-07 03:43:34 +01:00
jmb462 a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Rémi Verschelde eb4b4a317b
Merge pull request #57649 from Faless/net/4.x_ws_queue_hostres
[Net] Non-blocking WebSocket hostname resolution.
2022-02-05 18:23:11 +01:00
Jordan Schidlowsky 1ec96bc206 [Net] Non-blocking WebSocket hostname resolution.
Hostname is now resolved during poll in WebSocketClient (wslay) to avoid
blocking during connect.
An attempt is still made to find the hostname in the resolver cache.
2022-02-05 02:22:43 +01:00
K. S. Ernest (iFire) Lee 419b342a9a Faster CVTT by reducing quality.
Make BC6 and BC7 CVTT faster while still having better quality than DXT5.
2022-02-04 15:15:26 -08:00
Rémi Verschelde 77d08b68b0
Merge pull request #49445 from Calinou/gdscript-highlight-namespace-reserved-keyword 2022-02-04 19:03:28 +01:00
Rémi Verschelde 2885befbe6
Merge pull request #55950 from Faless/mp/4.x_replication_nodes 2022-02-04 19:03:10 +01:00
Rémi Verschelde 61c57491bc
Merge pull request #57625 from akien-mga/core-split-vector2i-own-header 2022-02-04 19:00:39 +01:00
Hugo Locurcio de45534fed
Highlight "namespace" as a GDScript keyword in the syntax highlighter
Like "trait" and "yield", "namespace" is currently not implemented
but is still reserved for future use.
2022-02-04 17:46:13 +01:00
Rémi Verschelde e223bad86d
Core: Move Vector2i to its own vector2i.h header
Also reduce interdependencies and clean up a bit.
2022-02-04 16:32:21 +01:00
Rémi Verschelde 8495be9cec
Merge pull request #57621 from akien-mga/core-split-rect2i-own-header 2022-02-04 16:05:30 +01:00
Ignacio Roldán Etcheverry 721c32ee2b
Merge pull request #57618 from Densorius/master
Fixed opening new instances of VS 2022 while a instance is already open
2022-02-04 15:05:51 +01:00
Fabio Alessandrelli d219547c96 [Net] New replication interface, spawner and synchronizer nodes.
Initial implementation of the MultiplayerReplicationInterface and its
default implementation (SceneReplicationInterface).

New MultiplayerSpawner node helps dealing with instantiation of scenes
on remote peers (e.g. clients).
It supports both custom spawns via a `_spawn_custom` virtual function,
and optional auto-spawn of known scenes via a TypedArray<PackedScenes>
property.

New MultiplayerSynchornizer helps synchronizing states between the local
and remote peers, supports both sync and spawn properties and is
configured via a `SceneReplicationConfig` resource.
It can also sync via path (i.e. without being spawned by a
MultiplayerSpawner if both peers has it in tree, but will not send the
spawn state in that case, only the sync one.
2022-02-04 14:56:30 +01:00
Rémi Verschelde 5f56d385b0
Core: Move Rect2i to its own rect2i.h header
And take the opportunity to improve interdependencies a bit with forward
declares where possible.
2022-02-04 14:17:30 +01:00
Rémi Verschelde 89eb6d372d
Merge pull request #57591 from vnen/gdscript-enum-fixes 2022-02-04 13:49:15 +01:00
Densorius 93e2d0446f Fixed opening new instances of VS 2022 while a instance is already open 2022-02-04 10:40:43 +01:00
bruvzg 244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
Densorius 9ea0508d35 Add Visual Studio 2022 support with fallback to 2019 2022-02-04 00:34:02 +01:00
Rémi Verschelde f8f19b313d
Merge pull request #57562 from AnilBK/string-add-contains
String: Add contains().
2022-02-03 22:21:24 +01:00
Anilforextra adbe948bda String: Add contains(). 2022-02-04 01:28:02 +05:45
Rémi Verschelde c47f059776
Merge pull request #57467 from webbuf/modules-initialize
Initialized Member Variables in /modules
2022-02-03 20:41:29 +01:00
George Marques ceafdf347e
GDScript: Treat enum values as int and enum types as dictionary
Since enums resolve to a dictionary at runtime, calling dictionary
methods on an enum type is a valid use case. This ensures this is true
by adding test cases. This also makes enum values be treated as ints
when used in operations.
2022-02-03 13:32:34 -03:00
George Marques b013c0d544
GDScript: Allow tests to run on release builds
- Fix compilation issues by disabling warnings on release builds. This
  also strips warnings from expected result before the comparison to
  avoid false mismatches.
- Add a `#debug-only` flag to tests. Must be the first line of the test
  script. Those won't run with release builds. Can be used for test
  cases that rely on checks only available on debug builds.
2022-02-03 13:32:33 -03:00
George Marques ad6e2e82a9
GDScript: Consolidate behavior for assigning enum types
This makes sure that assigning values to enum-typed variables are
consistent. Same enum is always valid, different enum is always
invalid (without casting) and assigning `int` creates a warning
if there is no casting.

There are new test cases to ensure this behavior doesn't break in
the future.
2022-02-03 13:32:16 -03:00
zwebb 466661c78f initialized member variables in header 2022-02-03 11:14:42 -05:00
Rémi Verschelde 45d5aa5d47
Merge pull request #56365 from aaronfranke/default-shape-size 2022-02-03 16:59:07 +01:00
bruvzg 5676b3c022
HarfBuzz: Update to version 3.3.1 2022-02-02 22:29:31 +02:00
bruvzg 215bede6ff
[TextServer] Add function to change font, font size, and OpenType features without invalidating line break points, justification points, or recreating shaped text buffer. 2022-02-02 11:20:44 +02:00
Lisandro Lorea 69e30d91ee
Fix "texture not initialized" error preventing video from playing
Closes #57153
2022-02-01 23:55:17 -03:00
bruvzg 33d6d4bdf7
[macOS] Enable Objective-C ARC 2022-02-01 15:58:30 +02:00
Rémi Verschelde d4e21b7d62
Merge pull request #57358 from akien-mga/signal-bindings-object 2022-02-01 14:24:47 +01:00