Commit graph

8489 commits

Author SHA1 Message Date
Rémi Verschelde
204be35fc1
Merge pull request #73322 from fire/basisu-compress-black
For basisu avoid inserting to the image array twice.
2023-02-15 09:50:12 +01:00
Silc Renew
4970c27ff5 Fix gltf import generate_scene() option 2023-02-15 17:43:34 +09:00
K. S. Ernest (iFire) Lee
28a340bf3b For basisu avoid inserting to the image array twice.
Basisu images were getting referenced incorrectly like set black or set as not transparent.
2023-02-14 17:22:36 -08:00
Danil Alexeev
8d3e682f52
GDScript: Fix default value of exported enum variable 2023-02-14 18:07:50 +03:00
Dmitrii Maganov
df6aae2eca GDScript: Fix missing unsafety mark for binary op with weak variables 2023-02-14 17:01:21 +02:00
Rémi Verschelde
f9b043aad7
Merge pull request #73281 from Mickeon/doc-misc-oops
Slightly tweak `@GlobalScope` & `GDScript`'s documentation
2023-02-14 13:37:43 +01:00
Micky
436bbfebe2 Tweak @GlobalScope & GDScript's documentation 2023-02-14 13:26:18 +01:00
Fabio Alessandrelli
02dcf40162
Merge pull request #73216 from baptr/multiplayer
Fix multiplayer replication crash in on_sync_receive.
2023-02-14 13:18:19 +01:00
baptr
2eadbe7b78 Fix multiplayer replication crash in on_sync_receive.
A number of early continue cases applied the packet-provided `size`
without validation, allowing large uint32_t values to be treated as
negative offsets and leading to segfaults.

Now, we validate `size` against the buffer length immediately to avoid a
crash.

This could be triggered by receiving sync data for a synchronizer who's
root node had just been removed, since the code path that checked for
unusable sync state failed to advance the offset. Thus the next read
could interpret part of the payload as such an invalid `size`.

Now, we properly advance the read offset in that case (and raise a
better error).
2023-02-14 02:46:32 -08:00
Rémi Verschelde
1fcee45ae5
Merge pull request #73252 from smix8/navigationserver_improve_rid_not_found_error_4.x
Improve NavigationServer.free() error msg when RID not found
2023-02-14 11:04:40 +01:00
Rémi Verschelde
4848877b80
Merge pull request #72659 from Calinou/doc-rendering-method-support
Document unsupported features in Mobile and Compatibility rendering methods
2023-02-13 23:45:12 +01:00
smix8
b51cab3411 Improve NavigationServer.free() error msg when RID not found
Improves the error msg when NavigationServer.free() does not find the RID e.g. because it was already deleted or did never exist in the first place.
2023-02-13 23:44:05 +01:00
Rémi Verschelde
02a9a31b1b
Merge pull request #73244 from vonagam/fix-int-in-float-typed-array
GDScript: Fix usage of ints with typed array of floats
2023-02-13 23:43:09 +01:00
Hugo Locurcio
42b7739321
Document unsupported features in Mobile and Compatibility rendering methods 2023-02-13 22:17:02 +01:00
Dmitrii Maganov
9cb2da89d6 GDScript: Fix usage of ints with typed array of floats 2023-02-13 22:06:38 +02:00
DESKTOP-9O27V4U\Navi
ac92704f39
Add compatibility code for CSGBox3D width/height/depth from Godot 3.x
Fixes #66420.
2023-02-13 20:41:23 +01:00
Rémi Verschelde
d405392847
Revert "Fixed the jumping to function definition using 'Ctrl+LMB'."
This reverts commit 7eb6367d5c.

Fixes #73058.
Fixes #73167.

This caused regressions, we'll retry with fixes for 4.1.
2023-02-13 17:58:59 +01:00
Haoyu Qiu
84aee17901 Improvements and fixes based on Weblate comments
* Description of `ui_text_submit` action should be "Submit Text" instead of "Text Submitted".
* Spell out "Animation" instead of using "Anim.".
* Treat "Max" as regular word instead of writing "Max.".
* Use generic "Set %s" for action name instead of a dedicated "Set target_position".
* Add translator comment for:
    * "Inclusive" and "Self" in the profiler.
    * Places where it needs the context about being an editor progress label.
    * "Duplicated Animation Name" since it's refering to the new name of a duplicated animation.
    * Disambiguation of "View Plane Transform", "Paste Selects" and "Display Normal".
