Commit Graph

120 Commits

Author SHA1 Message Date
6f25babd6b Remove empty constructors and destructors from editor/ 2025-03-17 21:20:02 +01:00
501fc1a6ff Editor: Fix crash when using --import --verbose due to use-after-free 2025-01-06 07:46:51 -07:00
a1846b27ea Improve use of Ref.is_null/valid
Use `is_null` over `!is_valid` and vice versa.
2024-12-23 16:35:02 -05:00
f241c1fda0 Remove unused header in editor.
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:38 +08:00
d58b2e879f Get rid of easily removable uses of const_cast 2024-12-01 17:50:13 -08:00
74611a74d1 Generate editor thumbnails on imported scenes. 2024-11-24 10:23:56 -08:00
e2c6daf7ef Implement asynchronous transfer queues, thread guards on RenderingDevice. Add ubershaders and rework pipeline caches for Forward+ and Mobile.
- Implements asynchronous transfer queues from PR #87590.
- Adds ubershaders that can run with specialization constants specified as push constants.
- Pipelines with specialization constants can compile in the background.
- Added monitoring for pipeline compilations.
- Materials and shaders can now be created asynchronously on background threads.
- Meshes that are loaded on background threads can also compile pipelines as part of the loading process.
2024-10-02 15:11:58 -03:00
06791e1acd New Quick Open Dialog
- Updated list view with thumbnails, and separate file name.
  - Added a grid view which has larger icons.
  - Added toggle to filter out files from addons.
  - Store history for each opened resource type.

New Editor settings for Quick Open:
  - Startup display mode (grid or list):
      - Determined by the requested resource type.
      - Whatever was last used.
  - Toggle to filter out files from addons (for persistence).

Notes
  - The dialog is now created once in EditorNode, and globally available for other components.
  - A fixed number of result scenes are instantiated, and reused based on query.
  - Drop support for multiselect.
2024-10-01 21:39:16 +02:00
f31867d2b9 EditorResourcePreview: Let loads complete after exit requested 2024-09-13 12:19:06 +02:00
28e7069ee0 Keep looking when a preview plugin returns an empty image.
EditorResourcePreviewGenerator::_generate says that
"Returning an empty texture is an OK way to fail and
let another generator take care."

This patch enables that behavior.
2024-09-01 15:17:49 -07:00
78ba8b2804 Fix certain resource previews empty with GL compat
As an additional fix, the preview render request now ignores the main viewport hierarchy so previews don't pay the cost of re-rendering the whole editor and descendant viewports.
2024-07-22 14:44:14 +02:00
20d67aac67 Remove unused order variable from EditorResourcePreview 2024-06-07 15:54:47 +02:00
e62ca29da9 Add a way to invalidate preview cache 2024-04-26 16:57:45 +02:00
7319b612f3 Speed up inspector updates for TileMap 2024-03-07 18:01:30 +01:00
1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
91f0a65fc9 Rework viewport capture in preview generation 2024-02-21 10:44:21 +01:00
95102519b4 Fix resource previews not created in compatibility rendering
See e5454cd660 (r138705235).

Fixes #88170.
2024-02-16 08:27:03 +01:00
c848bfc1bb Benchmark resource preview generator with a verbose print 2024-01-26 18:55:45 +01:00
95b27fe8c7 Reorganize code related to editor theming
This change introduces a new EditorThemeManager class
to abstract theme generatio and its subroutines.

Logic related to EditorTheme, EditorColorMap, and editor
icons has been extracted into their respective files with
includes cleaned up.

All related files have been moved to a separate folder to
better scope them in the project. This includes relevant
generated files as well.
2024-01-16 11:57:45 +01:00
e5454cd660 Run resource previewer on the main thread if using GL compatibility 2024-01-16 10:01:41 +01:00
0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
e90ea87b42 Abort threaded preview generators on exit 2023-11-10 15:31:43 +01:00
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
6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
4ed08409b0 Merge pull request #78108 from aaronfranke/variant-util-header
Make a header for VariantUtilityFunctions
2023-08-03 14:46:29 +02:00
7e21eb7e00 Extract and reorganize texture resource classes 2023-07-14 20:04:21 +02:00
7e9b5e59d4 Make a header for VariantUtilityFunctions 2023-06-12 11:29:42 -05:00
8cfa19a078 Merge pull request #77000 from reduz/make-more-base-nodes-thread-safe
Make more base nodes thread safe
2023-05-16 00:31:56 +02:00
0a9f72d5a8 Make more base nodes thread safe
Ongoing work to make more of the base nodes thread safe.
2023-05-15 16:54:10 +02:00
27dccf1b5e Enhance filesystem dock tooltips 2023-05-12 19:28:34 +02:00
04317e9ced Add metadata to resource previews 2023-05-10 14:03:10 +02:00
e395eaf447 Fix editor resource preview deadlocking with --headless mode 2023-02-23 20:57:19 +00:00
d95794ec8a One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
5947f22be9 Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
0103af1ddd Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
10a56981dc Rename String plus_file to path_join 2022-08-29 19:38:13 -05:00
c3606cb5f3 Swap arguments of ResourceSaver.save() 2022-07-29 19:53:09 +02:00
d2900429e8 Add static methods for creating Image and ImageTexture 2022-07-08 13:40:47 +02:00
652adcd5bf Basic 3D rendering 2022-05-12 10:37:27 -07:00
180e5d3028 Remove RES and REF typedefs in favor of spelled out Ref<>
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
4bf99f4af2 Narrow FileAccess scope to prevent deadlocks. 2022-04-12 10:54:39 +03:00
9381acb6a4 Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
11572c6e30 Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
fe52458154 Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
49403cbfa0 Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
e3491a3744 Add GLES2 2D renderer + Linux display manager
First implementation with Linux display manager.

- Add single-threaded mode for EditorResourcePreview (needed for OpenGL).

Co-authored-by: clayjohn <claynjohn@gmail.com>
Co-authored-by: Fabio Alessandrelli <fabio.alessandrelli@gmail.com>
2021-10-30 02:05:48 +02:00
bcf4a56c74 Replace references to VisualServer in code comments with RenderingServer
VisualServer no longer exists in the `master` branch.
2021-10-07 15:49:41 +02:00