Commit Graph

597 Commits

Author SHA1 Message Date
patwork eb488f7321 Fix splash screen background color in HTML shell 2024-05-12 01:02:14 +02:00
Mitten Orvan 829c33aed1
Create a GDB pretty printing file for String, StringName, and Vector
GDB supports custom pretty-printers implemented in Python.
When debugging Godot, checking the values of Strings and StringNames
in the debugger was very inconvenient as the data is fairly deep
in the structure. This makes the values immediately visible.

The custom pretty printer can be taken into use manually by calling
`source misc/scripts/godot_gdb_pretty_print.py` in the GDB console.
In VS code, it can be activated by default by adding the source
command to the `setupCommands` of the configuration in launch.json.

Like this:
```json
// launch.json
{
    "configurations": [
        {
            "name": "C/C++: debug,
            "type": "cppdbg",
	    ...
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                },
                {
                    "description": "Load custom pretty-printers for Godot types.",
                    "text": "source ${workspaceRoot}/misc/scripts/godot_gdb_pretty_print.py"
                }
            ],
            "miDebuggerPath": "gdb"
        }
    ],
    "version": "2.0.0"
}
```

Extended the pretty-printer python script to support Vectors.
The printer needs to be uncomfortably aware of CowData
implementation details, but I don't think there is any
way around that.
2024-05-11 12:33:35 +02:00
Rémi Verschelde 4778b24366
Merge pull request #91597 from Repiteo/ci/pre-commit-handle-everything
CI: Overhaul static checks to use `pre-commit`
2024-05-08 18:22:59 +02:00
Thaddeus Crews df969ff742
CI: Overhaul static checks to use `pre-commit` 2024-05-08 10:30:24 -05:00
Rémi Verschelde 7d03b1de0b
Style: Trim trailing whitespace and ensure newline at EOF
Found by apply the file_format checks again via #91597.
2024-05-08 10:12:46 +02:00
Hugo Locurcio 47ac22486d
Update dependencies in D3D12 SDK installer script
- Add colored console output.
2024-05-07 19:10:58 +02:00
Rémi Verschelde 4b070e8031
Fix various typos with codespell
Using 2.2.7.dev217+g10c2abcf.

