Commit Graph

7502 Commits

Author SHA1 Message Date
Jiri Suchan c5bd2f9dce ci: add Python static analysis check via mypy 2022-09-30 19:03:17 +07:00
Guilherme Sousa a6c201fa76 Add Error for synchronizer authority mismatch 2022-09-30 13:11:56 +02:00
Rémi Verschelde f47979f087
Merge pull request #66242 from akien-mga/scons-unify-tools-target 2022-09-30 12:28:50 +02:00
Rémi Verschelde 44799b896f Merge pull request #66534 from akien-mga/scons-msvc-graphite-silence-c++17-deprecation-warnings
SCons: Silence MSVC C++17 deprecation warnings in Graphite
2022-09-29 15:33:45 +02:00
Rémi Verschelde 0dd308cedd Merge pull request #66545 from akien-mga/msvc-warnings-c4324-c4389-c4456-c4459
Fix MSVC warnings C4324, C4389, C4456, and C4459
2022-09-28 20:47:43 +02:00
Rémi Verschelde 361d9b514e Merge pull request #66542 from akien-mga/msvc-warning-c4706
Fix MSVC warning C4706: assignment within conditional expression
2022-09-28 20:47:23 +02:00
Rémi Verschelde 4c5891186a Merge pull request #66525 from Calinou/doc-gdscript-get-stack-debug-instance
Document `print_stack()` and `get_stack()` requiring a debugger connection
2022-09-28 17:14:04 +02:00
Rémi Verschelde 24b36354ff Merge pull request #66532 from bruvzg/mipmap_change
[Text Server] Clear textures after "generate mipmaps" property change.
2022-09-28 17:13:57 +02:00
Rémi Verschelde d8268aae30 Fix MSVC warnings C4324, C4389, C4456, and C4459
Part of #66537.
2022-09-28 16:43:09 +02:00
Rémi Verschelde 0e53dd642c Fix MSVC warning C4706: assignment within conditional expression
Part of #66537.
2022-09-28 16:05:07 +02:00
Rémi Verschelde 965022e5f6 SCons: Silence MSVC C++17 deprecation warnings in Graphite
Fixes #66497.
2022-09-28 13:27:19 +02:00
Hugo Locurcio 530e31d4a3
Document `print_stack()` and `get_stack()` requiring a debugger connection 2022-09-28 12:24:39 +02:00
Rémi Verschelde 14e1f36e61 Merge pull request #66492 from bruvzg/gde_ts_underscr
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions.
2022-09-28 12:12:29 +02:00
bruvzg 51978dde5a
[Text Server] Clear textures after "generate mipmaps" property change. 2022-09-28 12:43:34 +03:00
Rémi Verschelde f7b21e88d0 Merge pull request #66490 from timothyqiu/navmap-realloc
get_path()`
2022-09-28 10:10:48 +02:00
Rémi Verschelde 45d0033188 Merge pull request #65898 from konczg/add_passthrough_extension_wrapper
Add passthrough extension wrapper
2022-09-28 10:08:15 +02:00
bruvzg 8f5d56e04a
[GDExtension] Use function names with underscore for TextServer extension, add macros to generate wrappers for module functions. 2022-09-28 10:04:11 +03:00
Haoyu Qiu 9d58454567 Fix heap-use-after-free in `NavMap::get_path()` 2022-09-28 10:50:03 +08:00
Rémi Verschelde 3fd9452a8c SCons: Fix MSVC warning LNK4042 about dupe objects in regex 2022-09-27 13:45:16 +02:00
Gabor Koncz 72203a4da4 Add Passthrough extension wrapper 2022-09-27 12:26:53 +02:00
Rémi Verschelde 7562932eb2 Merge pull request #66160 from dpalais/double_time
Use double instead of real_t type for time-related parameters and variables
2022-09-27 10:04:10 +02:00
Rémi Verschelde 809927862b Merge pull request #66282 from BastiaanOlij/openxr_palm_pose
Add OpenXR palm pose extension support
2022-09-27 10:03:56 +02:00
Rémi Verschelde cb39d7d08b Merge pull request #65074 from MewPurPur/booleans-highlighting-fix
Fix highlighting after value keywords
2022-09-27 09:58:58 +02:00
Dave Palais 0c46068af0 Change time parameters and variables to double type
Addresses #65313
2022-09-26 13:52:54 -05:00
Rémi Verschelde 39facb35a0 SCons: Unify tools/target build type configuration
Implements https://github.com/godotengine/godot-proposals/issues/3371.

New `target` presets
====================

The `tools` option is removed and `target` changes to use three new presets,
which match the builds users are familiar with. These targets control the
default optimization level and enable editor-specific and debugging code:

- `editor`: Replaces `tools=yes target=release_debug`.
  * Defines: `TOOLS_ENABLED`, `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_debug`: Replaces `tools=no target=release_debug`.
  * Defines: `DEBUG_ENABLED`, `-O2`/`/O2`
- `template_release`: Replaces `tools=no target=release`.
  * Defines: `-O3`/`/O2`

New `dev_build` option
======================

The previous `target=debug` is now replaced by a separate `dev_build=yes`
option, which can be used in combination with either of the three targets,
and changes the following:

- `dev_build`: Defines `DEV_ENABLED`, disables optimization (`-O0`/`/0d`),
  enables generating debug symbols, does not define `NDEBUG` so `assert()`
  works in thirdparty libraries, adds a `.dev` suffix to the binary name.

Note: Unlike previously, `dev_build` defaults to off so that users who
compile Godot from source get an optimized and small build by default.
Engine contributors should now set `dev_build=yes` in their build scripts or
IDE configuration manually.

Changed binary names
====================

The name of generated binaries and object files are changed too, to follow
this format:

`godot.<platform>.<target>[.dev][.double].<arch>[.<extra_suffix>][.<ext>]`

For example:
- `godot.linuxbsd.editor.dev.arm64`
- `godot.windows.template_release.double.x86_64.mono.exe`

Be sure to update your links/scripts/IDE config accordingly.

More flexible `optimize` and `debug_symbols` options
====================================================

The optimization level and whether to generate debug symbols can be further
specified with the `optimize` and `debug_symbols` options. So the default
values listed above for the various `target` and `dev_build` combinations
are indicative and can be replaced when compiling, e.g.:

`scons p=linuxbsd target=template_debug dev_build=yes optimize=debug`
will make a "debug" export template with dev-only code enabled, `-Og`
optimization level for GCC/Clang, and debug symbols. Perfect for debugging
complex crashes at runtime in an exported project.
2022-09-26 16:31:46 +02:00
Rémi Verschelde b9a64c7736 Merge pull request #60313 from BastiaanOlij/xr_hand_tracking
Adding OpenXR hand tracking support
2022-09-26 15:51:31 +02:00
Rémi Verschelde 9cc4511031 Merge pull request #66434 from bruvzg/rtl_fix_def_ot
[RTL] Fix font variations / OpenType features of theme default font not updated when default font is changed.
2022-09-26 15:51:13 +02:00
Rémi Verschelde a587c0a45a Merge pull request #66366 from asmaloney/script-fix-redundant-if
_parse_function()
2022-09-26 15:50:46 +02:00
Rémi Verschelde 49fcf4ffad Style: Cleanup header guards for consistency
Fix file names for {Static,Lightmap}RaycasterEmbree.
2022-09-26 13:51:17 +02:00
bruvzg 970592274d
[RTL] Fix font variations / OpenType features of theme default font not updated when default font is changed. 2022-09-26 13:04:40 +03:00
Bastiaan Olij 23d32c0e16 Adding OpenXR hand tracking support 2022-09-26 19:47:06 +10:00
Rémi Verschelde 3472bdd6b6 Merge pull request #65798 from kisg/dynamic_openxr_loader
Dynamic loading of OpenXR Loader on Android
2022-09-26 08:27:24 +02:00
Rémi Verschelde 48179f296a Merge pull request #66418 from bruvzg/font_fb_order
[TextServer] Always prefer main font over fallbacks, regardless of script/language support.
2022-09-26 08:24:54 +02:00
Rémi Verschelde 985fc6c5dc Merge pull request #65717 from Ithamar/feat-tga-16bits
Add 16-bits TGA support
2022-09-26 08:23:11 +02:00
Aaron Franke fe7135344b
C#: Update Basis Euler angle code to match core 2022-09-25 22:28:52 -05:00
bruvzg 8cdb482738
[TextServer] Always prefer main font over fallbacks, regardless of script/language support. 2022-09-25 23:07:30 +03:00
Rindbee 412e87349a Fix out of sync when the script is edited externally via lsp
Previously, external editing via lsp would modify the modified time of the script,
which caused the internal display of the script to not be refreshed when refocusing
the engine.

Now saving the script externally via lsp will automatically refresh the internal
display.
2022-09-25 23:30:35 +08:00
Rémi Verschelde 15ac442247 Merge pull request #63224 from Rindbee/update-GDScript-cache
Load/update GDScript from disk on load if cache mode is CACHE_MODE_IGNORE
2022-09-25 11:28:45 +02:00
Rémi Verschelde 4e81b68ed2 Merge pull request #66306 from Razoric480/raz/null-string
Prevent a crash in the LSP when a function's return datatype is not resolved
2022-09-25 11:05:26 +02:00
Andy Maloney 127e2333f4 Remove redundant "if" condition in GDScriptCompiler::_parse_function()
Looking at the original PR, I believe this is the original intent, but it now means that previously dead code is now executed.
2022-09-24 12:30:43 -04:00
Gergely Kis d5445c25a6 Dynamic loading of OpenXR Loader on Android
This change implements dynamic loading of the OpenXR Loader library
on Android. If an OpenXR Loader library is not found,
Godot will still function with OpenXR disabled.

Also, on every platform, the OpenXR symbols are resolved at runtime
using xrGetInstanceProcAddr.

On Windows and Linux the OpenXR loader is included in the main
engine binary.

On Android, the OpenXR Loader is not built with the engine. Separately
distributed Android plugins will be provided with the correct loader
library for each device.

Co-authored-by: Gábor Pál Korom <gabor.p.korom@migeran.com>
Co-authored-by: Gábor Koncz <gabor.koncz@migeran.com>
2022-09-24 13:57:03 +02:00
Rindbee f1a4041f52 Load/update GDScript from disk on load if cache mode is CACHE_MODE_IGNORE 2022-09-24 16:06:36 +08:00
Andy Maloney 49ff3d5489 Remove unused includes & move some includes to top of file 2022-09-23 19:06:31 -04:00
Francois Belair 03e41d21e0 Prevent null crash when datatype not resolved 2022-09-23 11:13:57 -04:00
Rémi Verschelde 26e9145c26 SCons: Cleanup `DEBUG`, `_DEBUG` and `NDEBUG` defines
- `_DEBUG` is MSVC specific so it didn't make much sense to define for
  Android and iOS builds.
- iOS was the only platform to define `DEBUG`. We don't use it anywhere
  outside thirdparty code, which we usually don't intend to debug, so it
  seems better to be consistent with other platforms.
- Consistently define `NDEBUG` to disable assert behavior in both `release`
  and `release_debug` targets. This used to be set for `release` for all
  platforms, and `release_debug` for Android and iOS only.
- Due to the above, I removed the only use we made of `assert()` in Godot
  code, which was only implemented for Unix anyway, should have been
  `DEV_ENABLED`, and is in PoolAllocator which we don't actually use.
- The denoise and recast modules keep defining `NDEBUG` even for the `debug`
  target as we don't want OIDN and Embree asserting all over the place.
2022-09-23 15:21:26 +02:00
Bastiaan Olij 6da6e1690e Add OpenXR palm pose extension support 2022-09-23 13:20:12 +10:00
bruvzg 163257d51b
[GDExtension] Implement support for typed arrays. 2022-09-22 23:31:27 +03:00
Ignacio Roldán Etcheverry 62792eeb9f
Merge pull request #66253 from raulsntos/dotnet/assembly-may-be-null
C#: Guard against null assemblies
2022-09-22 18:24:31 +02:00
Raul Santos 24ac82e235
C#: Suppress EventHandler suffix diagnostic for signals
Suppress CA1711 for signal delegates because they are used in events so
the naming follows the guidelines.
2022-09-22 14:23:01 +02:00
Raul Santos f6d60764d3
C#: Guard against null assemblies
A symbol's containing assembly will be null if the symbol is shared
across multiple assemblies.
2022-09-22 12:41:38 +02:00
Rémi Verschelde d96b7d767a Merge pull request #66110 from Zylann/reference_get_count
get_reference_count()`
2022-09-22 08:26:29 +02:00
Marc Gilleron 474cee7daf Rename and expose `RefCounted::get_reference_count()` 2022-09-21 21:18:54 +01:00
Rémi Verschelde a0c85c11c6 Merge pull request #65914 from bruvzg/fix_trim_wo_space
Fix line trim/ellipsis when line do not have space or newline at the end.
2022-09-21 18:55:44 +02:00
Rémi Verschelde 9521849da6 Merge pull request #62429 from smix8/navigation_path_query_4.x
Add NavigationPathQuery objects and NavigationServer query_path()
2022-09-21 13:25:48 +02:00
Rémi Verschelde 5408af1407 Style: Ensure consistent formatting with clang-format 15
When going from version 14 to 15 it would introduce a tiny change in
`websocket_macros.h` just before the comment re-enabling clang-format,
but this can be solved by just letting it do its work.

