Commit graph

279 commits

Author SHA1 Message Date
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
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