* Fix wrong undo action name for renaming an input action.
* Fix missing end quote in a shader error message.
* In class reference:
    * Fix duplicated "if" in the description of `signf()`.
    * Fix mismatched example output in `String.operator %()`.
    * Fix typo in the description of `Decal.texture_emission`.
    * Unify description of `String.match()` and `StringName.match()`.
2023-02-13 15:22:18 +08:00
Rémi Verschelde
49e8a2fb66
Merge pull request #73026 from SirUppyPancakes/sync-context-send
Implement GodotSynchronizationContext.Send
2023-02-12 22:34:18 +01:00
Rémi Verschelde
34cc5fc03f
Merge pull request #54034 from pkowal1982/fix_53878
Improve GDScript error for method call on null/previously freed instance
2023-02-12 22:33:49 +01:00
Caleb Kemper
103cb4bee6 Implement GodotSynchronizationContext.Send 2023-02-12 14:12:09 -07:00
pkowal
be4d8a7b2e
Improve GDScript error for method call on null/previously freed instance
Fixes #53878.
2023-02-12 21:52:05 +01:00
Fabio Alessandrelli
a77820ade0 [MP] Fix MultiplayerSpawner not connecting to child_entered_tree.
The connection used to happen during enter_tree, but this was causing
issues when setting the spawnable scenes from code.

The spawner now connects/disconnects to the signal during
add_spawnable_scene/clear_spawnable_scenes if the node is inside tree
and has a valid spawn_path.
2023-02-12 15:32:09 +01:00
Rémi Verschelde
cb2e73d578
Merge pull request #73033 from akien-mga/gdscript-fix-gd4-renames-build
Clean up ProjectConverter3To4 architecture, move renames map to separate file
2023-02-11 22:05:38 +01:00
Rémi Verschelde
5a79d55560
Merge pull request #73015 from raulsntos/dotnet/build-csproj
Build C# csproj instead of the solution
2023-02-11 15:35:32 +01:00
Rémi Verschelde
532381562e
Merge pull request #72654 from RandomShaper/ptrcall_ret_raw_obj
Avoid losing references to objects in the native-scripting boundary
2023-02-11 15:35:01 +01:00
Rémi Verschelde
7725a1a14c
Merge pull request #73068 from dsnopek/webxr-bounds-geometry-bug
Fix byte packing (and buffer overrun) in godot_webxr_get_bounds_geometry()
2023-02-11 14:35:29 +01:00
David Snopek
9e4d80e08e Fix byte packing (and buffer overrun) in godot_webxr_get_bounds_geometry() 2023-02-10 19:33:18 -06:00
Rémi Verschelde
ac68330130
Merge pull request #72045 from DeeJayLSP/update_libwebp
libwebp: Sync with upstream 1.3.0
2023-02-10 18:44:23 +01:00
Rémi Verschelde
e19e6b09b9
Clean up ProjectConverter3To4 architecture, move renames map to separate file
This allows properly limiting what features depend on the RegEx module
(doing the actual conversion) and what features only require the renames
data (GDScript suggestions).

Also better excludes the conversion command line options when actually
disabling deprecated code.

Fixes #73029.
2023-02-10 14:35:22 +01:00
Danil Alexeev
220898a69f
GDScript: Remove treat_warnings_as_errors project setting 2023-02-10 10:16:33 +03:00
Raul Santos
2a1523d751
Build C# csproj instead of the solution 2023-02-10 03:19:30 +01:00
Rémi Verschelde
dc7f08b556
Merge pull request #72971 from vnen/gdscript-multiline-comment
GDScript: Allow strings as multiline comments
2023-02-09 16:19:03 +01:00
Rémi Verschelde
6fca54a81b
Merge pull request #72975 from vnen/gdscript-no-ascii-spoof-check
GDScript: Be more lenient with identifiers
2023-02-09 16:12:09 +01:00
George Marques
03ea77407c
GDScript: Be more lenient with identifiers
- Allow identifiers similar to keywords if they are in ASCII range.
- Allow constants to be treated as regular identifiers.
- Allow keywords that can be used as identifiers in expressions.
2023-02-09 11:19:05 -03:00
George Marques
f95967c299
GDScript: Allow strings as multiline comments
Bring back the behavior in 3.x that was left out by oversight.
2023-02-09 10:16:00 -03:00
Rémi Verschelde
b12bf7ff02
Merge pull request #69550 from Rindbee/fix-script-editor-not-reload-via-lsp
Fix internal editor not updating when using external editor via LSP
2023-02-09 14:01:33 +01:00
Haoyu Qiu
a40ccc2d7e Improve some editor strings for localization 2023-02-09 19:32:02 +08:00
Dmitrii Maganov
cedc5fa823 GDScript: Fix error about enum typed arrays 2023-02-09 00:31:40 +02:00
kobewi
e822182bb7 Fix null message in assert() 2023-02-08 20:19:24 +01:00
Rémi Verschelde
1429ff6c4f
Merge pull request #72700 from fire/gltf-export-animation
Fixes to the GLTF export with baking and null checks.
2023-02-08 09:33:46 +01:00
Rémi Verschelde
b53c4dda62
Merge pull request #72849 from RedworkDE/net-export-settings
C#: Rename export settings `mono` -> `dotnet` and remove unused AOT settings
2023-02-08 09:32:41 +01:00
George Marques
34f0a2ca46
GDScript: Add limit to call depth
The hard limit is set at 2048 depth which seems sensible between
legitimate recursive calls while still avoiding a crash because of a
stack overflow in most of the cases.