Bonus cosmetic change in `math_fieldwise.cpp` where clang-format isn't
used, and bump recommended versions for pre-commit hook to [13; 15].
2022-09-21 12:48:58 +02:00
smix8 63dcb9aa80 Add NavigationPathQuery
Adds NavigationPathQueryParameters objects that can be used with NavigationServer.query_path() to query a customized navigation path.
2022-09-20 22:20:11 +02:00
Rémi Verschelde a23ba42f98 Merge pull request #63594 from Faless/img/4.x_loader_ext
[Core] Make ImageFormatLoader extensible.
2022-09-20 15:36:32 +02:00
Rémi Verschelde 4a645abd51 Merge pull request #64514 from dsnopek/webxr-master-fixup-squashed
Get WebXR minimally working again in Godot 4
2022-09-20 08:42:37 +02:00
David Snopek b5c14e5f15 Get WebXR minimally working again in Godot 4 2022-09-19 21:10:27 -05:00
Aaron Franke 7097e8add7
Add a way to get the GLTF extensions supported by GLTFDocumentExtension 2022-09-19 19:40:06 -05:00
Aaron Franke b72dc0de89
Make used extensions stored in GLTFState
This allows GLTFDocumentExtension classes to add to the used extensions array.
2022-09-19 19:39:49 -05:00
Fabio Alessandrelli e8fc6bfeb5 [Core] Make ImageFormatLoader extensible. 2022-09-20 02:01:57 +02:00
Ignacio Roldán Etcheverry ca1ebf9fee
Merge pull request #66119 from raulsntos/dotnet/str-path-join
C#: Rename `PlusFile` to `PathJoin`
2022-09-19 22:25:15 +02:00
Rémi Verschelde 209a837f79 Merge pull request #66112 from Zylann/get_configuration_warnings_psa
Change return type of `get_configuration_warnings` to `PackedStringArray`
2022-09-19 22:03:44 +02:00
Raul Santos 5be5f167a1
C#: Rename `PlusFile` to `PathJoin` 2022-09-19 18:25:29 +02:00
Marc Gilleron aed3822a93 Change return type of `get_configuration_warnings` to `PackedStringArray` 2022-09-19 16:43:15 +01:00
kobewi 9f2dc68279 Replace File/Directory with FileAccess/DirAccess 2022-09-19 11:03:31 +02:00
Rémi Verschelde 63c0dc690e Merge pull request #66087 from aaronfranke/gltf-minor-light
Minor enhancements to the GLTF module (lights and docs)
2022-09-19 09:25:13 +02:00
Rémi Verschelde 956ea15e81 Merge pull request #65879 from magian1127/4.0GenSDoc
inheritdoc the "///" comment from EventHandler to the generated event
2022-09-19 09:23:05 +02:00
Aaron Franke afe09ec914
Minor enhancements to the GLTF module (lights and docs) 2022-09-18 22:33:21 -05:00
Magian 4bd7c63669 C#: inheritdoc the "///" comment from EventHandler to the generated event 2022-09-18 23:08:22 +08:00
Rémi Verschelde e5594c26b1
Merge pull request #44143 from KoBeWi/callable_multiplayer 2022-09-18 13:47:04 +02:00
Tomasz Chabora 882a4f8906 Port remaining connections to callable_mp 2022-09-18 13:08:54 +02:00
Rémi Verschelde 0aea7f2f0f Merge pull request #62411 from willnationsdev/gdres-gdscript
Add GDScript resource export.
2022-09-18 10:53:42 +02:00
Rémi Verschelde 240275fb0d Merge pull request #65979 from iwoithe/fix-onready-typo
change "no" to "not" in the @onready documentation
2022-09-18 10:53:26 +02:00
Haoyu Qiu 2d0d6e4f63 Fix crash when executing `FontFile.get_face_count` 2022-09-18 14:38:57 +08:00
Rémi Verschelde ee39c68d4f Merge pull request #65946 from antonWetzel/csharp-nd-array
Don't marshal multidimensional arrays
2022-09-18 00:42:50 +02:00
Rémi Verschelde ba35d2bff4 Merge pull request #65945 from Faless/mp/4.x_nodes_warnings
[MP] Add warnings to spawner and synchronizer.
2022-09-18 00:42:40 +02:00
Rémi Verschelde 1c0ed3d1ed Merge pull request #65877 from raulsntos/dotnet/signal-delegate-docs
Add documentation to signal delegates
2022-09-18 00:41:39 +02:00
willnationsdev 339aba1656 Add GDScript resource export. 2022-09-17 17:10:30 -05:00
I Woithe 4c785ae3f8
Spelling correction: change "no" to "not" 2022-09-17 21:02:54 +09:30
antonWetzel 5090355907 don't marshal multidimensional arrays 2022-09-17 00:18:08 +02:00
Fabio Alessandrelli ba6f5471c4 [MP] Add warnings to spawner and synchronizer.
MultiplayerSpawner:
- When spawn_path is invalid.
- When the auto spawn list is empty and _spawn_custom is not overridden.
  Note: We remove the warning for placeholder scripts since there's no
  way of knowing if they have a certain method.

