See discussion on #102534. Before this fix, it was possible to drag a
file `CustomResource.gd` with `class_name CustomResource` onto a
property of type `CustomResource`. Of course, the intention is that only
`Resource`s with the `CustomResource` script attached are accepted.
(Actually accepting the script, but creating a resource from it
automatically, is left as a future improvement.)
This reverts commit df01daf3b7.
User feedback has shown that this change isn't a clear improvement, because:
- The icon eats up horizontal space that's already limited here, cutting the text.
- The "Load" functionality was completely removed, while it's still useful for many.
- It breaks user expectations to no longer have load options next to Clear/Save/etc.
- Remove option to load files from drop down
- Make _update_menu_items solely responsible for adding the right separators. Previously
the overridable set_create_options would need to do this, but it could not know whether
more properties were going to be added.
If an invalid type is supplied (which can still be done from a script),
a warning is printed (along with a workaround for ViewportTexture).
This also adds support for "negative" resource hints such as
"Texture2D,-ViewportTexture" to exclude one or more subclasses
from a class hint.
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
Enforce that custom nodes and resources created via the "Create New Node" dialog, should permanently retain their original type (script). This means:
- Type continuity: It should be impossible for the user to (accidentally) clear the original script of a custom node that was created via the "Create New Node" dialog.
- Extensibility: The user should be able to extend custom types as usual (create a script that inherits the original type and replace the original script of that node with his own). However, if he then clears his extension-script from that node later on, the custom type should revert to its original script instead of becoming a non-scripted type.
- 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.