Commit graph

8164 commits

Author SHA1 Message Date
Rémi Verschelde
ba551727ef
Merge pull request #71458 from raulsntos/dotnet/quaternion
C#: Make `Length` and `LengthSquared` into methods in `Quaternion`.
2023-01-16 09:20:53 +01:00
Rémi Verschelde
88c81bfbe5
Merge pull request #71456 from raulsntos/dotnet/sync-plane
C#: Sync `Plane` with Core
2023-01-16 09:20:30 +01:00
Rémi Verschelde
94312ab943
Merge pull request #71445 from raulsntos/dotnet/transforms
C#: Add missing `Transform{2D,3D}` and `Basis` constructors
2023-01-16 09:20:07 +01:00
Rémi Verschelde
fda8e6b18d
Merge pull request #71431 from raulsntos/dotnet/scale-and-rotation
C#: Replace `Rotation` and `Scale` properties with get methods
2023-01-16 09:19:43 +01:00
Rémi Verschelde
2118f8e8a3
Merge pull request #70684 from filiperinaldi/fix_arm64_build_clang
Fix arm64 build when using Clang
2023-01-16 09:15:44 +01:00
Adam Scott
48e041458f Fix cyclic reference errors while reducing identifiers.
Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
2023-01-15 19:19:25 -05:00
kobewi
b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
Aaron Franke
208df30eeb
Improve the documentation of GLTFDocument's append methods 2023-01-15 14:27:08 -06:00
Raul Santos
7a19c87c7e
C#: Sync Plane with Core
- Add `Plane(Vector3)` constructor.
- Rename `IntersectRay` to `IntersectsRay`.
- Rename `IntersectSegment` to `IntersectsSegment`.
- Replace `Center` property with `GetCenter` method.
- Add and fix documentation about the _normal_ parameter
to Core and C# documentation.
2023-01-15 19:47:42 +01:00
poohcom1
aa4bceff3e Add identifier completion for custom classes.
Previously, custom class would only auto-complete for types in GDScript.
This applies it to identifiers as well.
2023-01-16 00:25:24 +07:00
Raul Santos
5136366112
C#: Add missing Transform{2D,3D} and Basis constructors
- Remove `Transform3D(Quaternion, Vector3)` constructor from C#.
- Add `Transform3D(Projection)` constructor to C#.
- Add documentation to the `Transform3D(Projection)` constructor in Core.
- Add `Transform3D` constructor with only real_t params to C# that mirrors `Transform2D`.
- Expose `Basis` constructor with only real_t params in C#.
- Add `Transform2D(real_t, Vector2, real_t, Vector2)` constructor to C#.
2023-01-15 15:45:43 +01:00
Doug Thompson
a4c734ed32 Class reference: snake_case .gd filenames, _on_*
This is for:
https://github.com/godotengine/godot-docs/issues/6245
2023-01-15 13:26:29 +00:00
Raul Santos
0476fc5a07
C#: Replace Rotation and Scale properties with get methods
- Replace `Rotation` property with `GetRotation` method in `Transform2D`.
- Replace `Scale` property with `GetScale` method in `Transform2D`.
- Replace `Scale` property with `GetScale` method in `Basis`.