MultiplayerSynchronizer:
- When root_path is invalid.
2022-09-17 00:06:42 +02:00
bruvzg 19443a7fef
Fix line trim/ellipsis when line do not have space or newline at the end. 2022-09-16 19:46:26 +03:00
Rémi Verschelde 99e06740cf Merge pull request #65892 from konczg/fix_openxr_layer_composition_blending
Fix OpenXR layer composition blending
2022-09-16 14:57:43 +02:00
Gabor Koncz 8972600146 Fix OpenXR layer composition blending 2022-09-16 12:52:01 +02:00
Raul Santos ba0e7622cd
Make `push_nupkgs_local` absolute
Ensures the `push_nupkgs_local` argument in build_assemblies.py is an
absolute path so the argument can be
given as a relative path and it will be converted.
2022-09-16 10:08:05 +02:00
Raul Santos 70b4533c47
C#: Add documentation to signal delegates 2022-09-16 09:56:59 +02:00
Rémi Verschelde 2d3c14850d Merge pull request #65152 from s77rt/fix-56343
Fix GDScript preload fails in standalone build unless files are present in directory
2022-09-15 20:11:57 +02:00
Ignacio Roldán Etcheverry d39d462907
Merge pull request #65823 from raulsntos/dotnet/signal-docs
C#: Move signal documentation to the event
2022-09-15 18:37:12 +02:00
Abdelhafidh Belalia 4dca9975e7 Fix GDScript `preload` fails in standalone build unless files are present in directory
Fixes #56343.
2022-09-15 13:52:37 +02:00
Raul Santos a5ffd25292
C#: Move signal documentation to the event
Move signal documentation from the delegate to the event and also
deprecate the event if the signal is deprecated.
2022-09-15 13:24:41 +02:00
Raul Santos 02bd0724f5
Fix NuGet fallback folder packages
- Creates a `Godot.Offline.Config` file to configurate NuGet with
Godot's fallback folder. This is easier because now we can assume we can
override the entire file since user config will likely be in the default
`NuGet.Config` file or an additional `*.config` file.
- Ensure the NuGet fallback folder is created at the same time it is
added to the NuGet configuration so future builds don't fail.
- Add `GodotSharp` and `GodotSharpEditor` packages to the fallback folder.
- Add `.nupkg.metadata` file to packages in fallback folder.
- Refer to `Godot.SourceGenerators` using the specific non-floating version
since floating versions don't seem to work with fallbackPackageFolders.
2022-09-15 09:28:59 +02:00
Rémi Verschelde 5d6a719a84
Merge pull request #65788 from bruvzg/macos_fix_dotnet_detection
[macOS, .NET] Fix dotnet binary detection.
2022-09-14 19:06:39 +02:00
Rémi Verschelde 56fb2d1efb Merge pull request #65775 from smix8/navigation_baking_disabled_shapes_4.x
Exclude disabled StaticBody CollisionShapes from Navigationmesh baking
2022-09-14 17:43:05 +02:00
bruvzg f4f556d198
[macOS, .NET] Fix dotnet binary detection. 2022-09-14 18:31:52 +03:00
smix8 534ff93b05 Exclude disabled CollisionShapes from Navigationmesh baking
Excludes disabled CollisionShapes from the geometry parsing for the NavigationMesh baking.
2022-09-14 10:41:33 +02:00
Nathan Franke d1d9b72803
do not load PackedScene from spawner until instantiating 2022-09-13 18:01:49 -05:00
Fabio Alessandrelli dbff58ebdd [WebRTC] Expose more of the WebRTC API.
Add get_gathering_state() returning the iceGatheringState of the
connection.

Add get_signaling_state() returning the signalingState of the
connection.

Improve JS library.
2022-09-13 14:46:58 +02:00
Rémi Verschelde b2875d1acc
Merge pull request #65643 from voylin/fix_recurring_check_in_gdscript_cache.cpp 2022-09-13 10:45:50 +02:00