Had to add `colour` to the ignore list as we used it as an alias/keyword for the
documentation of color-related APIs.
Also ignore recommendations to change `thirdparty` to either `third-party` or
`third party`, which are correct but we use the former fairly consistently.
2024-05-07 10:08:42 +02:00
Radiant 789c6ebdfd Implement `amplitude` to Input.vibrate_handheld
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
Co-authored-by: m4gr3d <m4gr3d@users.noreply.github.com>
2024-05-02 19:09:42 +03:00
bruvzg 360d365b33
[RTL] Adds extra argument to `remove_paragraph` to skip cache invalidation and a method for manual cache invalidation. 2024-05-02 14:03:21 +03:00
Yaohua Xiong 1f2aa17d14
Extend `CanvasItem::draw_circle()` with filled, width, and antialiased options
Make it possible to draw unfilled circle, like draw_rect(). Antialising is only implemented for unfilled version.
2024-05-02 10:42:24 +02:00
bruvzg 059ddc41a0
[macOS export] Add support for privacy manifest configuration. 2024-04-30 23:31:56 +03:00
Rémi Verschelde b1da4b2a84
Merge pull request #91128 from patwork/splash-image-in-web-export
Splash image support and new progress bar for HTML5 Web Export
2024-04-30 17:03:21 +02:00
Rémi Verschelde e19b808a7a
Merge pull request #86978 from kitbdev/multicaret-overhaul
Overhaul multicaret editing and selection in TextEdit
2024-04-30 17:03:04 +02:00
Rémi Verschelde bdeed8e750
Merge pull request #90375 from bruvzg/ios_privacy
[iOS export] Add support for privacy manifest configuration.
2024-04-29 10:09:38 +02:00
kit 773a473807 Overhaul multiple caret editing in TextEdit.
Use a multicaret edit to delay merging overlapping carets until the end.
2024-04-26 14:26:10 -04:00
patwork 7c8a4a9dab Added splash image support and new progress bar for web export 2024-04-25 11:12:55 +02:00
bruvzg a116801ec7
Improve TextEdit/LineEdit word selection. 2024-04-22 14:02:07 +03:00
Rémi Verschelde bffaa98b13
Merge pull request #90645 from Malcolmnixon/unified-xr-trackers
Rework XR Trackers to have a common ancestor
2024-04-22 12:52:07 +02:00
Malcolm Nixon 823ae7b3fa Rework XR Trackers to have a common ancestor. Allow creation of XRNode3D to drive node positions and visibility. 2024-04-18 20:04:01 -04:00
Rémi Verschelde 2d884ba70c
Merge pull request #90797 from Geometror/vsnode-comment-compat
[Compatibility] Add stub for VisualShaderNodeComment
2024-04-18 12:24:50 +02:00
Lyuma cb7ef2b8de Add SkeletonIK3D get/set_interpolation compat from #87888 2024-04-18 01:49:12 -07:00
Hendrik Brucker 735c45dc8e [Compatibility] Add stub for VisualShaderNodeComment 2024-04-18 02:39:29 +02:00
Rémi Verschelde 36bdab4ddd
Merge pull request #90759 from dsnopek/openxr-hand-revert
Revert `OpenXRHand` to its pre-`SkeletonModifier3D` state
2024-04-17 10:59:10 +02:00
smix8 df66a55ef3 Remove experimental constrain_avoidance from NavigationRegion2D
Removes experimental constrain_avoidance feature from NavigationRegion2D.
2024-04-16 18:02:53 +02:00
David Snopek dfca388d75 Revert `OpenXRHand` to its pre-`SkeletonModifier3D` state 2024-04-16 10:36:43 -05:00
bruvzg 7446826ab9 [iOS export] Add support for privacy manifest configuration. 2024-04-16 12:10:12 +03:00
Rémi Verschelde 673e770a8d
Merge pull request #90575 from TokageItLab/boneattachment-performance
Remove `bone_pose_updated` signal and replace it with the `skeleton_updated` signal
2024-04-15 10:00:26 +02:00
Silc Lizard (Tokage) Renew 78a5ef4158 replace bone_pose_updated to skeleton_updated signal 2024-04-13 05:48:42 +09:00
ajreckof d3d4b2e25e Fix infinite while loop on empty added file. 2024-04-12 19:38:37 +02:00
Andreia Gaita 536ca28ea9 Ensure all Visual Studio files are generated with CRLF 2024-04-10 17:26:36 +02:00
ajreckof 248e5bfba2
Revert what needs to be reverted 2024-04-10 09:49:30 +08:00
Rémi Verschelde 1f71d491d0
Merge pull request #88244 from shana/vs-improve-settings
Visual Studio: Don't override user options. Add additional vs hint information
2024-04-08 11:19:58 +02:00
Silc Lizard (Tokage) Renew 04dd299cba Skeleton3D: Add SkeletonModifier / Deprecate Override / Separate PB 2024-04-05 01:28:26 +09:00
Hendrik Brucker a81561cbd9 Add GraphFrame and integrate it in VisualShader 2024-04-04 15:11:00 +02:00
Rémi Verschelde 1dacd6a527
Merge pull request #89179 from groud/expose_tile_map_layer
Expose TileMapLayer
2024-04-04 14:31:16 +02:00
ashley aa1bbe1542 add partial path return option for astar
* AStar2D, AStar3D and AStarGrid2D now can return a partial path if the destination point isn't reachable but still in the map. This option is available for both get_point_path and get_id_path
2024-04-03 22:27:33 -07:00
ajreckof ae472865d0 fix node duplication in update after external changes. 2024-04-03 12:19:38 +02:00
Gilles Roudière 3cd4b2859c Expose TileMapLayer 2024-04-03 11:02:34 +02:00
A Thousand Ships 4933fa8bf5
[Buildsystem] Fix encoding when reading files 2024-03-24 18:02:56 +01:00
MewPurPur 35a569478f Follow up to blue robot icons optimization 2024-03-20 15:28:57 +02:00
Rémi Verschelde e520359147
Pre-commit: Fix `copyright_headers.py` to run on all relevant files
It was only running on the first file passed by pre-commit, instead of all.
Fixes compatibility with Windows paths to get the basename.
2024-03-15 15:32:50 +01:00
kobewi a7b6bcb988 Fix some AcceptDialog argument types 2024-03-12 14:33:43 +01:00
Thaddeus Crews fb299d0fb1
SCons: Ensure `with` statement where applicable 2024-03-10 12:57:57 -05:00
Thaddeus Crews d9fa40f2df
Enforce `\n` eol for Python writes
• Ensure utf-8 encoding if previously unspecified
2024-03-09 14:29:24 -06:00
Hugo Locurcio 8221e7546b
Add editor shortcuts to toggle bottom panel visibility
Default shortcuts use the first or second letter of each word.

