Skip to content
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

Exporting Plugin/AssetLib workflow implementation #8807

Open
rothbilly opened this issue Jan 5, 2024 · 0 comments
Open

Exporting Plugin/AssetLib workflow implementation #8807

rothbilly opened this issue Jan 5, 2024 · 0 comments

Comments

@rothbilly
Copy link

rothbilly commented Jan 5, 2024

Describe the project you are working on

A workflow improvements/concept for the Godot editor in the context of exporting and sharing an add-on or an asset-lib as packages.

Describe the problem or limitation you are having in your project

When creating a custom add-on, the official method mentioned in godot docs in making_plugins there's no info on how to exactly export a plugin when its completed. there's a section in Generating PCK files that explain how to export a project as non run-able and select specific folders to be exported, this approach works sometimes but it doesn't feel like a proper way and also it requires some workarounds and dealing with export configuration. The general UX feeling to this issue is that add-ons and packages creation in this scenario get combined in the same category as exporting the game, sharing the same windows, causing that everyone who is making an add-on also has to create their own workflow and standards for sharing plugins, generating some friction in the process.

This is also largely related with #142 - enable users to organize and publish add-ons and add-ons collections as packages and commented on #8780 - import via Git URL but there focusing in great part in importing and dealing with add-on updates.

This issue focuses more in how to export an add-on or asset-lib instead of importing it.

Disclaimer: in this context when I mentioned an add-on i am usually referring to a plugin inside the add-on folder in the project. also in this context when i mention Assetlibrary i am referring to any directory inside the project than can be exported and shared but isn't a plugin by itself.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

So first, there is already an implementation to allow export .pck or .zip as mentioned in the docs - Generating PCK files, doing this we can also select a specific folder and their dependencies to be exported if we go to the Resources section > Then select Export selected resource (and dependencies) > select the checkbox of the resources and assets to be exported.

export example

This system that allows one to select an specific asset and their dependencies can be reused in other areas but keeping focus only in the things that are important in the context of exporting a pseudo-package or add-on.

Things that i think that are important to improve the already existing implementation:

  1. The export option has to be in the context where its needed, for example when selecting a folder in the filesystem or in the plugin tab inside project settings.
  2. Allow us to preview and check the selected assets or plugins that are being to be exported and its dependencies.
  3. The hierarchy of files has to be kept as intact as possible when exporting/importing.
  4. (maybe) Check the backwards compatibility with older version of godot (this is more related with #7925 - add-ons manifest )
  5. (maybe) Importing an add-on or package has to be as easy as exporting, for example drag and dropping a package file in the editor an also recognize that its a package and open the import popup.

Calinou pointed the current workflow to import add-ons via Asset-lib Tab.
Mock5_Frame1_Export

Could be nice to also drag and drop an asset.zip directly to the project from the File Manager and automatically open the import windows like this.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Considering this, there are two areas in the Editor Interface that can be improved:

First, inside the plugin tab in the project setting section i have 3 suggestions in terms of UI/UX improvements:

  1. Creating a specific button when dealing with plugins and allow to export the current selected add-on.

    Mock1_Frame1
    Selecting the current plugin Terrain 3D Allows one to export it.
    Mock1_Frame2
    Then a confirmation popup appears and allows you to select the current files that will be exported.
    Mock1_Frame3
    Finally the File Explorer popup appear to select the current directory where we want to save the plugin.zip as usual.
    Mock1_Frame4

  2. Having a Popup Menu instead of a custom button:
    Mock5_Frame1

  3. Having a custom button inside the edit section on a specific plugin:
    Mock2_Frame1
    Here in the current plugin configuration popups appear, and at the end, the export button.
    Mock_2_Frame1

The other section that also can be improved is inside the FileSystem, when we want to export a specific folder, this could be improved by making it so when right clicking in a selected folder the PopupMenu has an export option like this:

Mock3_Frame2

And also the confirmation popup appear to allow us include external packages or not.

The important issue here is to ensure that the integrity and location of files is kept intact between projects. so the idea is when exporting a .zip it also considers the root of the project in res://.

If this enhancement will not be used often, can it be worked around with a few lines of script?

N/A

Is there a reason why this should be core and not an add-on in the asset library?

Probably possible to be built as an add-on, but since it affects the global experience of different project and different users it would be the best to get the same behavior between projects. As mention by @RobProductions in #8780 i also think this issue help to push a better add-on ecosystems similar what mentioned in #1205.

Please let me now that this is helpful and can be done or there some other technical limitation that i not consider yet.

@rothbilly rothbilly changed the title Exporting Pluggin/AssetLib workflow implementation Exporting Plugin/AssetLib workflow implementation Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants