Commit graph

7371 commits

Author SHA1 Message Date
Hugo Locurcio
291d3aaabe
Improve null and object printing to avoid confusion with arrays
- Use different syntax for object printing to avoid confusion with arrays.
- Print null as `<null>` to avoid confusion with a string `"null"`.
- Display `<empty>` in editor resource pickers to avoid confusion
  with array-based properties.
2022-08-31 15:31:49 +02:00
Rémi Verschelde
96b470b28e
Merge pull request #63394 from Calinou/curve-gradient-rename-interpolate
Rename Curve/Curve2D/Curve3D/Gradient `interpolate()` to `sample()`
2022-08-31 08:37:12 +02:00
Lamia
2ff69d6181 fix: add uri_decode to root_uri #63388 2022-08-31 13:48:37 +10:00
Rémi Verschelde
8fa9d1ae46
Merge pull request #65098 from bruvzg/msdf_modulate
Fix MSDF fonts color modulation.
2022-08-30 23:57:19 +02:00
Rémi Verschelde
87f9038ca0
Merge pull request #65094 from Faless/web/4.x_templates_refactor
[Web] Require threads, rtti, allow optimize=speed.
2022-08-30 23:57:02 +02:00
Atlinx
6b5640c88c Fix inferred GDScript enum values not appearing in inspector
"enum_values" originally wasn't being forwarded to the new type inside "reduce_identifier_from_base", which caused hint strings derived from the new type to be blank, which ultimately caused an empty enum dropdown menu.
2022-08-30 17:40:38 -04:00
Hugo Locurcio
ae18928748
Rename Curve/Curve2D/Curve3D/Gradient interpolate() to sample()
"sampling" is a more accurate term than "interpolating" for what's
happening when using that function.
2022-08-30 22:08:38 +02:00
Fabio Alessandrelli
f958f00283 [Web] Require threads, rtti, allow optimize=speed.
Update export names (web[_dlink]_[release|debug].zip).

