Commit Graph

599 Commits

Author SHA1 Message Date
Hugo Locurcio ad4480bf2e
Add a "version" project setting and use it in new export presets
This makes it easy to retrieve the project version at runtime
for display purposes, while simplifying the export preset configuration.
You can now leave the version empty unless you need to override it on a per-preset
basis.

Since export presets save the values of default values to the `export_presets.cfg`
file, this change only affects export presets created after this commit was merged.
2023-08-04 10:29:33 +02:00
Yuri Sizov 3de7dd902c Merge pull request #79880 from dalexeev/gds-fix-id-shadowing-below
GDScript: Fix bug with identifier shadowed below in current scope
2023-07-31 21:01:36 +02:00
Hugo Locurcio 4cab77094a
Add a `--max-fps` command-line argument to set a FPS limit
This allows limiting framerate on any project, which is useful to
reduce power usage and latency with certain setups (such as VRR displays).

This is particularly useful in projects that do not expose a setting to change
the FPS limit. While external FPS limiters can be used, they can be cumbersome
to set up and result in increased input lag compared to a built-in FPS limiter.
2023-07-28 02:51:27 +02:00
Yuri Sizov da81ca62a5
Merge pull request #79405 from Calinou/doc-import-options
Fill in descriptions for import options in the class reference
2023-07-27 20:32:04 +02:00
Hugo Locurcio bc58a8a34e Fill in descriptions for import options in the class reference 2023-07-27 19:18:27 +02:00
Danil Alexeev d53fc92b4c
GDScript: Fix bug with identifier shadowed below in current scope 2023-07-26 11:26:57 +03:00
Yuri Sizov 4b0d1026af Merge pull request #78365 from smix8/ps_navmap_default_up_4.x
Add ProjectSettings navigation map default up
2023-07-25 21:25:50 +02:00
Septian 2857b91385 Fix many typos in documentation 2023-07-19 19:56:06 +07:00
smix8 2852fb43f7 Change 2D navigation ProjectSettings from integers to floats
Changes 2D navigation ProjectSettings from integers to floats.
2023-07-14 22:36:06 +02:00
Rémi Verschelde 81064cc239
Doctool: Remove version attribute from XML header
We don't use that info for anything, and it generates unnecessary diffs
every time we bump the minor version (and CI failures if we forget to
sync some files from opt-in modules (mono, text_server_fb).
2023-07-06 10:08:21 +02:00
Rémi Verschelde 346f1ab86b
Bump version to 4.2-dev
Keep on waitin'
2023-07-05 22:07:03 +02:00
RedworkDE e0f644a48d C#: Fix editor integration breaking and causing error spam when reloading assemblies fails
- Do not reload scripts from non-collectible assemblies
- Do not load GodotTools as collectible
- Do not attempt to reload the same project assembly forever
2023-06-21 12:47:52 +02:00
smix8 c4f544f802 Add ProjectSettings navigation map default up
Adds ProjectSettings navigation map default up.
2023-06-17 11:29:17 +02:00
Rémi Verschelde 754a52a4ab
Merge pull request #78201 from smix8/navmesh_cell_height_4.x
Fix `cell_height` for navigation meshes
2023-06-14 09:27:33 +02:00
Hugo Locurcio 061397835d
Document known bugs with the Multi-Threaded thread model project setting
- Add a warning on project startup when using the Multi-Threaded option.
- Improve command line validation for the `--render-thread` CLI argument.
2023-06-14 08:37:04 +02:00
smix8 180a5cded1 Fix `cell_height` for navigation meshes
Fixes `cell_height` for navigation meshes.
2023-06-13 23:24:32 +02:00
Álex Román Núñez 938a837056 Disable NVIDIA's threaded optimization on Windows 2023-06-13 11:47:40 +02:00
Aaron Franke 1e6f30e6bd
Set both texture format overrides to false by default 2023-06-12 11:52:02 -05:00
lawnjelly a3ef092f18 Input - fix just pressed and released with short presses
Previously if an action was both pressed and released on the same tick or frame, `is_action_just_pressed()` would return false, resulting in missed input.

This PR separately the timestamp for pressing and releasing so each can be tested independently.
2023-06-12 11:14:58 +01:00
Aaron Franke 944fbce347
Enable S3TC_BPTC but not ETC2_ASTC by default 2023-06-09 11:38:29 -05:00
Michael Alexsander 71d8882a02
Enhance icon fallback and their docs for exporters 2023-06-03 19:28:50 -03:00
Rémi Verschelde 3dd0307f3f
Merge pull request #76348 from warriormaster12/pipeline-cache
Implement Vulkan pipeline caching
2023-06-01 00:40:33 +02:00
warriormaster12 dded713dc0 Implement Vulkan pipeline caching 2023-05-31 22:24:18 +03:00
Winston 50d8ee8eee
Expose ProjectSettings.set_as_internal() 2023-05-30 21:16:29 +02:00
Yuri Sizov c697cac667
Merge pull request #76272 from BWPanda/patch-2
Add Stretch Mode description to ProjectSettings.xml
2023-05-30 15:58:52 +02:00
Yuri Sizov f067e27e0b
Merge pull request #77017 from Calinou/doc-noisetexture-seamless-small
Document seamless caveats on small textures in NoiseTexture2D and NoiseTexture3D
2023-05-30 15:43:22 +02:00
Peter Anderson 77a61084aa Add Stretch Mode description to ProjectSettings.xml
Update doc/classes/ProjectSettings.xml

Co-authored-by: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-05-30 13:01:13 +02:00
Yuri Sizov 989dedddf9
Merge pull request #77577 from YeldhamDev/improve_window_docs
Improve `Window` documentation
2023-05-29 17:34:24 +02:00
Yuri Sizov 490a76edc8
Merge pull request #76526 from MewPurPur/improve-docs-top-sections-CORE
Overhaul the top sections of the class reference (Core classes)
2023-05-29 17:08:40 +02:00
Michael Alexsander f7fced5e00
Improve `Window` documentation 2023-05-29 11:18:31 -03:00
Winston 263aedc1ad
Expose ProjectSettings.set_as_basic() to GDScript 2023-05-24 13:28:08 +02:00
VolTer 04562662d3 Overhaul the top sections of the class reference (Core classes) 2023-05-19 07:04:48 +02:00
bruvzg 5b9984b5a2
Add `audio/general/text_to_speech` project setting to enable/disable TTS. 2023-05-18 20:16:03 +03:00
lawnjelly 7925670f81 Add frame delta smoothing option (4.x)
Frame deltas are currently measured by querying the OS timer each frame. This is subject to random error. Frame delta smoothing instead filters the delta read from the OS by replacing it with the refresh rate delta wherever possible.

This PR also contains code to estimate the refresh rate based on the input deltas, without reading the refresh rate from the host OS.

The delta_smooth_enabled setting can also be modified at runtime through OS::, and there is also now a command line setting to override the project setting.
2023-05-16 13:57:25 +01:00
Hugo Locurcio 9e21647578
Document seamless caveats on small textures in NoiseTexture2D and NoiseTexture3D
This also harmonizes "normal map" spelling across the class reference.
2023-05-13 01:06:33 +02:00
smix8 f986b52b3c Make navigation mesh edge connections optional
Makes navigation mesh edge connections optional.
2023-05-11 18:46:34 +02:00
smix8 a6ac305f96 Rework Navigation Avoidance
Rework Navigation Avoidance.
2023-05-10 05:01:58 +02:00
Ninni Pipping f24ef75de7 Add missing shader debug documentation 2023-05-09 21:25:08 +02:00
Rémi Verschelde 1d87b36760
Merge pull request #76824 from Calinou/doc-export-pck-binary-resource-conversion
Document caveats related to exported project binary resource conversion
2023-05-09 19:28:46 +02:00
Ninni Pipping 6bccdec7a1 Make documentation sorting use natural order 2023-05-09 17:47:52 +02:00
Rémi Verschelde 491a437df5
Merge pull request #76540 from reduz/redo-remote-filesystem
Redo how the remote filesystem works
2023-05-08 13:52:51 +02:00
Juan Linietsky 273a6eeb66 Redo how the remote filesystem works
Instead of reading files over the network, the new version uses a local file cache and only updates files when it changes.

The original remote filesystem was created 14 years ago, when ethernet was faster than hard drives or even flash. Also, mobile devices have a very small amount of storage.
Nowadays, this is no longer the case so the approach is changed to using a persistent cache in the target device.

Co-authored-by: m4gr3d
2023-05-08 11:57:54 +02:00
Hugo Locurcio febc674f48
Document caveats related to exported project binary resource conversion 2023-05-08 07:02:00 +02:00
Hugo Locurcio 5056c427d3
Improve RenderingServer, RenderingDevice, ShaderGlobalsOverride documentation
This brings the overall class reference completion percentage from 87% to 92%.
2023-05-06 22:40:32 +02:00
George Marques 0ba6048ad3
Add support for static variables in GDScript
Which allows editable data associated with a particular class instead of
the instance. Scripts with static variables are kept in memory
indefinitely unless the `@static_unload` annotation is used or the
`static_unload()` method is called on the GDScript.

If the custom function `_static_init()` exists it will be called when
the class is loaded, after the static variables are set.
2023-04-27 09:51:44 -03:00
Yuri Sizov 391eccca76 Validate code tags in documentation for potential params
Adds a check to make_rst to look for matches
between the text inside of the [code][/code] tag
and known param identifiers.
Fixes most of what was revealed.
2023-04-26 21:36:04 +02:00
Paweł 4431cdd154 Remove double thes from documentation 2023-04-17 21:45:30 +02:00
Juan Linietsky 6055e4424a Redo of Message Queue
* Functionality moved to a base class CallQueue, which will be used for inter-thread communication within the scene.
* MessageQueue now uses growing pages, starts from a single 4k page.
* Limit still exists, but because its not allocated by default, it can be much higher.
2023-04-12 16:31:23 +02:00
kobewi eac65fd0a8 Fill random docs 2023-04-03 16:02:29 +02:00
Yuri Sizov 3596443de1
Merge pull request #74727 from AThousandShips/project_settings
Exposing more project settings for documentation
2023-03-15 15:59:10 +01:00
Ninni Pipping bd30847e59 Exposing more project settings for documentation 2023-03-15 14:25:40 +01:00
Yuri Sizov c981a305a5
Merge pull request #73144 from chutchinson/bug/openxr-init-alert-dialog
Replaced OpenXR operating system alert dialog with a warning log message
2023-03-15 14:07:05 +01:00
Ninni Pipping 3de5332fcb Document `editor/naming/scene_name_casing` setting
Moved definitions of editor related project settings to `editor/register_editor_types.cpp` to make documentation work.
2023-03-09 21:17:49 +01:00
Rémi Verschelde 0b98b470cc
Merge pull request #73716 from bruvzg/improve_locale_selection
Improve layout direction/locale automatic selection.
2023-03-06 10:57:56 +01:00
Haoyu Qiu 1e0b8d6240 Hide internal settings from the classref
Default actions are no longer internal since we want to document them.
They are still hidden from the Project Setting dialog because we hid the
whole `input/` group manually.
2023-03-02 17:52:37 +08:00
Rémi Verschelde 1c1524a651
Bump version to 4.1-dev
Can't stop, won't stop, they said, huh?
2023-03-01 01:44:37 +01:00
Hugo Locurcio aea88270d5
Document the Max Clustered Elements project setting 2023-02-24 02:39:44 +01:00
bruvzg 82d7923c65
Improve layout direction/locale automatic selection. 2023-02-22 08:37:14 +02:00
bruvzg b3c64675cc
[macOS] Replace all `Alt/Option+Letter/Number` default shortcuts to avoid conflicts with special character input. 2023-02-20 22:02:47 +02:00
bruvzg 041f559da1
Exclude platform dependent `rendering/textures/vram_compression/import_*` default values from documentation. 2023-02-16 15:48:09 +02:00
Rémi Verschelde ddb1876cf7
Merge pull request #73412 from timothyqiu/doc-fixes
Fix a few typos in the class reference
2023-02-16 11:02:04 +01:00
Haoyu Qiu 431a0f20a4 Fix a few typos in the class reference 2023-02-16 13:26:17 +08:00
Travis Veralrud 10be2c343f
iOS: Fix memory leak on touch input
Replace incomplete iOS gesture with touch implementation.

Fixes #66422.
2023-02-15 09:45:38 +01:00
Chris Hutchinson cb8e919243 Replaced operating system alert dialog with a warning log message,
toggled by a project setting.
Fixes #73141
2023-02-13 18:42:43 -05:00
Hugo Locurcio 42b7739321
Document unsupported features in Mobile and Compatibility rendering methods 2023-02-13 22:17:02 +01:00
Haoyu Qiu cc384a8228 Add missing period for sentences in classref 2023-02-12 11:39:14 +08:00
Danil Alexeev 220898a69f
GDScript: Remove `treat_warnings_as_errors` project setting 2023-02-10 10:16:33 +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
bitsawer d1521933bb Expose and document ProjectSettings.get_global_class_list() 2023-02-04 23:22:27 +02: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
Rémi Verschelde afe3b94ab2
Revert "GDScript: Add warnings that are set to error by default"
This reverts commit a166833bfa.

This caused multiple regressions.
Needs to be redone with more testing before merge.

Fixes #72501.
2023-02-01 10:54:22 +01:00
Rémi Verschelde e101305950
Merge pull request #72487 from vnen/gdscript-warning-default-error
GDScript: Add warnings that are set to error by default
2023-02-01 08:23:42 +01:00
Rémi Verschelde 6749f1f85a
Merge pull request #72462 from raulsntos/docs/dotnet-renames
Fix C# examples in documentation for 4.0
2023-02-01 07:25:26 +01:00
George Marques a166833bfa
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-01 00:05:14 -03:00
Raul Santos 7eb8325180
Fix C# examples in documentation
- Fix documentation after C# renames.
- Add missing `partial` in C# class declarations.
- Change `delta` parameter type to `double` in C#.
- Ensure parameters match base declaration.
- Use `$` string interpolation in C#.
- Fix invalid or outdated C# code.
- Changed some examples to follow our style guide more closely.
2023-01-31 19:04:07 +01:00
smix8 0ab764e84b Add NavigationAgent Path Debug Visualization
Adds path debug visuals for NavigationAgent2D, NavigationAgent3D and NavigationServer.
2023-01-31 18:27:35 +01:00
Rémi Verschelde 6d9c9d30b9
Merge pull request #72206 from vnen/gdscript-allow-void-return-shorthand
GDScript: Allow void functions to return calls to other void functions
2023-01-31 15:55:35 +01:00
Rémi Verschelde 361f3f1721
Merge pull request #57520 from jordigcs/gd-rename-map
Add hint for identifiers renamed from 3.x to 4.0
2023-01-31 15:55:25 +01:00
George Marques a47d4d57ca
GDScript: Allow void functions to return calls to other void functions 2023-01-31 11:37:30 -03:00
Juan Linietsky 28f51ba547 Refactor high quality texture import
* Only two texture import modes for low/high quality now:
  * S3TC/BPTC
  * ETC2/ASTC
* Makes sense given this is the general preferred and most compatible combination in most platforms.
* Removed lossy_quality from VRAM texture compression options. It was unused everywhere.
* Added a new "high_quality" option to texture import. When enabled, it uses BPTC/ASTC (BC7/ASTC4x4) instead of S3TC/ETC2 (DXT1-5/ETC2,ETCA).
* Changed MacOS export settings so required texture formats depend on the architecture selected.

This solves the following problems:

* Makes it simpler to import textures as high quality, without having to worry about the specific format used.
* As the editor can now run on platforms such as web, Mac OS with Apple Silicion and Android, it should no longer be assumed that S3TC/BPTC is available by default for it.
2023-01-30 15:53:23 +01:00
Dmitrii Maganov 31e0ae2012 GDScript: Fix constant conversions 2023-01-29 00:01:53 +02:00
Yuri Sizov fab9926a95
Merge pull request #65137 from dalexeev/editor-naming
Rearrange `editor/naming/*` project settings
2023-01-24 22:26:03 +03:00
jordi bb9a00889a Add hint for identifiers renamed since Godot 3 2023-01-24 12:33:55 -06:00
Hugo Locurcio abcf0aaed2
Document changing V-Sync at runtime in the class reference 2023-01-23 19:00:22 +01:00
Rémi Verschelde 5b1df48c6c
Convert en_GB spelling to en_US with codespell 2023-01-23 11:02:20 +01:00
Rémi Verschelde 5726bf578d
Merge pull request #71676 from vnen/gdscript-unicode-identifiers
Add support for Unicode identifiers in GDScript and Expression
2023-01-23 10:24:33 +01:00
George Marques 7548e043fc
Add support for Unicode identifiers in GDScript
This is using an adapted version of UAX#31 to not rely on the ICU
database (which isn't available in builds without TextServerAdvanced).
It allows most characters used in diverse scripts but not everything.
2023-01-21 13:39:40 -03:00
bruvzg aade5abd4f
Reorganize main and sub-window initial position properties. 2023-01-19 13:44:06 +02:00
Raul Santos 3425d43fed
C#: Move `GLOBAL_DEF`s to CSharpLanguage ctor
Also documents the .NET project settings.
2023-01-18 21:53:58 +01:00
Yuri Sizov 682ef35787
Merge pull request #71328 from reduz/button-shortcuts-no-longer-press
Button shortcuts no longer "press" the Button.
2023-01-14 00:14:51 +03:00
Juan Linietsky dd3a1b08a9 Button shortcuts no longer "press" the Button.
* Button shortcuts were treated as generic input events on buttons. This means that to activate a button shortcut you had to press and release.
* This logic is removed and now shortcuts always activate on press.
* This makes the editor feel more responsive and solves problems related to this behavior.

Fixes #45033 and possibly others.
2023-01-13 18:43:02 +01:00
Juan Linietsky 6f0e210093 Refactor ProjectSetting overrides
* Overrides no longer happen for set/get.
* They must be checked with a new function: `ProjectSettings::get_setting_with_override()`.
* GLOBAL_DEF/GLOBAL_GET updated to use this

This change solves many problems:
* General confusion about getting the actual or overriden setting.
* Feature tags available after settings are loaded were being ignored, they are now considered.
* Hacks required for the Project Settings editor to work.

Fixes #64100. Fixes #64014. Fixes #61908.
2023-01-13 15:13:56 +01:00
Danil Alexeev 8f706be6fa
Rearrange `editor/naming/*` project settings 2023-01-12 11:41:13 +03:00
bruvzg 2718a7b7d3
Add support for the custom initial screen for the main window, fix primary screen detection. 2023-01-07 11:14:35 +02: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
Marius Hanl 5aa243f9da Added the possibility to define a default value in ProjectSettings.get_setting(), which is used when no setting is set.
Also added tests for the project settings.

Co-authored-by: Yuri Sizov <11782833+YuriSizov@users.noreply.github.com>
2022-12-21 19:49:57 +01:00
Rémi Verschelde d25a64ffca
Merge pull request #70204 from Calinou/ios-remove-disable-touch-setting
Remove Disable Touch debug project setting
2022-12-17 20:56:28 +01:00
Hugo Locurcio 70f6d42c92
Remove Disable Touch debug project setting
This project setting was only implemented and iOS and likely served
no purpose outside of debugging during development of engine features.

It was also located in a confusing location in the project settings
editor, as it was located below a root category (which appears in bold
and is normally not seen as clickable by users).
2022-12-17 18:47:29 +01:00
Hugo Locurcio a3eac5fc7c
Move transparent background project setting to a subsection
This prevents the project setting from being located directly within
a root category, which is confusing from an UX perspective in the
project settings editor.
2022-12-17 18:45:21 +01:00
clayjohn 5b5cd2b98b Remove high quality glow as it is not any higher quality than regular glow 2022-12-13 10:15:45 -08:00