This also adds a new shortcut to toggle the last opened bottom panel.
On editor startup, this defaults to the first panel in the list
(which is the Output panel).
2024-03-05 15:53:15 +01:00
Rémi Verschelde f2045ba822
Merge pull request #88933 from raulsntos/dotnet/pre-commit
Move dotnet-format script to pre-commit
2024-03-02 10:48:25 +01:00
Raul Santos 97851f0340
Move dotnet-format script to pre-commit
Co-authored-by: Paul Joannon <437025+paulloz@users.noreply.github.com>
2024-03-02 08:25:48 +01:00
bruvzg 2a3de7adc3
[RTL] Add optional `push_meta` argument to control how meta underline is drawn. 2024-03-01 12:07:06 +02:00
Aarni Koskela 20c563de40
Replace hand-written pre-commit hooks with `pre-commit` Python tool
`pre-commit` can be installed with pip, and configured in the Godot repo with
`pre-commit install`. It can then easily be run both locally with
`pre-commit run`, and on CI, in a cross-platform way.

This makes it much easier for contributors to set up pre-commit hooks,
without having to manually copy files to their git folder.

Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-02-26 14:57:53 +01:00
Zi Ye 995bc8d049 Make Skeleton3D::add_bone return the new bone index right away, instead of requiring an additional call to get_bone_count. 2024-02-25 05:24:48 -06:00
K. S. Ernest (iFire) Lee 04d43947bf
Add ufbx for FBX importing
This update introduces a new import method for FBX files using ufbx. If the fbx2gltf import fails, it will use the most recently cached scene from the ufbx import. The process is sped up by introducing threads to load the ufbx portion.

Key changes include:

- Support for importing geometry helper nodes in FBX files.
- Addition of cameras and lights with updated names.
- Removal of the fbx importer manager.
- Introduction of ModelDocument3D and updates to its methods.
- Changes to FBX import options and visibility.
- Updating the documentation and handling some errors.
- Store the original non-unique node, mesh and animation names in FBX and glTF.

Co-Authored-By: bqqbarbhg <bqqbarbhg@gmail.com>
2024-02-23 22:33:04 +01:00
Rémi Verschelde 5fd9d0891f
SCons: Add proper MinGW support to D3D12 deps install script
Fix a couple GCC warnings.
2024-02-23 22:13:22 +01:00
Raul Santos 5ba92e5a57
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +01:00
Bastiaan Olij 5a98845655 Implement hooks into renderer 2024-02-18 21:54:21 +11:00
Rémi Verschelde e8755b380a
Merge pull request #84792 from scriptsengineer/distance-fog
Add optional depth fog to Environment
2024-02-18 11:23:29 +01:00
Eidolon 08f4560e69 Add optional depth fog 2024-02-17 22:39:34 -03:00
Rémi Verschelde 92fcbe2f5c
Revert "Allow configuration warnings to refer to a property"
This reverts commit bf37a9bac6.
2024-02-17 19:04:18 +01:00
Silc Lizard (Tokage) Renew 4659090543 Make consistent the retrieval of audio tracks 2024-02-18 00:15:33 +09:00
Silc Lizard (Tokage) Renew bc20fdf16f Add CallbackModeDiscrete to AnimationMixer 2024-02-17 18:25:56 +09:00
David Snopek 99fd6ca98c Unbind GDExtension methods that can't reasonably be used 2024-02-16 16:31:09 -06:00
bruvzg 94238d0462
[iOS/macOS] Add option to automatically build (and sign / archive) bundles. 2024-02-13 16:36:41 +02:00
Rémi Verschelde 2db4dd42cf
Merge pull request #88253 from shana/vs-add-custom-config-support
Visual Studio: Fix user workflows with custom user VS configurations
2024-02-13 11:25:10 +01:00
Rémi Verschelde 3be3d5099c
Merge pull request #87340 from DarioSamo/rd_common_context
Finish splitting functionality of the `RenderingDevice` backends into `RenderingDeviceDriver`.
2024-02-12 23:29:32 +01:00
Rémi Verschelde 1b55fa15b0
Merge pull request #86089 from adamscott/pwa-coop-coep
Add PWA option to ensure cross-origin isolation headers on web export
2024-02-12 23:29:16 +01:00
Andreia Gaita 1d29fb0853 VS: Fix user workflows with custom user VS configurations
Users can add additional VS project configurations with their own
custom settings, but to support this workflow, we can't rely directly
on $(Platform) and $(Configuration), because VS needs those to be
both unique Configuration|Platform combos, and we need to allow for
different combos of Configuration|Platform to point to the same
scons build configuration.

