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

Enable plugins to integrate arbitrary 3rd-party data sources to the AssetLib tab #12

Open
willnationsdev opened this issue Sep 3, 2019 · 6 comments

Comments

@willnationsdev
Copy link
Contributor

willnationsdev commented Sep 3, 2019

Describe the project you are working on:

I frequently work on plugins for Godot and need direct access to repositories stored on GitHub without having to wait for updates to come through in the Asset Library.

I also have an RPG project I am working on for which it would be useful if assets from third-party vendors like Sketchfab and Itch.io could have integrated catalogs out-of-the-box, without having to re-invent the wheel by implementing their own GUI infrastructure to handle all the work of providing an interface to their data.

Describe how this feature / enhancement will help your project:

We should refactor the Asset Library to more easily accommodate alternative visualizations and web APIs that can plug-n-play with the Asset Library tab in the editor.

Benefits:

  1. Users could have more direct access to assets through a GitHub/GitLab/BitBucket plugin. This goes as well for their own assets when they are waiting for the Asset Library to get modifications approved, but applies just as much to assets that aren't even present on the Asset Library.

  2. Users working on game projects would have one comfy editor tab with which to download and install assets from a variety of vendors across the Internet.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:

These are just sample visualizations of how a given AssetLibrary plugin could choose to render their content inside Godot's Asset Library tab.

Sketchfab's main screen plugin that creates an entirely alternative AssetLib tab exclusively for Sketchfab assets. These have a gallery-esque rendering with a staff pick filter:
37650422-2e4c975c-2c35-11e8-8bf0-5cb6f3c972b7

Note how the Sketchfab view is rendered in a separate main screen viewport rather than the existing Godot Asset Library tab:
37650349-fabdf0e8-2c34-11e8-8c89-f7ecf5210472

VS Code's extensions tab. Has a list/markdown rendering with download counts and other detailed information about the project:
1_A5QkBnJud6oEsFGkD3iKFA

Describe implementation detail for your proposal (in code), if possible:

Not entirely sure what all would need to be changed (we kinda need a proof-of-concept demonstration that, for example, could show what a GitHub integration looks like). I do know that the way things are rendered is tailor-made for the exact data that the Godot Asset Library (GAL) stores (such as X/5 star ratings rather than # of Star counts in GitHub, etc.). Different Web APIs may also provide varying amounts of information, potentially a lot more information than the GAL stores, so new fields that provide more detail about an asset are also possible. We won't know more until we start exploring the various Web APIs out there. Either that, or come up with a more generic version that can arbitrarily pretty-render JSON data associated with an asset.

In addition, different asset sources can benefit from alternative renderings that we could make available from the same data backend. For example, GitHub and the VS Code extensions (screenshotted above), which are more code-based platforms, use a list combined with a Markdown-rendered panel since it is an industry-standard practice to use README.md files to describe all of the necessary information about a project. Contrasting with this are the more visual mediums like Sketchfab (screenshotted above) and Itch.io that could benefit from a more gallery-esque front-end.

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

It can be worked around in the sense that one can add docks/bottom panels/main screens/etc. that provide an interface to a specific data source (like Sketchfab's main screen plugin from above), but all this does is lead to a disjointed collection of additional GUI elements that clutter up the interface. We should have a prescribed, standardized method of displaying and interacting with online asset sources that is accessible from the Editor.

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

It requires revisions to the Asset Library tab to support script-based inclusions of data renderings / data pulls via web APIs. This is outside the scope of script code.

Edit: Updated to use the new ISSUE_TEMPLATE.

@fire
Copy link
Member

fire commented Sep 3, 2019

Can you make a mockup of the specific Godot screens you want to see?

@willnationsdev
Copy link
Contributor Author

@fire Well, I think certain data sources will have different requirements. GitHub repositories tend to go hand-in-hand with Markdown renderers, like VS Code's approach, while things that have more of a visual demonstration like Sketchfab or OpenGameArt (if there was such an API) would benefit more from a more gallery-like interface. I would probably suggest having a gallery-like view of cards, and then allow selecting those cards to trigger user-defined behavior for the specific plugin (e.g. Sketchfab could provide a more detailed examination of the asset while GitHub/the Asset Library could provide a popup with more information from a README.md file.

The Sketchfab plugin is already a "fuller" view of assets than the current Asset Library tab, and it is built using the existing Godot API, so I'd say that's a decent mockup if any for how things could look. I'm more concerned with making the editor code itself more generic and able to handle user-defined classes to supply the logic for what to fetch and how to show it, etc.

@fire
Copy link
Member

fire commented Sep 4, 2019

It would make more sense to have an api that uses an existing data source.

Ones that have been mentioned in the past are:

  • Itch.io
  • SketchFab
  • OpenGameArt
  • Github

A better api doesn't seem possible to define without having actual catalogues behind them.

The mockups would help the design if our designs are designed to be implemented. For example we don't have a user account system. We have the tools to write an oidc login system with the random class from Faless, but that is not what we have currently.

It is unclear what exactly is needed to add 3rd party data sources. The editor is defined outside of the project system, so where would the plugins go? Do they need to be in c++ editor?

We could use gdscript to add a panel to the addons panel like how we can add to the settings panel and have the editor use the appdata folder to store the downloaded store plugins.

I would pick one of the four from this list and try design mockups. 1) Sketchfab 2) Github 3) OpenGameArt 4) Itchio

@willnationsdev
Copy link
Contributor Author

willnationsdev commented Sep 4, 2019

It is unclear what exactly is needed to add 3rd party data sources. The editor is defined outside of the project system, so where would the plugins go? Do they need to be in c++ editor?

There is currently no mechanism to attach plugins to the editor itself, but it also doesn't make sense to bloat the C++ editor with the ability to access an arbitrarily large range of 3rd party APIs (I personally think that would be cool, but I don't think it would be desirable from a maintainability standpoint).

I find it more likely that people would have to install plugins on a per-project basis and that those plugins would then enable people to interact with 3rd-party catalogues, until such time as editor-specific, multi-project plugins have an infrastructure defined (based on other Issues in godotengine/godot).

I would pick one of the four from this list and try design mockups. 1) Sketchfab 2) Github 3) OpenGameArt 4) Itchio

Yeah, I think making a GitHub demonstration, integrated with the existing AssetLib tab, would be a good first step towards ironing out the API.

@willnationsdev
Copy link
Contributor Author

Related to godotengine/godot#5284 since it involves potential updates to the UI.

Also related to godotengine/godot#31613 since the API URL may no longer be specific to the Godot Asset Library (depending on the implementation of the features in the original post).

@Calinou Calinou changed the title Enable plugins to integrate arbitrary 3rd-party data sources to the AssetLib tab. Enable plugins to integrate arbitrary 3rd-party data sources to the AssetLib tab May 4, 2020
@DrMoriarty
Copy link

Hi All! Recently I implemented my own plugin management system for my own modules. It mostly designed for process binary precompiled modules for third-party SDKs for iOS and Android. There are 37 production ready packages: analytics, ads, social network integration and so on.

The system has dependencies, autoloading gd wrappers, export hooks, uniform module settings for app keys and so on. It can be used as GUI addon and as CLI utility (for example when you want build your project with CI and don't want to store all binary frameworks in github repo. They can be automatically downloaded before your project was build.)

Full info and package list: https://drmoriarty.github.io/nativelib/
GUI Addon: https://godotengine.org/asset-library/asset/824
CLI utility: https://github.com/DrMoriarty/nativelib-cli

What do you think of it?

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

4 participants