Commit graph

457 commits

Author SHA1 Message Date
Yuri Sizov 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
kobewi 0e8f90f4c8 Update deferred calls to use Callables 2024-01-09 16:11:47 +01:00
Rémi Verschelde c772a5b050
Merge pull request #78960 from kleonc/inspector-follow-focus
Make editor inspector follow focus
2024-01-04 16:38:46 +01:00
Rémi Verschelde 6c390b620d
Merge pull request #84445 from Rubonnek/add-const-references-clang-tidy
Add const references detected by clang-tidy
2024-01-04 14:25:33 +01:00
kobewi ce9fec9b4d Improve editing of min/max particle properties 2023-12-20 06:31:08 +01:00
Wilson E. Alvarez a3cb1b096f
Add const references detected by clang-tidy 2023-12-16 13:36:44 -05:00
kobewi 6e31c413b6 Add descriptions for tile properties 2023-12-07 16:57:34 +01:00
Yuri Sizov 215e036600 Add bulk change guards to successive theme overrides in Editor and GUI 2023-10-19 18:14:14 +02:00
Danil Alexeev f56532c577
Editor: Fix some issues with EditorHelpTooltip 2023-10-10 20:02:47 +03:00
kobewi a6de7a8a3f Allow contextual plugins to persist temporarily 2023-10-06 15:58:50 +02:00
kobewi 09b30be86d Add vararg call() method to C++ Callable 2023-10-05 11:35:29 +02:00
Michael Alexsander ae91644c73
Revamp how documentation tooltips work 2023-10-03 17:40:51 -03:00
Jack Wilsdon 4a33a51ea4 Use theme icon size when calculating category minimum size
This previously used the underlying size of the icon, causing the
category to grow incorrectly when re-rendered.

Fixes #82527
2023-09-29 18:50:32 +01:00
Wilson E. Alvarez c844988e40
Expose EditorInspector::get_edited_object to GDScript 2023-09-23 09:47:07 -04:00
A Thousand Ships 75ee58fd04 [Editor] Replace ERR_FAIL_COND with ERR_FAIL_NULL where applicable 2023-09-15 20:15:39 +02:00
Haoyu Qiu b8b0339549 Improve undo action names
* Avoid concating strings manually for better i18n and easy l10n
   * Use `vformat` when possible
   * Use separate strings if the changing part is only a few hardcoded strings