Core does not expose set methods.
2023-01-15 14:06:16 +01:00
Raul Santos
28a8caac26
C#: Make Length and LengthSquared into methods in Quaternion.
The `Length` and `LengthSquared` members are implemented as methods
in every other C# struct, `Quaternion` was the only one implementing
them as properties.
2023-01-15 14:03:44 +01:00
Rémi Verschelde
d6d87b6ca4
Merge pull request #71374 from raulsntos/dotnet/remove-spherical_interpolate_with
C#: Remove `SphericalInterpolateWith` from Transform3D
2023-01-15 13:08:15 +01:00
Rémi Verschelde
e51426cab9
Merge pull request #71423 from raulsntos/dotnet/intersects-without-include_borders
C#: Remove `includeBorders` parameter from `Rect2i.Intersects` and `AABB.Intersects`
2023-01-15 13:07:13 +01:00
Rémi Verschelde
90c1f4bba4
Merge pull request #71424 from raulsntos/dotnet/sync-basis
C#: Sync `Basis` with Core
2023-01-15 13:06:48 +01:00
Bastiaan Olij
909ec66ca3 Fixes issue where failed start of OpenXR causes issues 2023-01-15 16:57:42 +11:00
Raul Santos
949a2778ca
C#: Sync Basis with Core
- Remove `GetOrthogonalIndex` method (moved to `GridMap`).
- Remove `GetRow` and `SetRow` methods.
2023-01-14 20:06:45 +01:00
Yuri Sizov
4c1f11944e Update all outdated online documentation links 2023-01-14 19:38:00 +03:00
kobewi
59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Yuri Rubinsky
9bd5ef1836 Fix GDScript script templates to use a PascalCase style for _CLASS_ 2023-01-14 16:21:05 +03:00
Raul Santos
c990f7984e
C#: Remove includeBorders parameter from Rect2i.Intersects and AABB.Intersects 2023-01-14 04:39:40 +01:00
Raul Santos
4438315242
C#: Remove SphericalInterpolateWith from Transform3D 2023-01-14 02:10:59 +01:00
Yuri Sizov
4c5e09f96a
Merge pull request #71339 from raulsntos/dotnet/is_finite
Add `IsFinite` to C# Variants
2023-01-13 23:34:51 +03:00
Yuri Sizov
bdb3543c2a
Merge pull request #71343 from raulsntos/dotnet/is_zero_approx
Add `IsZeroApprox` to C# vectors
2023-01-13 23:31:24 +03:00
Raul Santos
14c16746f3
Add IsZeroApprox to C# vectors 2023-01-13 18:53:39 +01:00
Rémi Verschelde
8716c12ead
Merge pull request #71325 from reduz/refactor-project-setting-overrides
Refactor ProjectSetting overrides
2023-01-13 18:03:15 +01:00
Rémi Verschelde
ef01b49227
Merge pull request #71329 from vnen/gdscript-fix-enum-value-resolution
GDScript: Fix infinite recursion in resolution of enum values
2023-01-13 18:02:58 +01:00
Rémi Verschelde
4c2dea108e
Merge pull request #70540 from vaartis/multiline-arrays-dictionaries
Implement export_multiline support for Array[String] and Dictionary
2023-01-13 18:01:55 +01:00
Raul Santos
f852004cf5
Add IsFinite to C# Variants 2023-01-13 17:57:52 +01:00
Juan Linietsky
6f0e210093 Refactor ProjectSetting overrides
* Overrides no longer happen for set/get.
* They must be checked with a new function: `ProjectSettings::get_setting_with_override()`.
* GLOBAL_DEF/GLOBAL_GET updated to use this

This change solves many problems:
* General confusion about getting the actual or overriden setting.
* Feature tags available after settings are loaded were being ignored, they are now considered.
* Hacks required for the Project Settings editor to work.

