-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Universal plugins [wip] #35432
Universal plugins [wip] #35432
Conversation
Namely, move the drive dropdown to just the left of the path text box and don't include the former in the latter. This by itself improves the UX on Windows, but it sets the ground for the following changes. In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its dropdown is kept at the original location.
Previously, a change was missed if it happened while the scan was in progress and already past the affected location. Also: - Consider the scan changes thread on termination, in addition to the full scan one - Add FS-reported hidden to the check for hidden by the editor file system
7a87901
to
c463a85
Compare
When this gets committed to the main branch does this mean that we will need to update our plugins to account for this change to plugins? Just curious :) |
According to the linked design document, old plugins still work the same way. |
That's right. Anyone not ready or willing to use the new model will enjoy complete backwards compatibility. |
I think we should be able to display the scope of a plugin directly in the filesystem dock. That would avoid messing up with user-wide plugins in some case. |
There's CICD failures here https://travis-ci.org/godotengine/godot/builds/640402635 |
Good idea. Right now the tooltip you get for children of However, using a different color or folder icon would be nice. The plugin settings dialog is using the accent color for user-level. That "language" could be used there, too. |
First, removed the notion of logical paths from the FS-specific classes so that they deal only with physical paths. Therefore, translating back and forth between the abstracted (like `res://...`) and the real one will happen in the base classes. They were already doing part of that work, but the split wasn't clear enough. On top of that, `(Dir/File)AccessResources` are introduced to be the ones specifically handling access to resources. `DirAccessResources` has the notion of drives, being `res://` the only one for the time being. `String::simplify_path()` is made simpler and more universal. `String::is_abs_path()` now also considers paths with a leading Windows drive.
Make the full engine and editor aware of the fact that resources are not necessarily located under `res://`.
- Add support for multiple `PackedData` instances - Enhance directory API - Fix `FileAccess::exists()` not checking for PackedData being disabled - Fix `DirAccessPack::change_dir()` to handle ".." properyly (before `simplify_path()` disallows it) - Allow absolute paths in existence checks
c463a85
to
44c8263
Compare
f5164d1
to
adf25a0
Compare
If the file name text field is made not-editable, it won't be tried to be changed, keeping any text that has been set to it externally.
Highlights: - `addons://` is introduced as a virtual resources drive. - Plugin creation dialog: - New model is the default option. - If created with new model, the default script contains an explanation about it. - Placeholders containing paths are adjusted to the model currently selected. - If on rescan an enabled plugin is found not to be the same (for instance, a plugin is copied into the project while a user-wide one of the same name is enabled), the old one is teared down and the new is started up, making the switch seamless. - If a legacy plugin is located in the editor settings, since that won't work, it's ignored and a warning about it is printed.
Makes it able to seamlessly jump between packed and non-packed locations. Therefore, this commits also reverts what the editor file system scan needed before this was done.
FS dock: - Disallow impossible drag & drop cases - Handle _Show in file manager_ gracefully for items in PCK - Handle move, rename and remove gracefully for items in PCK - Hide the _New folder/resource/script_ and _Edit dependencies_ context menu items for read-only folders (PCK or `addons://`) - Add _[PCK]_ to every PCK plugin's root name - Paint items in PCK as grayed out - Add an informative tooltip about the location for children of `addons://` `EditorDirDialog`: - Paint items in PCK as grayed out - Add _[PCK]_ to every PCK plugin's root - Disable the _Create folder_ button for read-only folders (PCK or `addons://`) - Disallow picking a read-only folder as a destination path `EditorFileDialog`: - Disallow create folder and delete items if read-only (PCK or `addons://`) - Disallow picking a read-only folder in save mode - Paint items in PCK as grayed out Other: - Force correct PCK filename when exporting a plugin
adf25a0
to
9bab52d
Compare
Not much of general interest. Closing. |
It'll be completely offtopic, but this is how Godot loses great features. |
@RandomShaper I hope a particular implementation will be discussed at GIP at least. I also wonder what's the real reason for closing the PR, was there any discussion regarding this particular implementation? Not all users follow IRC discussions. There's certainly a general interest in this. |
I'm not sure why @RandomShaper's closing comment was so laconic, but to clarify, we discussed this at length at the past Godot Sprint in October 2019, and then again during GodotCon in February 2020. This is a wanted feature but not in its current form, which is needlessly complex (because of its flexibility, but flexibility comes at the cost of complexity, and goes against our guidelines). A new proposal is expected building on this one, which keeps things simple while allowing having global editor plugins. |
Goal
The main idea is creating a system that allows plugins to be installed into a specific project or globally (at the OS user level) so they are available for every project.
Remarks
[f]
) are meant to be squashed together before merging.Materials
Specification
Please read the full design document.
The most recent commit (Improve UX of universal plugins) is not covered by the design document. It does a number of changes (detailed in the full commit message) to make the feature as easy-to-use as possible).
Screenshots
model=1
, the default) plugin at<project_dir>/addons/
.model=2
) plugin at<project_dir>/addons/
(project-level, available to this project only).model=2
) plugin at<godot_config_dir>/addons/
(user-level, available to all projects).model=2
) plugin packed as a PCK file at<godot_config_dir>/addons/
(user-level, available to all projects).Plugin settings
Plugin creation dialog
Default plugin code
(The explanation is added only for
model=2
plugins.)File system dock
File dialog
Browsing resources
Directory dialog
This code is generously donated by IMVU.