* Don't put a period at the end of the name
2023-09-12 18:53:50 +08:00
Rémi Verschelde d6d8cb1a17
Merge pull request #81408 from jsjtxietian/fix-property-array-tooltip-shows-wrong-ID-on-later-pages
Fix property array tooltip shows wrong ID on later pages
2023-09-07 14:04:58 +02:00
jsjtxietian d4ac65bc48 Fix property array tooltip shows wrong ID on later pages
Also do some cleanup, use`element_position` instead of
`begin_array_index + i`
2023-09-07 19:04:28 +08:00
kobewi 6de34fde27 Add EditorStringNames singleton 2023-09-03 19:58:18 +02:00
Rémi Verschelde fa3428ff25
Merge pull request #81221 from dalexeev/editor-inspector-and-signal-dock-improvements
Editor: Inspector and Signal docks improvements
2023-09-03 00:21:04 +02:00
Danil Alexeev c33ca26e17
Editor: Inspector and Signal docks improvements 2023-09-02 08:50:28 +03:00
Rémi Verschelde 5588980e47
Merge pull request #80184 from MewPurPur/gray=abstract
Use the gray color for all abstract classes
2023-09-01 16:00:58 +02:00
MewPurPur 398ca4e71a Use the gray color for all abstract classes 2023-08-31 12:59:18 +03:00
Rémi Verschelde c1e85c6593
Merge pull request #80617 from jmb462/fix_80524
Add buttons to reorder inspector array items without dragging
2023-08-29 12:43:34 +02:00
Jean-Michel Bernard a871679aac Add buttons to reorder inspector array items without dragging 2023-08-27 13:18:16 +02:00
Yuri Sizov 2445414aa0 Avoid unnecessary inspector updates when loading or switching scenes
This should result in some noticeable performance improvements,
aside from fixing bugs due to conflicts in logic.
This also simplifies some related code identified while debugging.
2023-08-12 13:32:59 +02:00
kobewi 7f41403a6f Standardize dialog input validation as a new class 2023-08-08 16:14:35 +02:00
Hendrik Brucker a29a680920 Extract StyleBoxFlat, StyleBoxTexture and StyleBoxLine in their own file 2023-07-17 13:25:00 +02:00
kleonc c6e895050d Make editor inspector follow focus 2023-07-02 22:36:08 +02:00
MewPurPur c0453a544d Fix enum tooltip with no description 2023-06-21 19:18:08 +02:00
Gilles Roudière 41890ff9c3 Fix compilation on gcc13 2023-06-16 19:24:04 +02:00
lawnjelly b69c8b4791 Single Compilation Unit build.
Adds support for simple SCU build (DEV_ENABLED only).
This speeds up compilation by compiling multiple cpp files within a single translation unit.
2023-06-06 15:36:51 +01:00
Yuri Sizov 5b5186383e
Merge pull request #77148 from ajreckof/prevent_unselectable_editor_property_from_being_selected_on_RMB
Prevent selecting unselectable `EditorProperty` with RMB
2023-06-02 13:10:36 +02:00
Yuri Sizov fc83a2e323
Merge pull request #71843 from Rindbee/do-not-cache
Do not cache the doc information written by user in the script in Inspector
2023-05-29 17:23:48 +02:00
kobewi adf427c806 Translate inspector changes indicator 2023-05-26 15:55:51 +02:00
ajreckof 088435ab78 prevent selecting unselectable EditorProperty with RMB 2023-05-17 05:56:24 +02:00
Rémi Verschelde f868b4781b
Merge pull request #76684 from KoBeWi/this_branch_is_meta
Add background panel to new meta dialog
2023-05-16 11:00:21 +02:00
Samuele Panzeri a103cd76bb Fix skeleton 3d editor crash in RC3
Control notifies a theme changed before the editor has entered the tree
2023-05-15 12:12:48 +02:00
kobewi b732c2b341 Add background panel to new meta dialog 2023-05-03 00:21:05 +02:00
Rindbee fd75bb562e Do not cache the doc information written by user in the script in Inspector
The doc information of the edited object is cached to reuse it in the next `EditorInspector::update_tree()` call.

This is not suitable for doc information written by users in the script because it is easily changed.
2023-05-02 05:53:09 +08:00
Haoyu Qiu d24ee551ec Allow EditorInspector to change its property name style when necessary
Previously, an EditorInspector's property name can only be set from
outside. Inspectors used for settings needs to respond to changes in
editor settings. So a few boilerplate code is almost always needed,
including watching for a certain editor setting in `_notification()`.

This commit adds a `set_use_settings_style()` function to tell the
inspector to watch for editor settings changes on its own.
2023-04-29 10:51:00 +08:00
Rémi Verschelde 8cc1762398
Merge pull request #76105 from anvilfolk/tooltip
Fix @export variable tooltips not showing up in Inspector in scripts with inner classes
2023-04-25 09:59:06 +02:00
ocean (they/them) 4bfd539f99 Fix @export variable tooltips not showing up in Inspector when there is
an inner class
2023-04-21 08:39:47 -04:00
Rémi Verschelde 1f5811eb03
Merge pull request #76238 from Calinou/editor-inspector-tooltip-display-enum-descriptions
Display enum value descriptions in the editor inspector help tooltips
2023-04-20 12:42:30 +02:00
Hugo Locurcio 76c0a3fea0
Display enum value descriptions in the editor inspector help tooltips
This makes it possible to see what each value does without having
to open a documentation tab.

Some enum value names may be mismatched as the API doesn't always
match the property hint used in the editor.
2023-04-19 22:56:48 +02:00
bruvzg 0088981c40
[Export] Add readable descriptions and validation warnings to the export options. 2023-04-19 08:35:59 +03:00
Rémi Verschelde bba753db0d
Merge pull request #75938 from YuriSizov/editor-no-spammy-icons
Prevent errors in the Inspector when looking for script icons
2023-04-11 19:41:07 +02:00
Rémi Verschelde 347a8e20ae
Merge pull request #69324 from RedMser/advanced-settings-errors
Make it easier to solve warnings/errors referring to project settings
2023-04-11 19:39:53 +02:00
Yuri Sizov 5e6ce7826a Prevent errors in the Inspector when looking for script icons 2023-04-11 16:51:20 +02:00
Rémi Verschelde 726c3c1bed
Merge pull request #75559 from ajreckof/Fix-descriptions-not-showing-for-theme-properties
Fix descriptions not showing for theme properties
2023-04-02 17:34:38 +02:00
ajreckof 14140eb2d9 Fix descriptions not showing for theme properties 2023-04-01 13:56:55 +02:00
Yuri Sizov 1522762dc9 Make icons of scripted and custom classes fit the editor UI
Also:
- Add an option to limit the icon size in PopupMenu.
This is similar to how this works in Tree and TreeItem.
- Add the same option to TabBar.
- Add a theme constant for Tree, PopupMenu, Button, and
TabBar to apply this limit on the control level.

