Commit Graph

469 Commits

Author SHA1 Message Date
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
Rindbee e9465825cd Fix EditorInspectorCategory minimum size calculation
Calculated using the same theme property values as in `NOTIFICATION_DRAW`, keeping the width at `0` and calculating only the height.
2022-09-21 19:56:19 +08:00
Rémi Verschelde 82961dda3d Merge pull request #66108 from Zylann/editor_inspector_get_selected_path
Expose `EditorInspector.get_selected_path`
2022-09-19 22:01:32 +02:00
Marc Gilleron cee8bd9e76 Expose `EditorInspector.get_selected_path` 2022-09-19 15:20:34 +01:00
Marc Gilleron 056a418862 Expose `EditorProperty._set_read_only` virtual method 2022-09-19 11:56:49 +01:00
Rémi Verschelde 3546add9b3 Merge pull request #60786 from Rindbee/update-editor-property-status
Update checked based on the variant type of the value
2022-09-16 09:24:10 +02:00
Rémi Verschelde 37146763b1 Merge pull request #65868 from timothyqiu/metadata-crash
Fix crash open opening Add Metadata dialog
2022-09-16 09:24:02 +02:00
Haoyu Qiu 372e4cfd49 Fix crash open opening Add Metadata dialog 2022-09-16 11:28:09 +08:00
Michael Alexsander 2f016c521f Fix empty text in the add button when editing nodes with items 2022-09-15 22:01:52 -03:00
Rindbee 9066d55763 Update checked based on the variant type of the value
In `EditorProperty::update_revert_and_pin_status`, if `checkable` is `true`, update `checked` based on the variant type of the value, and rename the function as `EditorProperty::update_editor_property_status`.

**Known problems:**
1. Unable to check Checkbox for properties of type `Object` when it is unchecked. This is probably because during value store/fetch, the `nullptr` (variant type is `Variant::OBJECT`) eventually becomes `Variant()` (variant type is `Variant::NIL`).
2. For theme overrides, click the revert icon will uncheck the Checkbox. This is probably because `EditorPropertyRevert::get_property_revert_value` returns `Variant()`.
2022-09-16 07:22:50 +08:00
Rémi Verschelde 89840b75c9 Merge pull request #65430 from SaracenOne/read_only_array
Add read-only mode to inspector array and dictionary viewer.
2022-09-14 17:43:49 +02:00
Michael Alexsander c4c9e41073 Make `Vector2i` values paired with `EDSCALE` be just `Vector2` 2022-09-08 14:46:32 -03:00
bruvzg 6f4d233062
Fix key mapping changes when moving from macOS to other platform
Removes separate `Command` key (use `Meta` instead).
Adds an event flag to automatically remap `Command` <-> `Control` (cannot be set alongside `Control` or `Meta`).
2022-09-07 18:45:35 +02:00
Rémi Verschelde 2b6e043491 Merge pull request #58617 from KoBeWi/custom_something
Improve handling of custom types
2022-09-07 17:54:17 +02:00
Yuri Sizov 43f03e2ce6 Improve naming of theme properties throughout GUI code
Rename ItemList's bg -> panel
Rename ItemList's bg_focus -> focus
Rename ProgressBar's bg -> background
Rename ProgressBar's fg -> fill
Rename Tree's bg -> panel
Rename Tree's bg_focus -> focus
Rename ScrollContainer's bg -> panel
Rename FileDialog's *_icon_modulate -> *_icon_color
Rename FileDialog's files_disabled -> file_disabled_color
Rename CheckButton's on/off -> checked/unchecked
Rename check_v_adjust -> check_v_offset
2022-09-06 22:53:17 +03:00
SaracenOne 4d898f9bb4 Add read-only mode to inspector array and dictionary viewer. 2022-09-06 18:02:03 +01:00
FireForge a914dc0c46 Improvements to multi-node editing
- Show revert button for properties that are not default for all selected nodes
- Show property documentation tooltips
- Show common class name and icon and number of selected nodes in EditorPath, e.g. "Node2D (4 Selected)"
- Hide metadata for MultiNodeEdit and AnimationMultiTrackKeyEdit
- Hide script for MultiNodeEdit
2022-09-05 18:36:03 -05:00
kobewi a3309215c2 Improve handling of custom types 2022-09-05 23:08:28 +02:00
Hugo Locurcio 8611b712dc
Improve the editor's Add Metadata dialog
- Mention the node name in the dialog title.
- Improve error messages to be more descriptive.
2022-09-01 19:03:40 +02:00
Rémi Verschelde ae349d8227
Merge pull request #64377 from Mickeon/rename-canvas-redraw
Rename `CanvasItem.update()` to `queue_redraw()`
2022-08-30 14:47:41 +02:00
Atlinx 0e3097c023 Add missing parameters for signal in docs 2022-08-29 20:13:01 -04:00
Micky e31bb5ffeb Rename `CanvasItem.update()` to `queue_redraw()`
Affects a lot of classes. Very thoroughly checked signal connections and deferred calls to this method, add_do_method/add_undo_method calls, and so on.

