Commit graph

843 commits

Author SHA1 Message Date
lawnjelly
1b5fa74e39 Discrete Level of Detail
Add scene side discrete level of detail.

New node `LOD` for UI, and `LODManager` within `World` for automatically updating child visibilities based on distance from cameras.
2024-02-10 18:54:25 +00:00
lawnjelly
8b79135538 Add MergeGroup node to simplify merging Meshes at runtime 2024-01-31 08:28:51 +00:00
James
6782738a85 Prevent using name with leading dot when create/rename/duplicate scene/folder/script/resource
Fixes #62497
2024-01-06 19:36:14 +01:00
Haoyu Qiu
392f65fe09 Fix inconsistent file dialog settings usage 2023-04-25 09:27:26 +08:00
Fredia Huya-Kouadio
f3cdff46fc Add benchmark logic
Add benchmarking measuring methods to `OS` to allow for platform specific overrides (e.g: can be used to hook into platform specific benchmarking and tracing capabilities).
2023-03-20 23:29:36 -07:00
lawnjelly
0876a16bde Default update_vital_only to true for Android and Web editor
Android devices will typically be powered from battery. This PR defaults the editor on Android to use `update_vital_only` mode, using as little power as possible, in order to conserve battery.
Also shows the update spinner by default, to emphasize that vital updates only is occurring, and allow easy switching out of the mode.
2023-02-09 17:58:18 +00:00
Rémi Verschelde
1426cd3b3a
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".

Backported from #70885.
2023-01-10 15:26:54 +01:00
Haoyu Qiu
433be4aa3e Add open scene button in Inspector for PackedScene resource 2022-12-12 16:10:00 +08:00
Rémi Verschelde
4d5ef72669
Merge pull request #69434 from timothyqiu/editor-title
[3.x] Update project window title when a project setting was changed
2022-12-01 18:13:58 +01:00
Marius Hanl
9ea2ef7c44 Update project window title when a project setting was changed
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2022-12-01 12:54:10 +08:00
Rémi Verschelde
7f0b3bc2a0 Add editor setting for AcceptDialog OK/Cancel buttons positioning
The position (left/right) of the Cancel and OK buttons in AcceptDialog
are DisplayServer specific, as Windows uses OK/Cancel and macOS uses Cancel/OK.

Linux/X11 currently uses the macOS convention which is also the GTK+/GNOME one,
though it's not consistent with Qt/KDE applications which follow the Windows
convention.