Co-authored-by: Daylily-Zeleen <daylily-zeleen@foxmail.com>
2023-03-31 21:39:02 +02:00
Yuri Sizov 9fae65404a Streamline class icon resolution in the editor 2023-03-31 21:17:59 +02:00
RedMser ed960453b7 Make solving project setting errors easier
Show full project setting path in error messages.
Force filtering for advanced settings if filter is not empty.
2023-03-27 08:10:35 +02:00
Yuri Sizov d418def752
Merge pull request #74564 from YuriSizov/inspector-is-simple-you-see-there-is-a-key-and-we-set-it-and-we-propagate-it-and-it-just-works
Update property keying state without a full Inspector rebuild
2023-03-16 17:42:31 +01:00
Haoyu Qiu bef7f14885 Add missing TTRs in tiles editor and array inspector 2023-03-09 14:38:54 +08:00
Yuri Sizov f68eb4a967 Update property keying state without a full Inspector rebuild 2023-03-07 18:41:54 +01:00
kobewi 860da7bc77 Apply inspector read_only only when changed 2023-02-20 09:55:06 +01:00
Rémi Verschelde f2a2e47009
Merge pull request #71398 from honix/property-revert-release-focus
Fix property revert doesn't revert selected fields
2023-02-19 01:02:20 +01:00
Yuri Sizov 47e030251f
Merge pull request #73381 from KoBeWi/works_better_than_expected_huh
Fold resources when non-main inspector exits tree
2023-02-17 16:25:18 +03:00
kobewi 7aa3651e2b Fold resources when non-main inspector exits tree 2023-02-15 18:20:55 +01:00
SaracenOne 6696a0790c Fixes revert button on exported node properties on inherited nodes. 2023-02-15 11:40:00 +00:00
Yuri Sizov 18d6c91e8e Avoid cleaning up editor plugins when property list changes
Also removes a usability hack from the Theme editor, as it doesn't work anymore,
and it confuses the Inspector.
2023-02-11 14:38:07 +01:00
Haoyu Qiu 5d7e003b29
Prepare for moving editor and classref translations to godot-editor-l10n repo
- Separate editor interface and property translations.
- Add property translation in TranslationServer.
- The split and merge of the POT/PO/Makefiles and extract scripts is done
  directly in godot-editor-l10n, the files will be removed in the next commit.
- Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the
  files which are ready to inclue.
2023-02-07 14:20:40 +01:00
Raul Santos c7f4ca36a4
Use PropertyUsageFlags enum in parse_property 2023-01-31 23:31:15 +01:00
Rémi Verschelde fd66a86d72
Merge pull request #71330 from Geometror/richtextlabel-fit-content
[RichTextLabel] Match minimum size calculation of Label (proper content fitting)
2023-01-25 09:16:38 +01:00
Rémi Verschelde bda87300e8
Merge pull request #71770 from KoBeWi/better_editing_or_something
Rework EditorPlugin editing logic
2023-01-22 11:07:39 +01:00
kobewi 4ae168eb04 Rework EditorPlugin editing logic 2023-01-22 00:20:45 +01:00
kobewi 615c517034 Use range iterators in LocalVector loops 2023-01-21 18:44:42 +01:00
Rémi Verschelde bcaf048f33
Merge pull request #71379 from KoBeWi/destruction_of_compatibility_function
Remove set_drag_forwarding_compat()
2023-01-18 17:40:13 +01:00
kobewi b58111588a Add EditorUndoRedoManager singleton 2023-01-16 01:11:52 +01:00
Fedor Shchukin 6f416ea104 Fix property revert doesn't revert selected fields 2023-01-14 17:39:21 +03:00
kobewi 59ea36b87c Remove set_drag_forwarding_compat() 2023-01-14 15:16:51 +01:00
Rémi Verschelde 787179dac8
Merge pull request #70148 from KoBeWi/remove_all_restrictions
Remove conditons for unfolding inspector sections
2023-01-13 18:00:45 +01:00
Hendrik Brucker e59d6b1b8c [RichTextLabel] Match minimum size calculation of Label
(optional via fit_content property)
2023-01-13 15:17:26 +01:00
Juan Linietsky e6a4debede Change set_drag_forwarding() to use callables.
* This solution is much cleaner than the one in 3.x thanks to the use of callables.
* Works without issues in any language (no need to worry about camel or snake case).
* Editor code uses a compatibility function (too much work to redo).