The Build with dynamic linking is broken due to high number of imports
in output wasm (likely emscripten regression issue 15487).
2022-08-30 20:01:19 +02:00
bruvzg
fbcb98855d
Fix MSDF fonts color modulation. 2022-08-30 20:28:53 +03:00
Ignacio Roldán Etcheverry
706d988baa
Merge pull request #65061 from paulloz/dotnet/fix-godot_variants-with-empty-type-field
C#: Populate `Type` field on `godot_variant` created in managed
2022-08-30 18:01:00 +02:00
Danil Alexeev
d4555ef5fb
Add String.to_{camel,pascal,snake}_case methods 2022-08-30 12:36:24 +03:00
Rémi Verschelde
432b25d364
Merge pull request #65066 from aaronfranke/str-path-join 2022-08-30 10:01:11 +02:00
Rémi Verschelde
2a4c1bd7c1
Merge pull request #65052 from MewPurPur/fix-number-highlighting-followup 2022-08-30 09:17:41 +02:00
Rémi Verschelde
523bac1ff4
Merge pull request #64977 from aaronfranke/gltf
Move GLTF camera and light conversion code into GLTFCamera and GLTFLight
2022-08-30 08:44:26 +02:00
Aaron Franke
10a56981dc
Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
Paul Joannon
b783be59a2
C#: godot_variant should always have a valid type 2022-08-30 00:32:53 +02:00
VolTer
1342b8ccd6 Follow-up fixes to number highlighting 2022-08-29 20:54:56 +02:00
Ignacio Roldán Etcheverry
051f24b067
Merge pull request #65049 from paulloz/dotnet/win10-export
C#: Fix .NET export template compilation on Windows
2022-08-29 18:34:02 +02:00
Ignacio Roldán Etcheverry
a5218989a2
Merge pull request #65046 from neikeq/dotnet-fix-exported-game-uninitialized-callbacks
C#: Fix exported game crash because of uninitialized callbacks
2022-08-29 18:14:04 +02:00
Ignacio Roldán Etcheverry
70c0774e70
Merge pull request #64987 from raulsntos/dotnet/linux-export
Fix .NET exporting in Linux
2022-08-29 18:13:20 +02:00
Paul Joannon
ab5807d722
Fix .NET export template compilation on Windows 10 2022-08-29 17:49:37 +02:00
Ignacio Roldán Etcheverry
8d9ff955b7 C#: Fix exported game crash because of uninitialized callbacks
This was a regression from 2c180f62d9,
where I forgot to update the source generator.
2022-08-29 17:37:56 +02:00
Rémi Verschelde
c3332018fb
Merge pull request #65003 from MewPurPur/fix-number-coloring 2022-08-29 15:20:32 +02:00
Rémi Verschelde
e60086f98b
Merge pull request #64119 from YuriSizov/theme-init-database 2022-08-29 14:02:21 +02:00
Rémi Verschelde
322c812231
Merge pull request #65023 from Faless/js/4.x_is_web 2022-08-29 13:00:32 +02:00
Fabio Alessandrelli
d20b32186f [Web] Rename JavaScript platform to Web.
Also rename export name from "HTML5" to "Web".
2022-08-29 11:52:00 +02:00
VolTer
a33ed6c046 Fix number highlighting 2022-08-29 11:35:46 +02:00
Rémi Verschelde
fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde
4333f785f6
Merge pull request #64956 from raulsntos/dotnet/format-ci
Add `dotnet format` to CI to check C# style
2022-08-29 07:03:20 +02:00
Ignacio Roldán Etcheverry
58f8f3a40e
Merge pull request #64900 from raulsntos/dotnet/fix-exceptions
Fix various C# exceptions
2022-08-29 01:22:39 +02:00
Ignacio Roldán Etcheverry
f70e106010
Merge pull request #64994 from raulsntos/dotnet/property-indexers
C#: Ignore property indexers and report if exported
2022-08-29 00:52:25 +02:00
Rémi Verschelde
f69c1b79b7
Merge pull request #64989 from mhilbrunner/upnp-docs
[DOCS] Update UPnP documentation
2022-08-29 00:04:16 +02:00
Max Hilbrunner
be41c09769 Update UPnP documentation
Adds more details, especially about caveats, failure modes and pitfalls
2022-08-28 19:09:19 +02:00
Aaron Franke
03cd8097e1
Move GLTF camera conversion code into GLTFCamera 2022-08-28 11:18:32 -05:00
Aaron Franke
3d76b91229
Move GLTF light conversion code into GLTFLight 2022-08-28 11:18:22 -05:00
Raul Santos
761e2b1a65
C#: Ignore property indexers and report if exported
Ignore property indexers since they are unsupported and report a
diagnostic if an user tries to export it.
2022-08-28 18:16:57 +02:00
Rémi Verschelde
f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Raul Santos
b0274d0ee7
Fix .NET exporting in Linux
- Fix platform detection after Linux OS name was renamed from `LinuxBSD`
to `Linux`
- Fix arch detection after renaming `64` to `x86_64`
- Fix typo in `find_hostfxr`
2022-08-28 15:44:05 +02:00
Ignacio Roldán Etcheverry
202f0f2f1b
Merge pull request #64959 from raulsntos/dotnet/fix-malloc-size
C#: Fix byteCount in `NativeMemory.Alloc`
2022-08-28 01:44:56 +02:00
Max Hilbrunner
b2bcf81c7c
Merge pull request #63809 from mhilbrunner/upnp-no-delete-only-add
UPNP: Don't delete previous mappings when adding new port mappings
2022-08-27 23:32:37 +02:00
Rémi Verschelde
d3db8bbebd
Merge pull request #62846 from AaronRecord/remove_redundant_theme_updates_in_enter_tree
Remove `NOTIFICATION_ENTER_TREE` when paired with `NOTIFICATION_THEME_CHANGED`
2022-08-27 21:56:14 +02:00
Aaron Record
4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Rémi Verschelde
19e2f30a55
Merge pull request #64860 from raulsntos/dotnet/sync-math
Sync C# cubic interpolation with core
2022-08-27 19:01:37 +02:00
Rémi Verschelde
b5294b5759
Merge pull request #64922 from akien-mga/dotnet-fix-app-host-version-detection
.NET: Change NETCore.App version detection to use highest match
2022-08-27 18:58:40 +02:00
Rémi Verschelde
35af2b0edd
Merge pull request #64921 from bruvzg/win_arm
[Windows] Improve build environment detection, add support for Windows on ARM.
2022-08-27 18:46:54 +02:00
Rémi Verschelde
09086b0bb0
Merge pull request #64651 from MewPurPur/fix-globalfunc-highlighting
Add new highlighting color for `@GDScript` and `@GlobalScope` functions
2022-08-27 18:44:14 +02:00
Raul Santos
ebe008d41b
C#: Fix byteCount in NativeMemory.Alloc
`NativeMemory.Alloc` takes the byte count as parameter, this is
calculated by multiplying the element size in bytes by the length
of the array.
2022-08-27 17:35:53 +02:00
bruvzg
8dab4a2aa3
[Windows] Improve build environment detection, add support for Windows on ARM. 2022-08-27 16:10:53 +03:00
Raul Santos
f64b845514
C#: Add CubicInterpolateAngle 2022-08-27 12:28:54 +02:00
Raul Santos
623f4a52ca
C#: Add CubicInterpolateInTime 2022-08-27 12:27:11 +02:00
Raul Santos
4c5cefe4fe
C#: Rename and fix Quaternion.SphericalCubicInterpolate 2022-08-27 12:26:38 +02:00
Raul Santos
f72b7a1595
C#: Fix Quaternion.CubicSlerp 2022-08-27 12:26:38 +02:00
Raul Santos
8ad0ef75b8
C#: Add Exp and Log to Quaternion 2022-08-27 12:26:38 +02:00
Raul Santos
b526a0d824
C#: Add GetAngle and GetAxis to Quaternion 2022-08-27 12:26:38 +02:00
Raul Santos
961a086d20
C#: Fix Transform3D interpolation and add spherical interpolation 2022-08-27 12:26:38 +02:00
Raul Santos
b35fcf3620
C#: Add missing match check in Quaternion.Slerpni 2022-08-27 12:26:37 +02:00
Rémi Verschelde
488c501633
Merge pull request #64942 from paulloz/cs-fix-color-names
C#: Fix dictionary keys in Colors
2022-08-27 08:10:07 +02:00
Josh Jones
3dd59013f4 Added node for Navigation links 2022-08-26 22:05:15 -07:00
Raul Santos
d35c58507c
Fix C# style with dotnet format 2022-08-27 03:22:31 +02:00
Micky
ef5b9a06a9 Rename hint_tooltip to tooltip_text & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Paul Joannon
4c05b95857
C#: Fix dictionary keys in Colors 2022-08-26 23:27:45 +02:00
Rémi Verschelde
f9f2446972
Merge pull request #64367 from Mickeon/rename-var-to-str
Rename `str2var` to `str_to_var` and similar
2022-08-26 23:04:06 +02:00
Yuri Sizov
6320a0fc18 Add ThemeDB, expose previously static Theme methods 2022-08-26 19:23:05 +03:00
Raul Santos
79f9f59a87
Fix various C# exceptions
- Replace `IndexOutOfRangeException` with `ArgumentOutOfRangeException`
- Replace `Exception` with a more specific exception
- Add the parameter name to argument exception
- Update documentation for methods that throw exceptions
- Use `StringBuilder` to build exception messages
- Ensure exception messages end with a period
2022-08-26 16:56:00 +02:00
Rémi Verschelde
1c97dde78f
Merge pull request #64894 from fabriceci/remove-dynamic-bodies-name 2022-08-26 16:16:32 +02:00
Rémi Verschelde
c54125d17b
Merge pull request #64864 from aaronfranke/noise-texture-2d 2022-08-26 16:11:31 +02:00
Micky
59e11934d8 Rename str2var to str_to_var and similar
Affects the Math class, a good chunk of the audio code, and a lot of other miscellaneous classes, too.

