Commit graph

8093 commits

Author SHA1 Message Date
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
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
Rémi Verschelde
e5f6e03490
Merge pull request #70547 from TokageItLab/pingpong-wrap
Fix pingpong-loop with `loop_wrap` is not working & clean-up cubic interpolation key retrieve process
2023-01-06 00:10:18 +01:00
Dmitrii Maganov
a1d06749f1 Unify typing of variables, constants and parameters in GDScript 2023-01-06 01:10:04 +02:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
Rémi Verschelde
fc4a734373
Merge pull request #70838 from reduz/gdscript-vm-optimization
Optimizations for GDScript VM
2023-01-05 12:57:31 +01:00
Rémi Verschelde
5dfefc6517
Merge pull request #70694 from BastiaanOlij/change_openxr_extensions
Various improvements to OpenXR extension wrappers
2023-01-05 12:51:18 +01:00
Rémi Verschelde
dc3175e4cd
Merge pull request #70810 from adamscott/cache-gdscript-even-when-error
Cache script when reloading even if there's errors
2023-01-04 11:41:11 +01:00
Bastiaan Olij
b6550c46ee Removed member variables from OpenXRExtensionWrapper
Made extension container in OpenXRAPI static
Moved controller meta data into extensions where applicable
2023-01-04 11:34:58 +11:00
Rémi Verschelde
8203e09330
Merge pull request #70859 from vonagam/fix-preload-native-type
GDScript: Fix wrong native type for preloaded class
2023-01-03 23:22:23 +01:00
Rémi Verschelde
26bed8aa85
Merge pull request #70875 from MewPurPur/stop-highlighting-invalid-node-refs
Stop NodeRef highlighting if you start with a number
2023-01-03 16:17:13 +01:00
VolTer
52cfd4551d Stop highlighting node refs if they are invalid identifiers 2023-01-03 16:00:16 +02:00
Rémi Verschelde
96f12040c9
Merge pull request #70850 from bruvzg/ts_tsafe_free
[TextServer] Make `free` calls thread safe.
2023-01-03 13:53:58 +01:00
Rémi Verschelde
ccc609d824
Merge pull request #70811 from jamesmintram/jamesm/bugfix/gltf-import-fix-stale-node-ref
Update stale node ref after replace_by in GLTF importer
2023-01-03 12:33:53 +01:00
Rémi Verschelde
4e360ac612
Merge pull request #70702 from vnen/gdscript-error-on-assign-void
GDScript: Error when assigning return value of void function
2023-01-03 12:23:00 +01:00
Rémi Verschelde
1b634c06d0
Merge pull request #69972 from adamscott/add-server-checks-before-free
Add safety-checks before some servers `free()`
2023-01-03 12:22:24 +01:00
Rémi Verschelde
e4c1103af4
Merge pull request #70656 from vonagam/fix-void-returns
GDScript: Disallow return with value in void functions
2023-01-03 12:20:33 +01:00
Rémi Verschelde
a797fa3b3d
Merge pull request #70503 from rune-scape/inner-class-docs
Inner classes get their docs back
2023-01-03 12:15:44 +01:00
huangjiamin
dbdcc8e968 Fix for navmesh baking. Error message: Condition “!shapes.has(p_owner)” is true 2023-01-03 19:13:32 +08:00
Dmitrii Maganov
961b4ac5f5 GDScript: Fix wrong native type for preloaded class 2023-01-03 05:45:06 +02:00
Juan Linietsky
7211e041df Optimizations for GDScript VM
* Removed instruction argument count and instruction prefetching. This is now done on the fly. Reduces jumps.
* OPCODE_DISPATCH now goes directly to the next instruction, like in Godot 3.x.