GodotPlatform and GodotConfiguration properties lets us decouple from
the magic VS properties that we don't control, so users can add
however many Platform|Configuration combos they want and still
point to a specific GodotPlatform|GodotConfiguration build config.
2024-02-12 17:09:52 +01:00
Adam Scott 62cec03a06
Add option to ensure cross-origin isolation headers on web export 2024-02-12 09:27:39 -05:00
Dario 73eff10c76 Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
Andreia Gaita 1c7167e9ac VS: Don't override user options. Add additional vs hints
Make sure we include any user-specified project settings in our
project definitions, this way users can customize their VS
environment to more closely match what they're building for, and
they better can control debugging and deployment from VS.

Add support for setting VS-only compiler defines, include paths, and
additional linker options, as a hint to VS to use when loading projects
and parsing code. VS would usually know these on non nmake projects,
but for nmake projects we have to tell it about any implicit information
that the compiler has, so it can resolve symbols in the editor.
2024-02-12 13:36:26 +01:00
Gilles Roudière 5a999d67ec Change TileMapEditor to TileMapLayerEditor 2024-02-12 10:11:45 +01:00
Rémi Verschelde d87dd6e779
Merge pull request #87000 from akx/pre-commit-clang-format-ignore-fix
Add `tests/python_build` to clang-format pre-commit hook ignore list
2024-02-09 18:09:09 +01:00
Rémi Verschelde dd275238d1
Merge pull request #86907 from aaronfranke/getter-const
Change AudioStreamPlayer autoplay and GLTFBufferView getters to be const
2024-02-09 12:33:09 +01:00
RedMser bf37a9bac6 Allow configuration warnings to refer to a property
This is used by the inspector so it can show a warning icon on
a specific property.
2024-02-08 23:05:20 +01:00
Aaron Franke 35c99bbcc1
Change AudioStreamPlayer autoplay and GLTFBufferView getters to be const 2024-02-08 13:01:50 -06:00
Rémi Verschelde 7223c5b54a
Fix various typos with codespell
Using 2.2.7.dev115+g0eb441d6.

Had to add `cancelled` to the ignore list, as it's a Wayland signal which
we're handling in our code, so we don't want codespell to fix that "typo".

Also includes the typo fix from #87927.

Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
2024-02-07 11:09:34 +01:00
Hugo Locurcio 93be97e6a7
Make ShaderMaterial always the last option in inspector resource dropdowns
ShaderMaterial is the "advanced" option, while the "basic" options
should be listed first for easier accessibility (and because they're
generally used more often).

This makes sky and particle materials consistent with
canvas/spatial/fog materials on this aspect.
2024-02-05 21:49:17 +01:00
Rémi Verschelde bbccd95d22
Merge pull request #84885 from shana/vsproj-for-everyone
New VS proj generation logic that supports any platform that wants to opt in
2024-02-03 23:17:18 +01:00
A Thousand Ships 6da378afea
Fix `printf` for format checks
Prevents errors with input being invalid format strings
2024-02-02 15:10:46 +01:00
Andreia Gaita 7638a6c981 Add new VS proj generation logic that supports any platform that wants to opt in
Custom Visual Studio project generation logic that supports any platform that has a msvs.py
script, so Visual Studio can be used to run scons for any platform, with the right defines per target.

Invoked with `scons vsproj=yes`

To generate build configuration files for all platforms+targets+arch combinations, users should call

```
scons vsproj=yes platform=XXX target=YYY [other build flags]
```

for each combination of platform+target[+arch]. This will generate the relevant vs project files but
skip the build process, so that project files can be quickly generated without waiting for a command line
build. This lets project files be quickly generated even if there are build errors.

All possible combinations of platform+target are created in the solution file by default, but they
won't do anything until each one is set up with a scons vsproj=yes command for the respective platform
in the appropriate command line. This lets users only generate the combinations they need, and VS
won't have to parse settings for other combos.

Only platforms that opt in to vs proj generation by having a msvs.py file in the platform folder are included.
Platforms with a msvs.py file will be added to the solution, but only the current active platform+target+arch
will have a build configuration generated, because we only know what the right defines/includes/flags/etc are
on the active build target currently being processed by scons.

Platforms that don't support an editor target will have a dummy editor target that won't do anything on build,
but will have the files and configuration for the windows editor target.

To generate AND build from the command line, run