Also renames the internal `_update_callback()` to `_redraw_callback()` for consistency.

Just a few comments have also been changed to say "redraw".

In CPUParticles2D, there was a private variable with the same name. It has been renamed to `do_redraw`.
2022-08-29 14:59:47 +02:00
Rémi Verschelde fd6453c45e Revert "Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED"
This reverts commit 4b817a565c.

Fixes #64988.
Fixes #64997.

This caused several regressions (#64988, #64997,
https://github.com/godotengine/godot/issues/64997#issuecomment-1229970605)
which point at a flaw in the current logic:

- `Control::NOTIFICATION_ENTER_TREE` triggers a *deferred* notification with
  `NOTIFCATION_THEME_CHANGED` as introduced in #62845.
- Some classes use their `THEME_CHANGED` to cache theme items in
  member variables (e.g. `style_normal`, etc.), and use those member
  variables in `ENTER_TREE`, `READY`, `DRAW`, etc. Since the `THEME_CHANGE`
  notification is now deferred, they end up accessing invalid state and this
  can lead to not applying theme properly (e.g. for EditorHelp) or crashing
  (e.g. for EditorLog or CodeEdit).

So we need to go back to the drawing board and see if `THEME_CHANGED` can be
called earlier so that the previous logic still works?

Or can we refactor all engine code to make sure that:
- `ENTER_TREE` and similar do not depend on theme properties cached in member
  variables.
- Or `THEME_CHANGE` does trigger a general UI update to make sure that any
  bad theme handling in `ENTER_TREE` and co. gets fixed when `THEME_CHANGE`
  does arrive for the first time. But that means having a temporary invalid
  (and possibly still crashing) state, and doing some computations twice
  which might be heavy (e.g. `EditorHelp::_update_doc()`).
2022-08-29 11:11:29 +02:00
Rémi Verschelde f7f8af232c
Merge pull request #64885 from Mickeon/rename-tooltip-hint
Rename `hint_tooltip` to `tooltip_text` & setter getter
2022-08-28 17:43:01 +02:00
Aaron Record 4b817a565c Remove NOTIFICATION_ENTER_TREE when paired with NOTIFICATION_THEME_CHANGED 2022-08-27 11:52:29 -06:00
Micky ef5b9a06a9 Rename `hint_tooltip` to `tooltip_text` & setget
`hint_tooltip` -> `tooltip_text`
`set_tooltip` -> `set_tooltip_text`
`_get_tooltip` -> `get_tooltip_text`

Updates documentation, too.
2022-08-27 01:35:01 +02:00
Yuri Sizov 207bdc2b9f Remove Inspector tooltip hack that never actually worked 2022-08-26 17:22:13 +03:00
Rémi Verschelde 0a828dbd92
Merge pull request #64270 from timothyqiu/close-keying
Fix overlapping keying and remove button in Inspector
2022-08-25 07:53:55 +02:00
SaracenOne dd814a0dca Disable editing properties in foreign resources
from imported scenes or objects returning
true from a function named '_is_read_only' and
disable resaving imported resources.
2022-08-23 23:16:13 +01:00
kobewi ece3df3938 Add per-scene UndoRedo 2022-08-22 18:05:10 +02:00
Yuri Sizov 980f5f32f4 Make `property_*_revert` methods multilevel and expose them for scripting 2022-08-18 00:03:53 +03:00
Haoyu Qiu 3369d090d9 Fix overlapping keying and remove button in Inspector 2022-08-11 18:00:34 +08:00
Xwdit 39469fdd58 Fix document display in inspector for properties 2022-08-10 23:11:24 +02:00
Rémi Verschelde 6d94465f3c
Merge pull request #62868 from fire-forge/array-resize-size
Use a SpinBox in the inspector array resize dialog
2022-08-08 12:53:55 +02:00
Rémi Verschelde 77d3ac700d
Merge pull request #63712 from object71/fix-export-issues 2022-08-06 14:27:17 +02:00
Ricardo Buring 4a59188898 Fixup array property inspector 2022-08-04 16:21:09 +02:00
Rémi Verschelde a1d4cf6898
Merge pull request #63894 from fire-forge/add-metadata-button
Add spacing above the "Add Metadata" button
2022-08-04 09:06:18 +02:00
Hristo Stamenov 0e1f7e9f89 Removed faulty function update after get_property_list.
The function tried to rearrange properties but that lead to problems with duplication or deleted properties. Implemented the logic that that function did inside the get_property_list both for tool scripts and non-tool scripts.
2022-08-03 21:45:16 +03:00
FireForge 3200f196da Add 4px of spacing above the "Add Metadata" button 2022-08-02 17:39:08 -05:00
reduz 0351a0908f Clean-up array editing 2022-08-02 23:36:02 +02:00
Rémi Verschelde 6c5330154e
Merge pull request #63429 from RandomShaper/indicate_overridden 2022-07-31 23:54:38 +02:00
Rémi Verschelde 214d0b20b0
Merge pull request #62936 from Xwdit/script_doc_inspector_property 2022-07-31 22:28:05 +02:00
Pedro J. Estébanez 4a127cb5fe Improve usability of non-default values in the property inspector
- Provide a visual indication that a (sub)group contains non-default (revertable) values when it's collapsed.
- Add a new option to the inspector's tools menu for expanding only (sub)groups containing properties with non-default values.
2022-07-30 15:25:45 +02:00
Juan Linietsky d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Rémi Verschelde 03987738aa
Merge pull request #63351 from fire-forge/array-colors 2022-07-27 18:10:44 +02:00
Rémi Verschelde ba2aa30a18
Merge pull request #58443 from object71/fix-editor-properties-deleted-by-mistake 2022-07-27 16:53:26 +02:00
FireForge f26414762f Reduce contrast in inspector array element backgrounds
Co-authored-by: reduz <reduzio@gmail.com>
2022-07-27 09:50:28 -05:00
K. S. Ernest (iFire) Lee fb2b26eec3 Avoid crash when when the editor_property_map is empty. 2022-07-24 17:46:02 -07:00
Xwdit 8ee125a128 Fix document not showing for script properties in inspector 2022-07-14 03:33:51 +02:00
Rémi Verschelde 9b29f18631
Merge pull request #59680 from fire-forge/property-help
Add "Open Documentation" button to EditorProperty context menu
2022-07-13 14:12:53 +02:00
FireForge dcf42cff86 Add "Open Documentation" button to EditorProperty context menu 2022-07-11 19:30:46 -05:00
FireForge d6188b4632 Use a SpinBox in the inspector array resize dialog 2022-07-10 00:19:29 -05:00
FireForge e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
bruvzg 344ba0ffaf
Refactor Font configuration and import UI, and Font resources. 2022-07-06 14:12:36 +03:00
reduz b7c41f9ba1 Add ability to export Node pointers as NodePaths
This PR implements:
* A new hint: PROPERTY_HINT_NODE_TYPE for variant type OBJECT, which can take specific node types as hint string.
* The editor will show it as a node path, but will set it as a pointer to a node from the current scene if you select a path.
* When scene is saved, the node path is saved, then restored as a pointer.

NOTE: This is a proof of concept and this approach will most likely not work. The reason if that, if the node referenced is deleted, then when trying to edit this the node will become invalid.

Potential workarounds: Since this uses the Variant API, it should obtain the pointer from the Variant object ID. Yet, this would either only really work in GDScript or it would need to be implemented with workarounds in every language.
Alternative ways to make this work: Nodes could export an additional property with a node path (like for which_node, it could be which_node_path).
Another alternative: Path editing could happen as a hidden metadata (ignoring the pointer).
2022-06-25 15:50:15 +02:00
Rémi Verschelde 4922fee09e
Merge pull request #59770 from fire-forge/rounded-corners 2022-06-10 10:53:09 +02:00
Rémi Verschelde ff75a49227
Merge pull request #61387 from KoBeWi/press_to_action
Improve style of inspector buttons
2022-05-26 00:57:21 +02:00
Rémi Verschelde 0736eed747
Merge pull request #60987 from fire-forge/vertical-move
Use the move mouse cursor shape for the inspector array reorder button
2022-05-26 00:54:35 +02:00
kobewi e7b0e7e35a Improve style of inspector buttons 2022-05-25 22:54:47 +02:00
FireForge 9bc6f44c80 Add rounded corners to EditorProperty and EditorSpinSlider
- Adds rounded corners to the EditorProperty child background, EditorSpinSlider label background, and resource sub-inspector borders and background.
- Allows customizing EditorSpinSlider label background through a new Theme StyleBox property, label_bg.
- Makes margins consistent in resource sub-inspectors.
- Removes space between buttons in NodePath, Resource, and multiline string editors.
- Adds space between label background and content for vertical property editors.
2022-05-25 15:31:30 -05:00
reduz 4044cc7d57 Reorganize Region Rect Editor
Problem:

* Region rect was pretty much a hidden editor. Because it was annoying for it to pop up automatically, it did not.
* Because it did not, most users have no idea it even exists.
* But because it is a transient editor, it would steal focus of other editor and annoy users.

Solution:

* Editor has been moved to a window.
* Regions that can be edited add a button below the region which can be pressed to open the editor.

This required a slight change in EditorInspectorPlugin to allow custom editors to be below others.
2022-05-24 09:42:49 +02:00
FireForge a369bc7325 Use the "Move" mouse icon in inspector arrays 2022-05-22 14:27:32 -05:00
reduz 45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
RechieKho 8e8e457dd9 Disallow setting editor-only metadata in the editor 2022-05-05 16:11:27 +02:00
Hristo Stamenov f9dba447b9 Deleting only repeating "Scripted Variables" props 2022-05-04 09:09:26 +03:00
Hugo Locurcio 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
Haoyu Qiu 28317ef33c Fix issues when skipping l10n for script variables 2022-04-29 17:49:17 +08:00
Rémi Verschelde 004567e0cd
Merge pull request #60367 from timothyqiu/refresh-cd 2022-04-26 12:12:29 +02:00
FireForge 3073b85de9 Rename theme properties to include underscores
- check_vadjust -> check_v_adjust
- close_h_ofs -> close_h_offset
- close_v_ofs -> close_v_offset
- commentfocus -> comment_focus
- hseparation -> h_separation
- ofs -> offset
- selectedframe -> selected_frame
- state_machine_selectedframe -> state_machine_selected_frame
- table_hseparation -> table_h_separation
- table_vseparation -> table_v_separation
- vseparation -> v_separation
2022-04-23 11:16:18 -05:00
Haoyu Qiu 925167c4ea Reset refresh countdown if pending update tree request 2022-04-19 14:42:16 +08:00
Rindbee d97236bfca Fixes incorrect display of property labels with feature tags
Closes #60352
2022-04-19 09:08:56 +08:00
bruvzg d1207a0504
[Input] Add extra `shortcut_input` input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
FireForge 88b09694e7 Fix inspector group name capitalization 2022-03-28 14:02:06 -05:00
Haoyu Qiu ccde2bf66f Add property name style toggle to Inspector 2022-03-28 18:52:09 +08:00
reduz 09b951b99b Refactor Object metadata
* API kept the same (Although functions could be renamed to set_metadata/get_metadata in a later PR), so not much should change.
* Metadata now exposed as individual properties.
* Properties are editable in inspector (unless metadata name begins with _) under the metadata/ namespace.
* Added the ability to Add/Remove metadata properties to the inspector.

This is a functionality that was requested very often, that makes metadata work a bit more similar to custom properties in Blender.
2022-03-24 14:21:52 +01:00
Haoyu Qiu 7bdca99d51 Improve inspector filtering 2022-03-18 01:16:25 +08:00
Rémi Verschelde c8fce1661d
Merge pull request #59102 from rcorre/copy-project-config 2022-03-13 15:38:55 +01:00
Ryan Roden-Corrent d271e2517e
Copy full project setting path from dialog.
The EditorProperty UI elements for project settings are created from
SectionedInspector, which has a prefix added to each property path. Each
EditorProperty needs to be made aware of this path so copy_property_path
copies the full path, and not just the suffix.

Fixes #59020.
2022-03-13 09:23:44 -04:00
Aaron Franke 918b09cabc
Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
Rémi Verschelde 7e4a8d3ab3
Merge pull request #58706 from timothyqiu/property-i18n 2022-03-10 21:09:50 +01:00
reduz 21637dfc25 Remove VARIANT_ARG* macros
* Very old macros from the time Godot was created.
* Limited arguments to 5 (then later changed to 8) in many places.
* They were replaced by C++11 Variadic Templates.
* Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard.
* Also added a dereference check for Variant*. Helped catch a couple of bugs.
2022-03-09 18:39:13 +01:00
kobewi 3203a2b4bb Fix color pickers closing in editor settings 2022-03-05 13:25:32 +01:00
FireForge 6a4d3859cf Make EditorSpinSlider label color a theme property 2022-03-04 15:27:50 -06:00
Haoyu Qiu d6df2ffad8 i18n: Make property paths and categories translatable 2022-03-03 18:31:40 +08:00
Rémi Verschelde 51a00c2855
Merge pull request #58182 from akien-mga/style-cleanup-if-semicolons-deadcode 2022-02-16 16:55:07 +01:00
Rémi Verschelde b8b4580448
Style: Cleanup single-line blocks, semicolons, dead code
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
2022-02-16 14:06:29 +01:00
jmb462 dcd2a92af3 Port existing _notification code to use switch statements (part 1/3) 2022-02-16 11:38:24 +01:00
Rémi Verschelde c4779196b9
Merge pull request #58125 from fire-forge/editor_property_overlap_fix
Fix EditorProperty icon overlapping text with checkbox
2022-02-15 08:09:51 +01:00