Commit graph

58057 commits

Author SHA1 Message Date
KurtBliss
bb98843b61 Fixed: TextFile's not reloading when changed from external editors 2023-09-06 17:34:36 -04:00
Yuri Sizov
d8ff69d53c Extract ScriptInstance to simplify includes
This allows to include script_instance.h directly in the
generated gdvirtual.gen.inc, and remove excessive includes
from the codebase.

This should also allow Resource to use GDVIRTUAL macros,
which wasn't possible previously due to a circular dependency.
2023-09-06 22:54:38 +02:00
Yuri Sizov
fc01e2e7f6 Add a theme preview switcher to the 2D viewport
This commit adds a new View submenu that allows switching
between the project theme (default), the editor theme, and
the default theme. The last selected option is stored per
project and is restored when reloading the project.
2023-09-06 19:40:43 +02:00
Yuri Sizov
512182f147 Add theme contexts to various parts of the editor
This change defines additional theme contexts for editor
branches to prevent theme leaking between the default
theme, the project theme, and the editor theme.

- Both editor window and EditorNode define an editor-specific
context with the editor theme and the default theme.
- The 2D viewport defines a project-specific context with
the project theme and the default theme.
- Theme editor preview tabs define the default-only context
with the default theme.

Additionally, the default theme context now only includes
the project theme for running projects (both export and debug).
This prevents the project theme from leaking into the editor.

This commit also does a little clean up on the theming aspects
of the EditorNode.
2023-09-06 19:40:43 +02:00
Yuri Sizov
58126e479c Introduce the concept of global theme contexts
This commit adds the default theme context, which replaces
the need to manually check the project and the default theme
all the time; simplifies related code.

It also adds framework for custom theme contexts, to be used
by the editor. Custom contexts can be attached to any node,
and not necessarily a GUI/Window node. Contexts do no break
theme inheritance and only define which global themes a node
uses as a fallback.

Contexts propagate NOTIFICATION_THEME_CHANGED when one of their
global themes changes. This ensures that global themes act just
like themes assigned to individual nodes and can be previewed
live in the editor.
2023-09-06 19:40:43 +02:00
A Thousand Ships
380db4d03e Remove unnecessary validity checks from Button and TextureRect
The one in `TextureRect` appears to be a leftover from earlier code, and
the one in `Button` was copied from there.
2023-09-06 16:39:06 +02:00
Dario
9b91750fb1 Fix mipmap bias behavior by refactoring how samplers are created by Material Storage.
Introduces a new structure to store samplers created with certain parameters instead of storing a 'custom' set of samplers. Allows viewports to correctly configure the mipmap bias and use it when rendering the scene.
2023-09-06 11:24:19 -03:00
Yuri Sizov
8449592d92
Merge pull request #81336 from YuriSizov/editor-true-base-icon-lookup
Check the native base of scripts when resolving icons
2023-09-06 16:10:33 +02:00
bitsawer
3c042fb99f Fix shader language preprocessor include marker handling 2023-09-06 16:57:40 +03:00
Yuri Sizov
21c5f86d5d Check the native base of scripts when resolving icons 2023-09-06 15:20:07 +02:00
Yuri Sizov
2282fc5de9 Merge pull request #81368 from m4gr3d/relax_android_plugin_v1_deprecation
Relax restriction on loading v1 Android plugins on Godot 4.2+
2023-09-06 14:49:43 +02:00
Yuri Sizov
2ced50f310 Merge pull request #81365 from bruvzg/ios_export_ext
[iOS export] Switch export target extension based on export type.
2023-09-06 14:49:40 +02:00
Yuri Sizov
3a585a6bcf Merge pull request #81346 from timothyqiu/interning
Avoid text substitution in EditorHelp messages
2023-09-06 14:49:37 +02:00
Yuri Sizov
008dc63fe6 Merge pull request #81344 from AThousandShips/folder_color_fix
Fix saving editor folder colors
2023-09-06 14:49:34 +02:00
Yuri Sizov
07176632a6 Merge pull request #81339 from bruvzg/macos_fix_mvk_live_resize
[macOS] Fix live resize with the latest MoltenVK version.
2023-09-06 14:49:30 +02:00
Yuri Sizov
4ac6b648b4 Merge pull request #81337 from RedworkDE/ci-compat-fetch
CI: Compat checks: Make fetching the reference API more robust
2023-09-06 14:49:27 +02:00
Yuri Sizov
d2cc6897d4 Merge pull request #81299 from jsjtxietian/Reload-built_in-script-after-create-to-allow-drag-nodes-into-it
Fix an error when dragging nodes into built-in scripts because script does not inherit Node
2023-09-06 14:49:24 +02:00
Yuri Sizov
c5562d1058 Merge pull request #81288 from darksylinc/matias-index16
Use 16-bit index buffers instead of 32 when unnecessary
2023-09-06 14:49:20 +02:00
Yuri Sizov
16957fd35b Merge pull request #81286 from lemilonkh/unshaded-materials-ignore-fog
Implement render mode `fog_disabled` and BaseMaterial3D setting Disable Fog
2023-09-06 14:49:16 +02:00
Yuri Sizov
6f87ab7244 Merge pull request #81268 from timothyqiu/icon-scale-changes
Fix ItemList not updating when icon scale changes
2023-09-06 14:49:13 +02:00
Yuri Sizov
102f42a48d Merge pull request #81121 from jsjtxietian/fix-crash-in-make_mesh_previews
Fix a crash when enable a tool plugin uses `make_mesh_previews`
2023-09-06 14:49:09 +02:00
Yuri Sizov
356624ce6d Merge pull request #80807 from aaronfranke/gltf-skin-mesh-comment
GLTF: Add a comment for skinned mesh tree placement
2023-09-06 14:49:06 +02:00
Yuri Sizov
3c63dce3cd Merge pull request #80573 from KoBeWi/2k_lines_of_changes_created_at_2AM
Add EditorStringNames singleton
2023-09-06 14:49:02 +02:00
Rémi Verschelde
bceac8c34f
Merge pull request #81340 from akien-mga/web-workaround-emscripten-3.1.42-lto-bug
Web: Workaround Emscripten 3.1.42+ LTO regression
2023-09-06 13:50:39 +02:00
Fredia Huya-Kouadio
12d96eeaef Relax restriction on loading v1 Android plugins on Godot 4.2+ 2023-09-06 02:59:44 -07:00
bruvzg
26951000ab
[iOS export] Switch export target extension based on export type. 2023-09-06 11:58:43 +03:00
bruvzg
1cb63fc719
[TextServer] Use locale or first span language to select preferred direction for neutral text. 2023-09-06 08:50:08 +03:00
jsjtxietian
7e3a762369 Fix a crash when enable a plugin uses make_mesh_previews
The bug happens when plugin tree is propagating mouse events
(so it is blocked), but EditorProgress's dtor will make main editor
focused and call update_plugins immediately
 which will update the blocked tree.