Fixes #64100. Fixes #64014. Fixes #61908.
2023-01-13 15:13:56 +01:00
Dmitrii Maganov
40613ebd21 GDScript: Fix typing of iterator in for loop 2023-01-13 15:36:11 +02:00
George Marques
3a5e41293c
GDScript: Fix infinite recursion in resolution of enum values 2023-01-13 10:17:30 -03:00
stmSi
f286e93fef Fix OGG page_data out of bound crash 2023-01-13 13:39:03 +06:30
Rémi Verschelde
e62f57f51d
Merge pull request #70904 from huangjiaminhhh/master
Fix for navmesh baking when parsing StaticBody colliders
2023-01-12 22:24:37 +01:00
Rémi Verschelde
6dba67c27d
Merge pull request #71247 from rsjtdrjgfuzkfg/etcpak
etcpak: Fix ETCPAK_TYPE_ETC2_RA_AS_RG
2023-01-12 21:10:49 +01:00
Rémi Verschelde
aaa5158ff9
Merge pull request #70733 from vonagam/fix-assigning-untyped
GDScript: Fix some issues with assignments that involve untyped things
2023-01-12 20:08:55 +01:00
Rémi Verschelde
40b9c246b6
Merge pull request #71197 from adamscott/add-default-virtual-path-gdscript
Add default virtual `gdscript://` path to `GDScript` instances
2023-01-12 17:56:09 +01:00
Rémi Verschelde
def592114f
Merge pull request #70700 from vonagam/fix-abstract-extends
GDScript: Fix extending abstract classes, forbid their construction
2023-01-12 17:19:51 +01:00
Dmitrii Maganov
274d49790d GDScript: Fix extending abstract classes, forbid their construction 2023-01-12 17:47:10 +02:00
Adam Scott
e3e55b29ce Add default virtual gdscript:// path to GDScript instances 2023-01-12 10:27:38 -05:00
Dmitrii Maganov
38c214d483 GDScript: Fix some issues with assignments that involve untyped things 2023-01-12 17:07:45 +02:00
Rémi Verschelde
c6f4c0ac54
Merge pull request #70899 from adamscott/fix-vector-inf
Fix parse error using Vector{2,3,4}.INF
2023-01-12 15:59:01 +01:00
Dmitrii Maganov
5980abbcec GDScript: Fix getting type from PropertyInfo for Variant arguments 2023-01-12 16:47:06 +02:00
George Marques
75515e4303
Merge pull request #70987 from vonagam/fix-parameter-conversion-assign 2023-01-12 11:34:13 -03:00
George Marques
7319fa6082
Merge pull request #70713 from vonagam/fix-unnamed-enum-outer-conflicts 2023-01-12 11:22:01 -03:00
Dmitrii Maganov
0f184379de GDScript: Fix small inconsistencies with resolve_datatype 2023-01-12 15:52:55 +02:00
Rémi Verschelde
a5dedfe260
Merge pull request #70731 from smix8/navigationserver_performance_monitor_4.x
Add NavigationServer Performance Monitor
2023-01-12 10:36:18 +01:00
Rémi Verschelde
dd1b3ff089
Merge pull request #71224 from rsjtdrjgfuzkfg/openxr-opengl
OpenXR: Do not use SRGB swapchains with OpenGL
2023-01-12 09:07:46 +01:00
Rémi Verschelde
2fcd298f96
Merge pull request #71034 from rsjtdrjgfuzkfg/openxr-android-warning
OpenXR: Fix android loader extension detection
2023-01-12 00:56:51 +01:00
Rémi Verschelde
11449e1079
Merge pull request #71228 from vnen/gdscript-fix-nil-address-crash
GDScript: Fix temp values being written without proper clear
2023-01-12 00:53:26 +01:00
rsjtdrjgfuzkfg
a1a2c2c2ce etcpak: Fix ETCPAK_TYPE_ETC2_RA_AS_RG
This commit fixes texture compression via ETCPAK_TYPE_ETC2_RA_AS_RG,
switching to the right color channels and using the right compression
method. Textures imported with previous versions need to be re-imported
in order to render correctly.
2023-01-11 23:06:35 +01:00
George Marques
66fda2aeea
GDScript: Fix temp values being written without proper clear
Temporary values in the stack were not being properly cleared when the
return value of calls were discarded, which can cause memory issues
especially for reference types like PackedByteArray.
2023-01-11 14:24:23 -03:00
Yuri Sizov
f73cb4c13d
Merge pull request #71168 from guilleatm/master
Improve description of `GetNodeOrDefault` in C# API
2023-01-11 19:27:04 +03:00
rsjtdrjgfuzkfg
17a957e214 OpenXR: Do not use SRGB swapchains with OpenGL
This commit removes SRGB swapchain options for use with OpenGL, to avoid
the hardware doing an additional SRGB conversion and thus causing colors
to differ from other rendering paths.
2023-01-11 15:47:53 +01:00
Guillermo
6137929f52 Improve description of GetNodeOrDefault in C# API
Indenting with spaces and added a line break

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2023-01-11 15:02:08 +01:00
rsjtdrjgfuzkfg
b51acac638 OpenXR: Fix initialization warning on Android
This commit adds proper checking for XR_KHR_loader_init support and
fixes the warning regarding missing extensions on Android to only appear
if neither XR_KHR_loader_init nor XR_KHR_loader_init_android are
supported by the runtime.
2023-01-11 15:00:22 +01:00
Rémi Verschelde
62b023ecd3
Merge pull request #70167 from rsjtdrjgfuzkfg/pico
OpenXR: Add Pico controller profile
2023-01-11 09:49:16 +01:00
Rémi Verschelde
54688a7535
Merge pull request #71127 from reduz/drag-forward-to-callables
Change set_drag_forwarding() to use callables.
2023-01-11 01:14:58 +01:00
Rémi Verschelde
5eb161a9c8
Merge pull request #70595 from adamscott/add-gdscript-editorconfig
Add GDScript `.editorconfig` rules
2023-01-11 01:10:10 +01:00
George Marques
04d0e851ea
GDScript: Fix use of conversion assign for variant values 2023-01-10 20:01:11 -03:00
Adam Scott
44d1d72af1 Add GDScript .editorconfig rules
- Uniformize `.gd` unit test files indentation to tabs (where needed)
2023-01-10 12:25:35 -05:00
Juan Linietsky
e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Rémi Verschelde
c894edd4cb
Merge pull request #71140 from vonagam/fix-const-index-subscript-type
GDScript: Fix type for index subscript on constant
2023-01-10 07:58:29 +01:00
Dmitrii Maganov
ff505c9875 GDScript: Fix type for index subscript on constant 2023-01-10 07:10:00 +02:00
Adam Scott
fb175d92da Fix GDScript base and outer classes, signals and functions lookup order
- Add outer class lookup test
- Add signal lookup test