I have nothing I can use to test performance, so if anyone wants to lend a hand and compare with master (both on debug and release), it would be very welcome.
2023-01-02 23:44:19 +01:00
bruvzg
a28e8f0c8d
[TextServer] Make free calls thread safe. 2023-01-02 21:59:05 +02:00
James Mintram
897de50d71 Update stale node ref after replace_by in GLTF importer 2023-01-01 20:14:33 +00:00
Adam Scott
c3f12592da Cache script when reloading even if there's errors. 2023-01-01 14:09:17 -05:00
George Marques
8a98110e3e
Merge pull request #62688 from cdemirer/assignments-and-types
Fixes https://github.com/godotengine/godot/issues/62650
2022-12-30 16:38:35 -03:00
George Marques
bc739a4687
GDScript: Make using return of void function an error
Remove the `VOID_ASSIGNMENT` warning since those cases will be errors
now.
2022-12-30 13:35:38 -03:00
George Marques
33afa82fb0
Merge pull request #70613 from vonagam/fix-enum-as-constant
Fixes https://github.com/godotengine/godot/issues/54018
Fixes https://github.com/godotengine/godot/issues/70213
Fixes https://github.com/godotengine/godot/issues/70495
2022-12-30 12:10:50 -03:00
George Marques
0c15844551
GDScript: Error when assigning return value of void function
This also makes built-in method calls empty the return value when the
method is void, to avoid keeping returning a garbage value in such case.
2022-12-30 12:08:58 -03:00
Ignacio Roldán Etcheverry
0daa86d70e
Merge pull request #70511 from raulsntos/dotnet/fix-update-script-class-info
C#: Skip getting class info for unbound generics
2022-12-30 01:29:53 +01:00
Fabio Alessandrelli
d123b01e86 [MP] Fix server_relay being unsettable.
Clarify nuance in the docs.
2022-12-29 23:15:26 +01:00
Adam Scott
ea33001b95 Add safety-checks before some servers free() 2022-12-29 16:23:38 -05:00
Dmitrii Maganov
056066ee95 GDScript: Fix false name conflicts for unnamed enums 2022-12-29 22:04:13 +02:00
Dmitrii Maganov
9507f65e25 GDScript: Disallow return with value in void functions 2022-12-29 03:06:13 +02:00
Raul Santos
a43e8285a7
C#: Avoid generic types in the script path attribute generator
- Avoid generic types in `ScriptPathAttributeGenerator`, this
means they won't be added to the `[AssemblyHasScripts]` attribute
and a `[ScriptPath]` attribute won't be added to the class.
Since generic classes can't be used as scripts they shouldn't use
those attributes, this also makes CSharpScript consider those types
invalid since they won't be added to the script/type map.
- Avoid generic types in `ScriptManagerBridge.LookupScriptsInAssembly`.
- Set `outMethodsDest` in `ScriptManagerBridge.UpdateScriptClassInfo`.
2022-12-28 23:20:02 +01:00
Dmitrii Maganov
b6aa4840d8 Fix usage of Enum as constant 2022-12-28 23:04:40 +02:00
Dmitrii Maganov
f67aa3e46d GDScript: Fix return type of constructor call for extending class 2022-12-27 23:02:12 +02:00
cdemirer
bbb21c3fd5 Fix type adjustment skipped when value is considered both not hard and not variant 2022-12-25 17:11:30 +03:00
Silc Renew
8745c206c4 Fix pingpong with loop wrap is not working 2022-12-25 18:16:38 +09:00
Ekaterina Vaartis
60692b4e45 Implement export_multiline support for Array[String] and Dictionary
For arrays, specifically check if it's a string array and pass the
type on to the editor. For dictionaries, save the hint on the type and
use it later to draw the multiline editor, except for when adding a
string key, because that doesn't make much sense. All string values
however will be drawn as multiline.
2022-12-25 01:46:57 +03:00
Ignacio Roldán Etcheverry
f382a2b59b
Merge pull request #70509 from irwiss/reverse-Vector2.AngleToPoint
C#: reverse Vector2.AngleToPoint
2022-12-24 17:22:50 +01:00
Alexey Kim
e9ace71c88 C#: reverse Vector2.AngleToPoint 2022-12-24 04:18:53 +02:00
rune-scape
1b77993257 Inner classes get their docs back 2022-12-23 17:39:24 -05:00
Ignacio Roldán Etcheverry
dfac8bb407 C#: Fix leak in Span to Variant conversions 2022-12-23 21:37:28 +01:00
Ignacio Roldán Etcheverry
5784bf1be0
Merge pull request #70486 from raulsntos/dotnet/convert-to
C#: Rename `ConvertToX` methods
2022-12-23 21:15:24 +01:00
Raul Santos
24e4ac9167
C#: Rename ConvertToX methods
- Renamed `ConvertToX` to `ConvertToNativeX`.
- Renamed `ConvertToXObject` to `ConvertToX`.
- Renamed `ConvertToXManaged` to `ConvertToX`.
- Fix `Signal` name in bindings generator and csharp script.
2022-12-23 19:40:32 +01:00
Raul Santos
03c26d6618
C#: Disallow init-only properties
ReadOnly properties are currently not allowed because the generated code
needs to set them, this also apply to `init` properties because they
need to be set after initialization.
2022-12-23 19:04:14 +01:00
Rémi Verschelde
d0398f62f0
Revert "pcre2: Update to upstream version 10.42"
This reverts commit 62c3e4ab9c.