2023-09-06 11:11:07 +08:00
jsjtxietian
d32348c686 Reload built-in script after create to allow dropping nodes into it 2023-09-06 10:03:27 +08:00
Alexander Hartmann
40046bcf60 Fix go to parent folder in EditorFileDialog 2023-09-06 01:01:04 +02:00
Rémi Verschelde
0a7f75ec7b
Merge pull request #80740 from m4gr3d/godot_android_plugin_refactor_main
Godot Android plugin re-architecture
2023-09-06 00:09:07 +02:00
Aaron Franke
908716529d
GLTF: Add a comment for skinned mesh tree placement
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2023-09-05 12:19:31 -05:00
Milan Gruner
45a33cc749 Implement render mode fog_disabled and BaseMaterial3D setting Disable Fog 2023-09-05 18:15:02 +02:00
Haoyu Qiu
e350034251 Avoid text substitution in EditorHelp messages 2023-09-05 23:15:34 +08:00
A Thousand Ships
1083ce4466 Fix saving editor folder colors
Also clears setting if none are assigned
2023-09-05 16:57:15 +02:00
ajreckof
19632eaf50 Change precedence in rules to make location after proper casing. 2023-09-05 16:16:21 +02:00
RedworkDE
e36bd595fa CI: Compat checks: Make fetching the reference API more robust 2023-09-05 15:27:44 +02:00
bruvzg
208b379986
[macOS] Fix live resize with the latest MoltenVK version. 2023-09-05 16:21:08 +03:00
Yuri Sizov
332bc469c4 Merge pull request #81330 from timothyqiu/unmatched-brackets
Fix unmatched brackets in the documentation
2023-09-05 15:14:39 +02:00
Yuri Sizov
95b00b11b0 Merge pull request #81328 from bruvzg/str_minus_zero
[String] Fix string conversion for -0.0 float values.
2023-09-05 15:14:36 +02:00
Yuri Sizov
59d3a36fbe Merge pull request #81327 from bruvzg/hb811
HarfBuzz: Update to version 8.1.1
2023-09-05 15:14:33 +02:00
Yuri Sizov
14cfed57b5 Merge pull request #81326 from bruvzg/font_update
Update and properly list versions of the built-in fonts.
2023-09-05 15:14:30 +02:00
Yuri Sizov
36cc4754f5 Merge pull request #81305 from YuriSizov/theme-fix-tests-shadowing
Fix ThemeDB initialization in tests
2023-09-05 15:14:27 +02:00
Yuri Sizov
3604b46bda Merge pull request #81300 from bitsawer/fix_empty_shader_handling
Fix empty shader resource loading
2023-09-05 15:14:24 +02:00
Yuri Sizov
cfdc016038 Merge pull request #81296 from AThousandShips/blend_fix
Fix incorrect cast when animating `int`
2023-09-05 15:14:21 +02:00
Yuri Sizov
d90918194f Merge pull request #81295 from aaronfranke/fix-compile-no-3d
Fix compiling with 3D disabled due to unused navigation variable
2023-09-05 15:14:17 +02:00
Yuri Sizov
c9bf824124 Merge pull request #79166 from bruvzg/ts_dict_chk
[TextServer] Remove excessive Dictionary checks.
2023-09-05 15:14:14 +02:00
Rémi Verschelde
b064008c07
Web: Workaround Emscripten 3.1.42+ LTO regression
Fixes #80010.
2023-09-05 14:58:52 +02:00
Danil Alexeev
f2f0375e10
Fix RDPipelineColorBlendState.attachments setter 2023-09-05 15:29:56 +03:00
bruvzg
2b3bbde6da
[String] Fix string conversion for -0.0 float values. 2023-09-05 11:32:55 +03:00