```
scons vsproj=yes vsproj_gen_only=no
```
2024-01-31 16:42:42 +01:00
bruvzg 85df221610
[TextServer / Font] Add support for customizable baseline offset. 2024-01-28 13:26:49 +02:00
Rémi Verschelde b4e519b07f
SCons: Fix Windows cross-compilation from Linux after #86717 2024-01-26 12:42:09 +01:00
MrBBBaiXue ea2c6f1d0b Add a python script to install Direct3D 12 SDK components.
This makes it much faster to get started with Direct3D 12 builds,
as you only need to run `python .\misc\scripts\install_d3d12_sdk_windows.py`
then run `scons d3d12=yes`.

This installs DirectX Shader Compiler, Mesa NIR, WinPixEventRuntime
and DirectX 12 Agility SDK.

- Define a default path that uses the locations from the script.
- Now the default path is in "%LOCALAPPDATA%\Godot\build_deps\"
- Updated CI to use this new python script.

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2024-01-24 20:11:43 +08:00
Hugo Locurcio 6e5e7b8cb7
Add `--log-file` command line argument to write output log to a file
This works even if file logging is disabled in the project settings,
or for the editor/project manager.

`--log-file`'s value can be an absolute path or relative to the project
directory (similar to existing arguments like `--write-movie`).
2024-01-19 20:30:04 +01:00
Rémi Verschelde 7827c8e370
Merge pull request #87358 from bruvzg/ios_xc1520_4
[iOS] Update linker flags for Xcode 15.2.
2024-01-19 10:20:16 +01:00
bruvzg ac57f10f82
[iOS] Update linker flags for Xcode 15.2. 2024-01-19 08:05:42 +02:00
Hendrik Brucker 9d7c2978f4 Rework GraphEdit connections (drawing, API, optimizations)
- GraphEdit now uses Line2D nodes to draw connection lines and uses a dedicated canvas item shader for them
2024-01-18 16:53:15 +01:00
Rémi Verschelde fa81059b9d
Merge pull request #85939 from adamscott/single-threaded-godot-4
Add `THREADS_ENABLED` macro in order to compile Godot to run on the main thread
2024-01-18 09:33:52 +01:00
Adam Scott bd70b8e1f6
Add THREADS_ENABLED macro in order to compile Godot to run on the main thread 2024-01-17 13:58:29 -05:00
Gilles Roudière 48bed5050b Make TileMapLayers extend Node2D and work as children of TileMap 2024-01-17 16:05:50 +01:00
bruvzg 491077239c
[macOS/iOS export] Add option to set custom Info.plist data. 2024-01-11 21:05:35 +02:00
Dario 80eacf1b7a Fix incorrect mapping of initial action as clear region continue to clear. 2024-01-09 22:03:21 -03:00
Aarni Koskela de7133ee07 Add tests/python_build to clang-format pre-commit hook ignore list
It had been ignored by misc/scripts/clang_format.sh since 388d35b74d but not the hook.
2024-01-09 16:07:22 +02:00
Dario cc4d39b0c1 Acyclic Command Graph for RenderingDevice.
Adds a new system to automatically reorder commands, perform layout transitions and insert synchronization barriers based on the commands issued to RenderingDevice.
2024-01-08 14:54:56 -03:00
Silc Lizard (Tokage) Renew a51958a2a0 Remove Object pointer/solve types conflict in AnimationTrackCache
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2024-01-08 21:48:19 +09:00
Rémi Verschelde e72e63a6b5
Merge pull request #85837 from akien-mga/clang-format-16
Style: Mark clang-format 16 as supported for pre-commit hook
2024-01-05 12:04:44 +01:00
bruvzg d8a0eed726
[iOS export] Add export options for performance capabilities and min. iOS version. 2024-01-04 19:38:53 +02:00
Rémi Verschelde 27a9119b8a
Merge pull request #86312 from bruvzg/ios_fix_screen_res
[iOS] Remove deprecated LaunchImages support and switch to Storyboard by default.
2024-01-03 15:44:57 +01:00
Robert Borghese 7bf88df324
Fix PhysicsShapeQueryParameters3D.motion type wrongly set to Vector2 2024-01-02 12:30:35 +01:00
bruvzg da3d5f780d
[iOS] Remove deprecated LaunchImages support and switch to Storyboard by default. 2023-12-18 22:21:58 +02:00
Gilles Roudière 18fe0bd025 Move tile transforms handling cache to TileData 2023-12-13 17:44:59 +01:00
Thaddeus Crews 8cd984b3cb
SCons: Update mypy 2023-12-11 15:59:06 -06:00