- `var2str` -> `var_to_str`
- `str2var` -> `str_to_var`
- `bytes2var` -> `bytes_to_var`
- `bytes2var_with_objects` -> `bytes_to_var_with_objects`
- `var2bytes` -> `var_to_bytes`
- `var2bytes_with_objects` -> `var_to_bytes_with_objects`
- `linear2db` -> `linear_to_db`
- `db2linear` -> `db_to_linear`
- `deg2rad` -> `deg_to_rad`
- `rad2deg` -> `rad_to_deg`

- `dict2inst` -> `dict_to_inst`
- `inst2dict` -> `inst_to_dict`
2022-08-26 14:58:22 +02:00
Rémi Verschelde
3d43ffdb5b .NET: Change NETCore.App version detection to use highest match
`libnethost.a` detection failed on my Linux system (Mageia 9, using Fedora 36
dotnet repos), because it used the first match which isn't the one matching
the rest of the SDK:
```
$ dotnet --list-runtimes
Microsoft.AspNetCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.28 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.8 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
```

No idea why I still have 6.0.5 installed but it should pick the highest I guess.
2022-08-26 13:19:01 +02:00
fabriceci
f8cc88fab3 Restore RigidBody2/3D, SoftBody names in physics 2022-08-26 12:26:25 +02:00
Rémi Verschelde
dc4193b478
Merge pull request #64877 from Faless/mp/4.x_enet_remote_addr 2022-08-26 12:15:47 +02:00
Rémi Verschelde
7013c68619
Merge pull request #64422 from bruvzg/make_fonts_unbearably_ugly_2.0 2022-08-26 11:59:07 +02:00
Fabio Alessandrelli
426fe7ebdd [Net] Expose get_remote_address get_remote_port. 2022-08-26 10:47:55 +02:00
Ignacio Roldán Etcheverry
e8ce36628f
Merge pull request #64901 from raulsntos/dotnet/equals
C#: Use pattern matching to simplify `Equals`
2022-08-26 08:33:52 +02:00
Raul Santos
9c9b8fcd34
Remove [Signal] attribute from events
- Remove event as a valid target of `SignalAttribute`
- Stop adding the `[Signal]` attribute to events in bindings_generator
- Make bindings_generator use the `EventHandler` suffix to be consistent with the C# source generator
- Remove obsolete comment about the signal's delegate name
2022-08-26 00:53:45 +02:00
Ignacio Roldán Etcheverry
a8476c04f4
Merge pull request #64852 from paulloz/dotnet6-export-category-attribute
C#: Preserve order of exported fields/categories
2022-08-25 23:26:03 +02:00
Rémi Verschelde
85ed9eac6f
Merge pull request #64857 from MewPurPur/tweak-stringname-color 2022-08-25 22:44:22 +02:00
Rémi Verschelde
6d196c1ce3
Merge pull request #64898 from neikeq/dotnet-fix-find-arch 2022-08-25 22:18:38 +02:00
Paul Joannon
cf99d92a39
C#: Preserve order of exported fields/categories 2022-08-25 20:39:57 +02:00
Ignacio Roldán Etcheverry
09af583e10 C#: Fix buildsystem when dotnet --info does not specify arch
For some installations the architecture information is not printed.
2022-08-25 20:05:42 +02:00
Ignacio Roldán Etcheverry
f03ac21ea8
Merge pull request #52815 from magian1127/temp3
C# Generate SnakeName const
2022-08-25 20:02:16 +02:00
Rémi Verschelde
af88438c71
Merge pull request #64354 from Mickeon/rename-navigation-distance 2022-08-25 18:35:23 +02:00
Raul Santos
f8ceceed15
Various C# documentation improvements
Fixes wrong/invalid documentation and add documentation to some OS members.
2022-08-25 17:09:32 +02:00
Magian
c371d1bac9 C# Generate StringName(SnakeName) for all class members 2022-08-25 23:07:20 +08:00
VolTer
88ad758b41 Added highlighting color for GDScript and GlobalScope functions 2022-08-25 17:00:16 +02:00
Rémi Verschelde
0cf0e96038
Merge pull request #64776 from YuriSizov/import-images-moar-flags 2022-08-25 16:51:26 +02:00
Rémi Verschelde
c7eb423eeb
Merge pull request #55778 from aaronfranke/use-arch-btw
[skip ci]
2022-08-25 13:03:48 +02:00
Ignacio Roldán Etcheverry
8769088f48
Merge pull request #64869 from bruvzg/dotnet_arch
[macOS] Check .NET binary architecture, and search for the cross compile SDK in the subfolders.
2022-08-25 11:25:08 +02:00
Aaron Franke
27b0f18275 Unify bits, arch, and android_arch into env["arch"]
Fully removes the `bits` option and adapts the code that relied on it.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2022-08-25 11:19:20 +02:00
VolTer
73bbc61eb4 Tweaked StringName highlighting color 2022-08-25 08:32:14 +02:00
bruvzg
0a427cf159
[macOS] Check .NET binary architecture, and search for the cross compile SDK in the subfolders. 2022-08-25 09:32:07 +03:00
Rémi Verschelde
6ffbec9e49
Merge pull request #64731 from raulsntos/dotnet6-variant-generics-analyzer
C#: Add `MustBeVariant` attribute and analyzer
2022-08-25 07:34:05 +02:00
Rémi Verschelde
e1266d2f35
Merge pull request #64781 from raulsntos/csharp_children
Add `includeInternal` to C# NodeExtensions and avoid printing errors in `GetChildOrNull`
2022-08-25 07:32:50 +02:00
Rémi Verschelde
0569738a6e
Merge pull request #64849 from jtnicholl/fix_blender_check
Fix Blender file path check to require a directory
2022-08-25 07:31:43 +02:00
Aaron Franke
394d058420
Rename 2D NoiseTexture to NoiseTexture2D 2022-08-24 22:44:42 -05:00
Raul Santos
6468f9b37c
Add MustBeVariant attribute and analyzer
- MustBeVariant attribute can be used to enforce that generic types must
be a marshable from/to Variant.
- Also renames all diagnostic ids to be valid unicode identifiers.
2022-08-25 01:47:40 +02:00
Jonathan Nicholl
6ff41a3fcd Fix Blender file path check to require a directory 2022-08-24 16:08:01 -04:00
Aaron Franke
09551c3d2b
Remove mentions of the Server platform from the Mono module 2022-08-24 14:56:40 -05:00
Ignacio Roldán Etcheverry
686286ed9d
Merge pull request #64742 from zaevi/csharp_add_grouping_attributes
C#: Add grouping attributes for properties.
2022-08-24 20:09:47 +02:00
Ignacio Roldán Etcheverry
e172b1aa91
Merge pull request #64743 from raulsntos/dotnet6-signal-analyzer
Improve C# signal analyzer errors
2022-08-24 19:28:47 +02:00
Rémi Verschelde
c8c0f21880
Merge pull request #64780 from YuriSizov/editor-color-conversion-map 2022-08-24 16:49:51 +02:00
Rémi Verschelde
4698dc67b5
Merge pull request #64082 from KoBeWi/array3k 2022-08-24 16:05:59 +02:00
Rémi Verschelde
a4a4402201
Merge pull request #64822 from akien-mga/sunset-visual-script 2022-08-24 15:41:57 +02:00
Yuri Sizov
c78cbb523f Extract editor color map and simplify SVG color conversion 2022-08-24 15:59:14 +03:00
Raul Santos
a0da258401
Use pattern matching to simplify Equals
- Simplify and unify `Equals` implementation of C# struct types
- Also add pattern matching to replace a cast in `DebuggingUtils`
2022-08-24 14:15:33 +02:00
kobewi
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
Rémi Verschelde
b1f392c25e Remove VisualScript module for 4.0
As announced in https://godotengine.org/article/godot-4-will-discontinue-visual-scripting,
Godot maintainers have agreed to discontinue the current implementation of
our VisualScript language.