Note that it is still possible to reach the stack limit and get an
overflow before reaching a call depth. This is intended as a half-way
measure to stop crashing in most cases, since there's no reliable nor
portable way to check the amount of stack memory left.
2023-02-07 17:09:40 -03:00
K. S. Ernest (iFire) Lee
dbc1e94695 Fixes for gltf export.
* Fix null crashes.
* Bake tracks
* Add some error messages.
2023-02-07 11:57:25 -08:00
Rémi Verschelde
bd267c911b
Merge pull request #72493 from dalexeev/gds-export-flags
GDScript: Improve validation and documentation of `@export_flags`
2023-02-07 19:38:21 +01:00
Rémi Verschelde
3f95b39cb3
Merge pull request #72789 from Vilcrow/fix-jump-to-definition
Fixed the jumping to function definition using 'Ctrl+LMB'.
2023-02-07 19:37:50 +01:00
Rémi Verschelde
8be4feec04
Merge pull request #72061 from paulloz/csharp/better-logs-management
C#: MSBuild logs and panel enhancements
2023-02-07 19:37:43 +01:00
RedworkDE
bf47b62203 C#: Rename export settings mono -> dotnet and remove unused AOT settings 2023-02-07 18:20:23 +01:00
Danil Alexeev
c8e3d8b5d5
GDScript: Improve validation and documentation of @export_flags 2023-02-07 19:32:08 +03:00
Paul Joannon
c70c82b0fb
Try and match MSBuild and Godot UI languages 2023-02-07 16:48:23 +01:00
Paul Joannon
9bf2a0bcda
Add new settings about MSBuild
- toggle creation of binary logs
- manage log verbosity
- toggle logging in console
2023-02-07 16:48:23 +01:00
Paul Joannon
7cf42dbdee
Add button to open the msbuild logs folder 2023-02-07 16:48:23 +01:00
Paul Joannon
e51a20b714
Rename existing editor settings mono -> dotnet 2023-02-07 16:48:18 +01:00
Markus Sauermann
826e54fa73 Some code simplifications
1. `number_width` isn't used later
2. `return_type` is used only once
3. AudioServer::get_singleton()->get_channel_count() always returns a channel_count of 1 or larger
4. negative `aa->backward` conditional
5. `current_canvas` == `find_world_2d()->get_canvas()`
6. identical if `render_shadows`
2023-02-07 14:30:16 +01:00
Adam Scott
0fef203b1f
Remove script class checks when getting function signature 2023-02-07 11:48:10 +01:00
S.V.I. Vilcrow
7eb6367d5c Fixed the jumping to function definition using 'Ctrl+LMB'. 2023-02-07 05:29:48 +03:00
Rémi Verschelde
6e2b9b3bdc
Merge pull request #72802 from RedMser/blender-rpc-error-handling
Better error handling for Blender RPC import
2023-02-06 22:45:18 +01:00
Yuri Sizov
945207885b
Merge pull request #72546 from vonagam/fix-typed-array-can-reference
GDScript: Fix can_reference check for typed arrays
2023-02-06 23:32:47 +03:00
Yuri Sizov
c0edea37ef
Merge pull request #72677 from dalexeev/gds-await-infer-type
GDScript: Fix `await` type inference
2023-02-06 23:32:28 +03:00
Yuri Sizov
7b86a082be
Merge pull request #72804 from vnen/gdscript-no-onready-without-node
GDScript: Fix inheritance check of @onready for inner classes
2023-02-06 23:03:44 +03:00
Danil Alexeev
685db28e29
GDScript: Fix await type inference 2023-02-06 23:02:14 +03:00
Yuri Sizov
9d16250353
Merge pull request #70002 from poohcom1/fix/static-subscript-autocomplete
Fix code-completion suggesting non-static members for custom classes
2023-02-06 23:02:12 +03:00
Yuri Sizov
de4369ca4b
Merge pull request #72708 from KoBeWi/PackedMultilineStringArray
Fix @export_multiline for PackedStringArray
2023-02-06 23:01:16 +03:00
Dmitrii Maganov
8400308ab3 GDScript: Fix can_reference check for typed arrays 2023-02-06 22:00:16 +02:00
George Marques
ed5ddab7e5
GDScript: Fix inheritance check of @onready for inner classes 2023-02-06 14:52:13 -03:00
RedMser
8f099c7de3 Better error handling for Blender RPC import
- If RPC import fails, then try a direct import as well. While it's
 slower, it may be better than failing the import completely.