Fixes #59899
2023-01-10 14:09:24 +01:00
Juan Linietsky 2b815df3c1 Use BitField<> in core type masks
* All core types masks are now correctly marked as bitfields.
* The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks.
* Most bitmask operations replaced by functions in BitField<>
* Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is.
* Documentation and API dump updated to reflect bitfields in core types.
2023-01-08 22:17:40 +01:00
Rémi Verschelde 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
Silc Renew 724f2422d7 Revert "Merge pull request #70696 from Rindbee/propagate-keying-state"
This reverts commit c774b4ce17, reversing
changes made to ccc609d824.
2023-01-04 20:03:28 +09:00
Silc Renew eee9e3cd9a Revert "Merge pull request #68498 from Rindbee/improve-update_tree"
This reverts commit d5dc70a478, reversing
changes made to ccbefa1f43.
2023-01-04 19:15:20 +09:00
Rindbee ef2c3398e6 Propagate the keying state in the inspector
Toggling the keying state does not significantly change the structure
of the inspector. So it's ok to propagate the keying state and then
use `queue_redraw()` to update the keying icon.
2022-12-31 20:29:09 +08:00
Rémi Verschelde c547c4ef59
Revert "Queue inspector tree update when changing the theme."
This reverts commit c0baec410b.

See comments in #70381.
2022-12-22 16:39:21 +01:00
Rémi Verschelde 224d26fb49
Merge pull request #70261 from Maran23/4-x-editor-inspector-section-click
EditorInspectorSection is not (un)folded when clicking under the font
2022-12-21 18:27:27 +01:00
Marius Hanl c0baec410b Queue inspector tree update when changing the theme. 2022-12-21 01:52:24 +01:00
Marius Hanl 51de7b773c EditorInspectorSection is not folded when clicking under the font 2022-12-18 15:37:08 +01:00
Rindbee f352c30ad5 Defer EditorInspector::update_tree to the process stage to improve performance
`EditorInspector::update_tree` is expensive, so defer the call to the process phase
to prevent multiple calls in a single frame (when switching scene tabs).
2022-12-17 08:39:59 +08:00
kobewi b28b7936db Remove conditons for unfolding inspector sections 2022-12-16 15:14:50 +01:00
Rémi Verschelde 447f6998b1
Merge pull request #67814 from opl-/fix/editor-inspector-accept-event
Fix editor inspector classes not accepting events
2022-11-29 16:48:03 +01:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
BrunoSXS a5e9878ef8 Fix for documentation not appearing in preview in editor inspector 2022-11-23 22:12:12 -03:00
kobewi 15831e381b Unify usage of undo_redo in editor 2022-11-02 17:51:58 +01:00
Rémi Verschelde 5947f22be9
Merge pull request #67578 from KoBeWi/GEDITOR
Unify usage of GLOBAL/EDITOR_GET
2022-10-31 13:15:58 +01:00
Rémi Verschelde be126d42d4
Merge pull request #67588 from KoBeWi/if(!GDVIRTUAL_CALL)don't
Simplify GDVIRTUAL_CALL calls
2022-10-31 11:55:56 +01:00
Danil Alexeev 7d15bb4064
Fix EditorInspector.property_changed signal connection 2022-10-31 11:52:52 +01:00
opl- 5d7a9f8a5c Fix editor inspector classes not accepting events 2022-10-23 19:03:47 +02:00
kobewi d06a8320e5 Simplify GDVIRTUAL_CALL calls 2022-10-19 00:05:48 +02:00
kobewi e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
bruvzg 0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
VolTer cb310a229b Rename Copy Property –> Copy Value 2022-09-30 16:44:27 +02:00
Rémi Verschelde 166df0896c Fix typos with codespell
Using codespell 2.3-dev from current git.

And fix typo in `methods.py` for `vsproj=yes` option (still won't work
though).
2022-09-30 14:23:36 +02:00