The way it had been designed was not user-friendly enough and we did not
succeed in improving its usability to actually make it a good low-code
solution for users who need one.

So we prefer to remove it for Godot 4.0 and leave the door open for new,
innovative ideas around visual scripting, to be developed as plugins or
extensions now that Godot provides sufficient functionality for this
(notably via GDExtension and the godot-cpp C++ bindings).

The current module has been moved to a dedicated repository (with full Git
history extracted with `git filter-branch`):

https://github.com/godotengine/godot-visual-script

It can still be compiled as a C++ module (for now, but will likely require
work to be kept in sync with the engine repository), but our hope is that
contributors will port it to GDExtension (which is quite compatibile with
the existing C++ module code when using the godot-cpp C++ bindings).
2022-08-24 12:08:17 +02:00
Raul Santos
22a3c585c2
Update C# named colors to use HEX codes 2022-08-24 10:46:06 +02:00
Raul Santos
665621aa1b
Avoid printing an error in GetChildOrNull
`GetChildOrNull` won't print an error when the given index is out of range,
similar to how the LINQ `ElementAtOrDefault` method works.
2022-08-24 10:10:47 +02:00
Rémi Verschelde
711e372aad
Merge pull request #64787 from akien-mga/libwebp-1.2.4
libwebp: Sync with upstream 1.2.4
2022-08-24 09:51:49 +02:00
Ignacio Roldán Etcheverry
b438859d04
Merge pull request #64727 from raulsntos/csharp-remove-ctors
Remove copy constructors in C# structs
2022-08-24 08:28:58 +02:00
Rémi Verschelde
91e5f48ea7
Merge pull request #64009 from KoBeWi/arrayy_lmao
Replace Array return types with TypedArray (part 2)
2022-08-24 08:18:56 +02:00
Ignacio Roldán Etcheverry
4d9ddc8ab3
Merge pull request #64773 from raulsntos/dotnet6-🦭
C#: Seal classes that can't be inherited from
2022-08-24 08:01:27 +02:00
kobewi
1abdffe7a0 Replace Array return types with TypedArray 2 2022-08-23 23:21:32 +02:00
Rémi Verschelde
e5e34f21fc libwebp: Sync with upstream 1.2.4
Changes: https://chromium.googlesource.com/webm/libwebp/+/1.2.4/NEWS
2022-08-23 19:05:53 +02:00
Raul Santos
7924d643e5
Add includeInternal to C# NodeExtensions and fix get_child documentation
Node methods in C# extended to use generics
now have the optional parameter `includeInternal`
like their non-generic equivalents.