Since that can't satisfy everyone, it's best if it's configurable also for the
editor (it's already configurable for the project).

Fixes #59379.

(cherry picked from commit 9bb05de89f)
2022-12-01 09:50:51 +08:00
Alfred Reinold Baudisch
d3735d8b21
Cast dragged file extension name to lowercase, closes #68104
(cherry picked from commit 07e367cb0b)
2022-11-30 15:34:27 +01:00
Hendrik Brucker
ea46617f12 Add Gradient resource preview generator
Co-Authored-By: Haoyu Qiu <timothyqiu32@gmail.com>
2022-11-22 13:25:54 +08:00
Jean-Michel Bernard
79ebba0f6b [3.x] Prevent docks to be reset to first tab when switching dock visibility 2022-11-03 13:02:11 +01:00
Fredia Huya-Kouadio
1f23bac645 Disable menus and functionality that are not relevant on the Android Editor port 2022-09-13 07:38:07 -07:00
Fredia Huya-Kouadio
4be7c91cd9 Fix issue causing the project manager to crash because of missing path argument
In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
2022-09-07 14:25:22 -07:00
reduz
2c92594fa6 Simplify Subresource Saving
Redo edited subresource (and resource) saving in a much more simplified way.
I think this should work (unless I am missing something) and be faster than what is there.
It should also supersede #55885.

I am not 100% entirely convinced that this approach works, but I think it should so please test.

(cherry picked from commit 9eb5f2a0d7)
2022-08-24 17:52:15 +02:00
Pedro J. Estébanez
4dd3e95377 Overhaul CLI argument forwarding to processes started by the editor 2022-08-19 11:13:56 +02:00
Alfred R. Baudisch
c574f718b1 Display sub-plugins when Stay in Script Editor is On
Currently, with stay_in_script_editor_on_node_selected as On, inspector_only is forcibly set, and no editors from the node selected are displayed.

With this change, if the selected Node has a Main Editor, it's still not shown (the intended behaviour of the feature), but the sub-editors are shown, this correctly opens the AnimationPlayerEditor plugin and other sub-plugins.

Fixes and closes #63621.

(cherry picked from commit eaaedb24a3)
2022-08-03 15:02:57 +02:00
Pedro J. Estébanez
27aa752335 Keep crash handler status on editor restart
(cherry picked from commit 116f03a1b6)
2022-07-27 15:23:50 +02:00
Alfred R. Baudisch
f00ee23b7a Script Editor: Don't switch to 2D/3D viewports when selecting nodes
Selecting nodes in the Scene dock automatically switches to the relevant 2D
or 3D viewport. This behavior can be annoying while using the Script Editor
and wanting to inspect node properties, so it's now disabled by default when
the Script Editor is active.

This new behavior can be changed back to the previous auto-switching using
the `text_editor/navigation/stay_in_script_editor_on_node_selected` editor
setting.

(cherry picked from commit c4433c3793)
2022-07-26 11:01:53 +02:00
Rémi Verschelde
818f1eed31 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 14:53:37 +02:00
bruvzg
d6698c1f81 [Command line export] return 0 exit code when export is finished with warnings.
(cherry picked from commit d02bf7584a)
2022-07-25 11:32:59 +02:00
Rémi Verschelde
875a0dba5a AssetLib: Only notify when unavailable in verbose mode
(cherry picked from commit dc86bce306)
2022-07-08 16:42:03 +02:00
Fabio Alessandrelli
ad5fdcc0f3 [AssetLib] Fix crash in Web editor.
Add EditorAssetLibrary::is_available which always returns false in the
Web editor and use it in EditorNode for detection.

(cherry picked from commit 0e504e4191)
2022-07-08 14:37:35 +02:00
Rémi Verschelde
f089f77c2a Android: Refactor Custom Build options in export preset
Instead of reusing the custom_template/ prefix which is actually only
used for the prebuilt APK workflow, we add a new custom_build/ prefix.

This is a slight compat breakage (users will have to redo their config)
but enables us to group the Min SDK and Target SDK options where they make
sense, and avoid reusing the previously hardcoded Target SDK 30 from
Godot 3.4.

Those two options are now strings instead of integers so that we can keep
them empty by default, and show their default value using a placeholder.
So some validation has been added to make sure they are proper ints.
The upper bound on Target SDK was also removed as it's a common use case
to use it to try to target newer released SDKs. But we warn the user that
this wasn't validated by us.

The export info dialog is now exclusive so that when it doesn't auto-close,
i.e. when it errors, you don't close it by mistake by clicking outside.

Fixes #62465.
2022-07-03 17:09:41 +02:00
cow-neaz
92ffbceee1 Stop game on reloading project
(cherry picked from commit 8935cf17cf)
2022-06-20 14:56:57 +02:00
Rémi Verschelde
acd4a01b8c ProjectSettings: Ensure 'editor/' settings aren't nested
Having a mix of settings with and without subcategory makes the 'Editor'
section stand out with a weird UX, as instead of simply being a foldable
section like the others, it also holds its own top-level settings and is
therefore selectable.

This wasn't the case in 3.4, and is fixed in 4.0 by refactoring, so for
3.5 we should preserve the 3.4 UX, even if it's not the best.
2022-06-19 11:47:19 +02:00
bruvzg
f5fa1ca944
Add readable export errors. Add RTL image vertical alignment support. 2022-06-08 17:56:28 +03:00
Rémi Verschelde
78c54043ce HTML5: Always disable Asset Library
GitHub doesn't allow CORS so we can't download assets from it.

There'd also be more work needed for the Asset Library plugin to be
usable in the Web editor even if that was supported.

(cherry picked from commit 42b48496de)
2022-05-25 14:51:43 +02:00
Red Headphone
a0acb41379 fix: no quit confirmation on project reload if files are saved 2022-05-10 14:02:55 +05:30
kobewi
7c6203a60e Cache script icons in editor
(cherry picked from commit 3f50dad460)
2022-05-05 15:54:58 +02:00
Haoyu Qiu
92256df9fb Load fallback icon for custom class when no icon available
(cherry picked from commit ba90778f1c)
2022-05-05 13:43:39 +02:00
FireForge
e8d1552af2 Add an inspector preview for BitMap 2022-05-02 09:16:34 +08:00
Hugo Locurcio
2bc036dad5 Add an external link editor icon
This replaces the existing "chainlink" instance icon that was
used for external links. That icon is still used for scene instancing.

The icon was designed by redlamp.

Co-authored-by: Taylor Wright <taylor@redlamp.org>
(cherry picked from commit 5626d026d8)
2022-04-27 12:30:31 +02:00
Haoyu Qiu
d088128b43 Remove duplicate editor settings definitions 2022-04-27 15:26:46 +08:00
Rémi Verschelde
ac24644464
Merge pull request #60536 from timothyqiu/class-name-icon-3.x
[3.x] Fix custom class icon when it inherits from a script
2022-04-27 08:06:02 +02:00
Rémi Verschelde
1f7a2328a3
Merge pull request #59338 from fire-forge/raycast2d-editor-3.x
[3.x] Add an editor handle for `RayCast2D.cast_to`
2022-04-27 07:57:00 +02:00
Haoyu Qiu
42448d7587 Fix custom class icon when it inherits from a script 2022-04-27 10:01:08 +08:00
Haoyu Qiu
8d9071542b Localize unnamed project name in editor window title
(cherry picked from commit 35d0878139)
2022-04-13 11:43:49 +02:00
Vitika9
8d1827cf7c Made reload current project ask for confirmation with unsaved changes
(cherry picked from commit eb81ac8fc5)
2022-03-29 00:03:53 +02:00
Fredy Huya-Kouadio
cb0b2aefc3 Android port of the Godot Editor
These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices.
UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback.

Co-authored-by: thebestnom <shoval.arad@gmail.com>
2022-03-28 07:54:10 -07:00
Haoyu Qiu
b1044b9b86 Add property name style toggle to Inspector 2022-03-28 17:10:41 +08:00
Haoyu Qiu
37d4306c2e Update SceneTree debug colors when settings changed 2022-03-28 10:49:13 +08:00
FireForge
da18e44803 Add a RayCast2D.cast_to editor handle 2022-03-19 23:23:11 -05:00
FireForge
d76c9f8d92 Add a GradientTexture2D editor plugin 2022-03-18 13:18:10 -05:00
Rémi Verschelde
153a068958
Merge pull request #58634 from timothyqiu/property-i18n-3.x 2022-03-10 21:08:38 +01:00
Haoyu Qiu
2c3646b37b Add missing i18n to various strings
(cherry picked from commit 25d93200c8)
2022-03-10 19:01:52 +01:00
Haoyu Qiu
aaff2e3982 i18n: Make property paths and sections translatable
Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2022-03-03 15:33:46 +08:00
Hugo Locurcio
92e6c2a33d Use versioned URL for "Online Documentation" buttons in the editor
This also avoids a redirect, making the page appear to load faster.

(cherry picked from commit 958912a33f)
2022-02-19 15:49:26 +01:00