- Connection errors will disable RPC automatically, to avoid having to
wait the full 30 seconds timeout each time.
  This should be properly fixed by allowing to override the timeout
per HTTPClient.
2023-02-06 18:23:20 +01:00
Rémi Verschelde
2fdaf2919c
GDScript: Fix recently merged test not ignoring warnings 2023-02-06 18:19:34 +01:00
Rémi Verschelde
eee343210d
Merge pull request #72330 from MinusKube/unreachable_code_bug
Fix unreachable code warning for elif block
2023-02-06 17:49:37 +01:00
Rémi Verschelde
f5a8c58684
Merge pull request #72628 from lyuma/gltf-reimport-appending
Use reimport_append api for importing embedded gltf images
2023-02-06 17:48:28 +01:00
Yuri Sizov
d201df1ffa
Merge pull request #72512 from vonagam/fix-ternary-type-source
GDScript: Fix type certainty for result of ternary operator
2023-02-06 19:41:27 +03:00
Lyuma
5fbcb80170 Use reimport_append api for importing embedded gltf images
Co-authored-by: K. S. Ernest (iFire) Lee <ernest.lee@chibifire.com>
2023-02-06 07:11:45 -08:00
Rémi Verschelde
8a37fad281
Merge pull request #72794 from vnen/gdscript-no-onready-without-node
GDScript: Don't allow @onready without inheriting Node
2023-02-06 15:41:02 +01:00
Rémi Verschelde
332a1d8ee5
Merge pull request #72774 from bruvzg/spoof_load
[TextServer] Preload USpoofChecker to speed up GDScript parsing.
2023-02-06 15:40:39 +01:00
Rémi Verschelde
9ad098f653
Merge pull request #72276 from dalexeev/gds-rpc-annot
GDScript: Better handling of `@rpc` annotation and autocompletion
2023-02-06 15:39:25 +01:00
Rémi Verschelde
f50f968b83
Merge pull request #72709 from RedworkDE/net-basedirectory-whoops
C#: Fix AppContext.BaseDirectory
2023-02-06 15:39:02 +01:00
George Marques
3941af3d91
GDScript: Don't allow @onready without inheriting Node 2023-02-06 10:45:38 -03:00
bruvzg
c588923433
[TextServer] Preload USpoofChecker to speed up GDScript parsing. 2023-02-05 23:31:54 +02:00
Danil Alexeev
31749de128
GDScript: Better handling of @rpc annotation and autocompletion 2023-02-05 21:21:37 +03:00
Yuri Sizov
13f0158e49
Merge pull request #72608 from vnen/gdscript-warning-default-error
GDScript: Add warnings that are set to error by default (take 2)
2023-02-05 16:00:26 +03:00
kobewi
2b71ede967 Fix @export_multiline for PackedStringArray 2023-02-04 17:06:58 +01:00
Yuri Sizov
8753b07b05
Merge pull request #71860 from GeroVeni/master
Improve docs for rpc annotations
2023-02-04 18:43:15 +03:00
RedworkDE
fb0adaff9f C#: Fix AppContext.BaseDirectory 2023-02-04 14:35:11 +01:00
GeroVeni
54f2226ce5 Improve docs for rpc annotations 2023-02-04 13:28:41 +00:00
Rémi Verschelde
bbff9fd7a4
Merge pull request #71786 from raulsntos/dotnet/array
Sync C# Array with Core
2023-02-04 00:24:06 +01:00
Pedro J. Estébanez
0bcc7bb5c7 Avoid losing references to objects in the native-scripting boundary 2023-02-03 17:48:41 +01:00
Rémi Verschelde
604493eb6e
Merge pull request #65910 from KoBeWi/gdsus
Cleanup function state connections when destroying instance
2023-02-03 16:13:06 +01:00
Rémi Verschelde
1ff2204cfe
Merge pull request #72554 from RedworkDE/net-appcontext-basedirectory
C#: Set AppContext.BaseDirectory for editor builds
2023-02-03 15:35:29 +01:00
Rémi Verschelde
5a413894fc
Merge pull request #72635 from RedworkDE/net-nodepath-iequatable
C#: Implement `IEquatable<>` and equality operators in `NodePath`
2023-02-03 15:35:22 +01:00
Rémi Verschelde
91dfd6484b
Merge pull request #72633 from RedworkDE/net-stringname-iequatable
C#: Declare `IEquatable<>` interface for `StringName`
2023-02-03 15:35:16 +01:00
Rémi Verschelde
8ef01ee5df
Merge pull request #72604 from rbessems/rbessems/env_blend_mode
Add XR Environment Blend Mode Support
2023-02-03 06:24:30 +01:00
RedworkDE
ac96af1cc9 C#: Declare IEquatable<> interface for StringName 2023-02-03 00:26:18 +01:00
RedworkDE
7403a3a11b C#: Implement IEquatable<> and equality operators in NodePath
- Implement `IEquatable<>` interface.
- Implement `==` and `!=` operators.
- Override `Equals` and `GetHashCode`.
2023-02-03 00:25:48 +01:00
Ron Bessems
d7d171c45c Add XR Environment Blend Mode Support 2023-02-02 12:18:42 -05:00
Rémi Verschelde
a43ec333c4
Merge pull request #72398 from vnen/gdscript-setter-chain
GDScript: Improve usability of setter chains
2023-02-02 16:28:07 +01:00
George Marques
273bf7210f
GDScript: Add warnings that are set to error by default
- Adds a list of default levels for all warning so they can be set
  individually.