Also, fixed a typo in the `Node.get_child` documentation.
2022-08-23 18:19:44 +02:00
Yuri Sizov
672e9d6868 Make ImageLoader take bit field flags 2022-08-23 14:39:01 +03:00
Raul Santos
d6574f025b
Seal classes that can't be inherited from 2022-08-23 11:08:59 +02:00
Rémi Verschelde
d5606503b4
Merge pull request #64762 from neikeq/csharp-dangling-callable-code 2022-08-23 11:08:28 +02:00
Rémi Verschelde
155fa4e156
Merge pull request #64758 from jtnicholl/blend_fbx_warnings 2022-08-23 10:29:28 +02:00
Rémi Verschelde
62c3e72b6f
Merge pull request #63959 from KoBeWi/typo_arrray
Replace Array return types with TypedArray (part 1)
2022-08-23 08:52:13 +02:00
bruvzg
bcc3643989
Add font LCD sub-pixel anti-aliasing support. 2022-08-23 08:47:21 +03:00
Rémi Verschelde
7e4817a096
Merge pull request #64729 from raulsntos/csharp-xform-operator
C#: Replace `Xform` and `XformInv` with `*` operator
2022-08-23 07:47:09 +02:00
Rémi Verschelde
230225d360
Merge pull request #64744 from bruvzg/fix_mixed_font_color4
[4.x] Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data.
2022-08-23 07:45:58 +02:00
Ignacio Roldán Etcheverry
bc12436f73 C#: Remove old Callable code left dangling after switch to .NET 6 2022-08-23 04:14:58 +02:00
Ignacio Roldán Etcheverry
ebd966acee
Merge pull request #64725 from raulsntos/dotnet6-assembly-exists
Avoid trying to load non-existent assembly
2022-08-23 02:47:55 +02:00
Jonathan Nicholl
d24b65b363 Update messages for missing FBX2glTF, add similar messages for Blender 2022-08-22 20:30:33 -04:00
kobewi
8be27dc59e Replace Array return types with TypedArray 2022-08-22 22:42:36 +02:00
Rémi Verschelde
b8a64313f0
Merge pull request #59564 from KoBeWi/FINALLY,_ULTIMATE_UNDO_REDO 2022-08-22 22:37:33 +02:00
Rémi Verschelde
09b012a409
Merge pull request #64400 from aaronfranke/gltf-fix-camera 2022-08-22 22:23:08 +02:00
Rémi Verschelde
1f61d47766
Merge pull request #64339 from YuriSizov/core-multilevel-validate-property 2022-08-22 21:39:48 +02:00
Raul Santos
0b8b733d77
C#: Replace Xform and XformInv with * operator
- In cases where both `Xform`/`XformInv` and the `*` operator were
implemented the `Xform`/`XformInv` methods were removed in favor of the
`*` operator.
- In cases where the `Xform`/`XformInv` existed but not the `*` operator,
the `Xform`/`XformInv` methods were replaced with the `*` operator.
- In cases where no method existed, a new `*` operator has been
implemented to support the same operations that are supported in GDScript.
- Fixes the `Transform.Xform` and `Transform.XformInv` with `Rect2`
implementation to use a zero `Rect2` size to start expanding from
(which is how it's implemented in C++).
2022-08-22 21:11:24 +02:00
bruvzg
1c5a50fac6
Fix color modulation of the grayscale glyphs in font with mixed color / grayscale data. 2022-08-22 21:01:22 +03:00
Raul Santos
3b201c2b04
Improve C# signal analyzer errors
Report the specific parameters that are not supported.
2022-08-22 19:44:05 +02:00
Zae
431a28fe19 C#: Add grouping attributes for properties. 2022-08-23 01:23:45 +08:00
kobewi
ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Yuri Sizov
1a24c9e14b Make _validate_property a multilevel method 2022-08-22 18:35:11 +03:00
Rémi Verschelde
5193332d10
Merge pull request #64343 from TokageItLab/priority-ph 2022-08-22 17:31:23 +02:00
Rémi Verschelde
fdc36ad082
Merge pull request #64553 from RedMser/fix-property-validation-refactor 2022-08-22 16:54:47 +02:00
Rémi Verschelde
ff7c10f709
Merge pull request #57297 from rafallus/orthogonal_index
Expose `Basis::set_orthogonal_index` as a GridMap method
2022-08-22 15:59:20 +02:00
Yuri Sizov
3cd3ec62e2
Merge pull request #37168 from theoway/ChangeNodeTypeDialog
Changed the title of change node type dialog
2022-08-22 15:42:28 +03:00
Raul Santos
c56b157c61
Avoid trying to load non-existent assembly
If the project assembly does not exist, return `false` directly instead
of trying to load it.
This prevents the `System.InvalidOperationException` thrown for failing
to locate managed application.
2022-08-22 11:48:12 +02:00
Raul Santos
29894e9c1a
Remove copy constructors in C# structs 2022-08-22 11:30:17 +02:00
Ignacio Roldán Etcheverry
9c34a02191 C#: Add module README
This should clarify development workflow with the NuGet packages.
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
2c180f62d9 C#: Replace P/Invoke with delegate pointers
- Moves interop functions to UnmanagedCallbacks struct that
  contains the function pointers and is passed to C#.

- Implements UnmanagedCallbacksGenerator, a C# source generator that
  generates the UnmanagedCallbacks struct in C# and the body for the
  NativeFuncs methods (their implementation just calls the function
  pointer in the UnmanagedCallbacks). The generated methods are needed
  because .NET pins byref parameters of native calls, even if they are
  'ref struct's, which don't need pinning. The generated methods use
  `Unsafe.AsPointer` so that we can benefit from byref parameters
  without suffering overhead of pinning.

Co-authored-by: Raul Santos <raulsntos@gmail.com>
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
186d7f6239 C#: Remove IL post-processor build dependency
We were using it to workaround a limitation of `Unsafe.AsPointer` and
`ref struct`s. However, we can get the same result with some tricks,
since we have control over the declaration of these structs.
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
1bf4397e5b C#: Use custom project setting for C# project files name
The setting is initially assigned the name of the Godot project,
but it's kept freezed to prevent issues when renaming the Godot
project.

The user can always rename the C# project and solution manually and
change the setting to the new name.
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
0c30c678f0 C#: Re-introduce generic Godot Array and Dictionary
This new version does not support the following type arguments:

- Generic types
- Array of Godot Object (Godot.Object[]) or derived types

The new implementation uses delegate pointers to call the Variant
conversion methods. We do type checking only once in the static
constructor to get the conversion delegates.
Now, we no longer need to do type checking every time, and we no
longer have to box value types.
This is the best implementation I could come up with, as C# generics
don't support anything similar to C++ template specializations.
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
3123be2384 C#: Array, Dictionary and marshaling refactoring
- Array and Dictionary now store `Variant` instead of `System.Object`.
- Removed generic Array and Dictionary.
  They cause too much issues, heavily relying on reflection and
  very limited by the lack of a generic specialization.
- Removed support for non-Godot collections.
  Support for them also relied heavily on reflection for marshaling.
  Support for them will likely be re-introduced in the future, but
  it will have to rely on source generators instead of reflection.
- Reduced our use of reflection.
  The remaining usages will be moved to source generators soon.
  The only usage that I'm not sure yet how to replace is dynamic
  invocation of delegates.
2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
344f5028d4 C#: Add dedicated Variant struct, replacing System.Object 2022-08-22 03:36:52 +02:00
Ignacio Roldán Etcheverry
a9892f2571 C#: Add source generator for method list 2022-08-22 03:36:52 +02:00