Needs more work, see comments about `_regex_free` errors in #70447.
2022-12-23 11:29:11 +01:00
Rémi Verschelde
ae4c025da9
Merge pull request #69991 from rune-scape/cast-type
GDScript: Fix cast producing null
2022-12-23 09:22:21 +01:00
Rémi Verschelde
edfa1e8665
Merge pull request #70220 from adamscott/fix-external-enum
Fix external enums not assignable as constants
2022-12-23 09:20:50 +01:00
Rémi Verschelde
62c3e4ab9c
pcre2: Update to upstream version 10.42
Changelog: https://github.com/PCRE2Project/pcre2/blob/pcre2-10.42/ChangeLog

This should also fix support for RISC-V architectures, at least in the sljit
library.
2022-12-22 16:34:29 +01:00
Rémi Verschelde
e1657bd2a7
Merge pull request #70440 from rune-scape/null-again
Fix GDScript analyzer null literal
2022-12-22 16:02:19 +01:00
Rémi Verschelde
801ef6614d
Merge pull request #70138 from anvilfolk/signals
Add MethodInfo to signal datatype
2022-12-22 16:02:11 +01:00
rune-scape
3228fdb88a Fix GDScript analyzer null literal 2022-12-22 06:02:34 -05:00
Yuri Rubinsky
abaedb54f1 Remove unused code paragraph from gdscript_editor.cpp/complete_code 2022-12-22 11:10:11 +03:00
ocean (they/them)
d93dbab054 Add MethodInfo to signal datatype 2022-12-21 22:49:51 -05:00
Rémi Verschelde
d553dca62a
Merge pull request #70391 from TyounanMOTI/fix-basis-universal-transcode
Fix Basis Universal format texture rendering failure
2022-12-21 22:23:56 +01:00
Rémi Verschelde
5ad02aa08d
Merge pull request #67111 from DarkKilauea/nav-queries-link
Added signal to NavigationAgent when entering a link
2022-12-21 19:38:20 +01:00
Hirotoshi Yoshitaka
d144e278ac Fix Basis Universal format texture rendering failure
Fix "failed! on level 0" error message on exported projects with Basis Universal textures.
2022-12-21 17:29:38 +09:00
Rémi Verschelde
63f95c0e58
Merge pull request #70366 from quentinguidee/refactoring/fix-double-get-singleton
Fix double get_singleton()
2022-12-21 09:27:02 +01:00
Rémi Verschelde
6b4a01f99a
Merge pull request #69351 from smix8/gridmap_item_navigation_layers_4.x
Change GridMap navigation_layers to per mesh_library item
2022-12-21 09:21:21 +01:00
Rémi Verschelde
2becec34cd
Merge pull request #70331 from anvilfolk/run-weird
Unify GDScriptAnalyzer in-editor and runtime autoload checks
2022-12-21 09:20:56 +01:00
Rémi Verschelde
f04f53201d
Merge pull request #70317 from HolonProduction/svg_assets
Add support for svg images in the asset lib.
2022-12-21 09:19:14 +01:00
ocean (they/them)
fb418685a0 Unify GDScriptAnalyzer in-editor and runtime autoload checks 2022-12-20 19:01:28 -05:00
smix8
61f33e205c Change GridMap navigation_layers to be per mesh_library item
Changes GridMap navigation_layers from a single bitmask for the entire GridMap to a bitmask for each item used in the mesh_library with a baked navmesh.
2022-12-20 20:51:32 +01:00
Quentin Guidée
d9c05f7fbd
Fix double get_singleton()
Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com>
2022-12-20 14:26:15 -05:00
HolonProduction
66fa776667 Add support for svg images in the asset lib.
Pixel based image formats are identified by magic numbers. This is not possible with svg therefore svg parsing is tried and if it succeeded the result is used.

WebP and bmp support is added as well. But I could not test it as I am not able to run a local instance of the asset lib and there is no asset using those formats.
2022-12-20 15:41:17 +01:00
Rémi Verschelde
4f95912d8a
Merge pull request #70108 from akien-mga/embree-arm64-flax-vector-conversions
embree: Build on ARM64 with -flax-vector-conversions
2022-12-20 10:33:32 +01:00
Rémi Verschelde
2521c2e0e4
Merge pull request #70309 from smix8/gridmap_collision_priority_4.x
Add GridMap collision_priority
2022-12-20 10:33:23 +01:00
Rémi Verschelde
f1f6b35b8c
Merge pull request #70244 from DarkKilauea/nav-fix-abbrev-compat
[4.x] Fix typo and ensure backwards compatibility for changed property names
2022-12-20 10:32:26 +01:00
Rémi Verschelde
b5a8055b5c
embree: Fix Linux ARM64 build with -flax-vector-conversions
This is a change done upstream in the `devel3` branch for 3.13.6:
82ca6b5ccb

They also seem to define it for macOS, but for us it breaks the build...
¯\_(ツ)_/¯

Also change wrong use of CPPFLAGS (pre-processor) where CXXFLAGS (C++)
makes more sense.
2022-12-20 10:10:30 +01:00