- Add warnings set by default to error for:
  - Using `get_node()` without `@onready`.
  - Using `@onready` together with `@export`.
  - Inferring a static type with a Variant value.
  - Overriding a native engine method.
- Adjust how annotations to ignore warnings are treated so they also
  apply to method parameters.
- Clean up a bit how ignored warnings are set. There were two sets but
  only one was actually being used.
- Set all warnings to the `WARN` level for tests, so they they can be
  properly tested.
- Fix enum types in native methods signatures being set to `int`.
- Fix native enums being treated as Dictionary by mistake.
- Make name of native enum types use the class they are defined in, not
  the direct super class of the script. This ensures they are always
  equal even when coming from different sources.
- Fix error for signature mismatch that was only showing the first
  default argument as having a default. Now it shows for all.
2023-02-02 12:07:25 -03:00
RedworkDE
b9d1462d2a C#: Set AppContext.BaseDirectory for editor builds 2023-02-02 15:05:11 +01:00
George Marques
5fc7918594
GDScript: Improve usability of setter chains
- Consider PackedArrays non-shared since they are copied on C++/script
  boundaries.
- Add error messages in the analyzer when assigning to read-only
  properties.
- Add specific error message at runtime when assignment fails because
  the property is read-only.
2023-02-02 10:20:35 -03:00
Rémi Verschelde
50022484a3
Merge pull request #72592 from EricEzaM/67008-autocomplete-crash-virtual-fn
Fix crash in gdscript when autocompleting virtual function and signature does not match base.
2023-02-02 13:59:57 +01:00
Rémi Verschelde
8978196a48
Merge pull request #72468 from rbessems/rbessems/add_ml2_controller
Adding Magic Leap 2 Controller Interaction Profile
2023-02-02 13:59:34 +01:00
Rémi Verschelde
c5c6f2db89
Merge pull request #72553 from RedworkDE/net-output-directory
C#: Preserve directories in output during export
2023-02-02 13:59:05 +01:00