Co-authored-by: Dmitrii Maganov <vonagam@gmail.com>
2023-01-09 20:12:10 -05:00
Rémi Verschelde
d3fc9d9e41
Merge pull request #71051 from vonagam/consts-are-deep-start
GDScript: Begin making constants deep, not shallow or flat
2023-01-09 23:22:59 +01:00
Rémi Verschelde
509da86205
Merge pull request #69590 from anvilfolk/enums
GDScript enum fixes & refactor
2023-01-09 23:10:37 +01:00
Rémi Verschelde
4d4fcd0a6f
Merge pull request #70721 from Faless/mp/4.x_fix_relay_option
[MP] Fix server_relay being unsettable.
2023-01-09 23:09:53 +01:00
Fabio Alessandrelli
566c48f193 [MP] Convert _spawn_custom to a Callable property.
Renamed to "spawn_function".
Allow both custom spawn and auto spawn list to co-exist.

This makes it possible to implement custom spawn without being forced to
attach a script to MultiplayerSpawner directly.
2023-01-09 21:04:40 +01:00
ocean (they/them)
366ec895b1 Assorted enum and native type fixes 2023-01-09 11:08:07 -05:00
Rémi Verschelde
64f2b970d8
Merge pull request #71114 from reduz/cleanup-property-hints
Removed unused property hints and `Object::get_translatable_strings()`
2023-01-09 16:57:31 +01:00
Juan Linietsky
0e0a6bb39b
Removed unused property hints and Object::get_translatable_strings()
* Remove unused `EditorPropertyMember` and related hints, previouly used by
  VisualScript. Such logic should be implemented in the VS module itself.
* As the above broke compatibility with the VS module, clean up the other
  hacks that were still in core in support of VisualScript.
* `PROPERTY_USAGE_INTERNATIONALIZED` was only used in Object's
  `get_translatable_strings()`, which is a legacy function not used anywhere.
  So both are removed.
* Reordered some usage flags after the above removal to minimize the diff.
* General clean up.

Fixes #30203.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2023-01-09 16:56:01 +01:00
Raul Santos
59e8fc1edf
C#: Add [Flags] attribute to core bitfield enums 2023-01-09 16:13:28 +01:00
Rémi Verschelde
df952a32f8
Merge pull request #71107 from vnen/gdscript-fix-nil-address-assign
GDScript: Don't use the NIL address to hold return value of functions
2023-01-09 14:22:16 +01:00
Rémi Verschelde
c2f7c2d31a
Merge pull request #70655 from vonagam/fix-assert-multiline
GDScript: Fix multiline and trailing comma for assert
2023-01-09 14:19:37 +01:00
George Marques
a1309f1f42
GDScript: Allow using await on calls to void functions 2023-01-09 09:55:05 -03:00
George Marques
a3816434a6
GDScript: Don't use the NIL address to hold return value of functions
This prevents that the NIL address is filled with another value, which
causes problems for some instructions that read from NIL.
2023-01-09 09:20:18 -03:00
Rémi Verschelde
b6be2ac621
Merge pull request #71028 from adamscott/make-gdscript-clear-less-prone-to-heap-use-after-free
Resolve `GDScript::clear()` `heap-use-after-free` ASAN errors
2023-01-09 09:22:39 +01:00
Rémi Verschelde
6a86dfad29
Fix typos with codespell
Also includes #71080.

Co-authored-by: Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
2023-01-09 08:39:07 +01:00
smix8
9802914f97 Add NavigationServer Performance Monitor
Adds Performance Monitor for NavigationServer3D.
2023-01-08 22:58:21 +01:00
Rémi Verschelde
378d589e2d
Merge pull request #71037 from reduz/array-format-bitfield
Use BitField<> hint for Mesh.ArrayFormat and Control.SizeFlags
2023-01-08 22:51:03 +01:00
Rémi Verschelde
c3c5eceb35
Merge pull request #70463 from DarkKilauea/nav-server-const
[4.x] Rework const on NavigationServer methods
2023-01-08 22:50:05 +01:00
Adam Scott
c45b9245ae Fix parse error using Vector{2,3,4}.INF 2023-01-08 16:14:40 -05:00
Dmitrii Maganov
71f7c8a9d3 GDScript: Fix multiline and trailing comma for assert 2023-01-08 20:18:46 +02:00
Juan Linietsky
47592927b3 Use BitField<> hint for ArrayFormat
This was missing in the conversion of bitflags to BitField<>.
2023-01-08 18:47:48 +01:00
Dmitrii Maganov
5e2ac1a31e GDScript: Begin making constants deep, not shallow or flat 2023-01-08 07:29:10 +02:00
jordi
d5e1b4a857 Force double quotes for NodePaths with apostrophes 2023-01-07 20:23:26 -06:00
Josh Jones
a0715b30f9 Rework const on NavigationServer methods
`const` is used on all methods, even when they cause modification of the server.  This reworks the methods of the server to only use `const` on method that don't change the state of the server.
2023-01-07 17:29:00 -08:00
Adam Scott
d22199990e Resolve GDScript::clear() heap-use-after-free ASAN errors 2023-01-07 11:51:36 -05:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
SaracenOne
f5edeb8f58 Disable navmesh, lightmap, and VoxelGI generation on foreign data 2023-01-06 08:39:27 -08:00
Dmitrii Maganov
532ffc30bd GDScript: Fix typing of lambda functions 2023-01-06 16:38:22 +02:00
rsjtdrjgfuzkfg
e6370a45d8 OpenXR: Add preliminary Pico controller profile
This commit adds the Pico controller used in the Pico 4 as implemented
in current versions of the OpenXR runtime on the device itself. Note
that the extension and paths used in this commit might become obsolete
once there is official support for the Pico 4 in the OpenXR standard.
2023-01-06 14:02:41 +01:00
Dmitrii Maganov
a8c2f8a0e1 GDScript: Fix missing conversion for default argument values 2023-01-06 11:49:06 +02:00
Rémi Verschelde
e1ce89ab4c
Merge pull request #70919 from Geometror/test-fastnoise-lite
Add tests for FastNoiseLite/NoiseTexture
2023-01-06 08:08:56 +01:00
Dmitrii Maganov
10e364bf43 GDScript: Fix array as default value for parameter 2023-01-06 06:25:55 +02:00
Hendrik Brucker
ffb8c74f26 Add tests for FastNoiseLite/NoiseTexture
+ fix some issues with seamless noise generation
2023-01-06 02:46:08 +01:00
Rémi Verschelde
95ce236b7d
Merge pull request #70464 from vonagam/unify-assignables
Unify typing of variables, constants and parameters in GDScript
2023-01-06 00:34:10 +01:00