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

Detect plugins recursively #1623

Closed
me2beats opened this issue Oct 7, 2020 · 1 comment · Fixed by godotengine/godot#43734
Closed

Detect plugins recursively #1623

me2beats opened this issue Oct 7, 2020 · 1 comment · Fixed by godotengine/godot#43734

Comments

@me2beats
Copy link

me2beats commented Oct 7, 2020

Describe the project you are working on:
Gdscript plugins

Describe the problem or limitation you are having in your project:
The existing plugin system requires to have plugin.cfg for every plugin.
Also Godot doesn't look for plugins in sub-sub-folders.

This forces plugin developers to store each plugin in the addon folder like this:
addons/plugin1/plugin1.gd
addons/plugin2/plugin2.gd

This issue shows that the limitation is that plugin.cfg files are not visible deeper than the addons/ sub-folders

This leads to the following problems:

  1. Possible conflict of names of plugins of different developers, due to which the developers use prefixes to the names of the plugin or add the developer name in a plugin folder name
    zylann.hterrain for example

  2. Serious clutter of the addons folder with a large number of plugins.

  3. It makes the plugin developer to avoid having his own plugin structure for example
    addons/developer_name/plugin1/plugin1.gd
    addons/developer_name/plugin2/plugin2.gd
    This (3) is the point that pushed me most of all to write this proposal.

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Recoursive detecting the plugin.cfg in addons folder could overcome the problem.

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Godot could find plugin.cfg files anywhere in res://addons/

However it might also be wise to limit plugins search areas for example when specifying:

  • search folder depth
    Say the current cfg search folder depth is 0 (allows detecting only in addons/ sub-folders)
    depth = 1 could allow to search plugins in addons/ sub-sub-folders as well etc
  • additional addons/ sub folders to search plugins for example:
    res://addons/sub/subsub (which could ignore search folder depth value).

it would be convenient to have such settings for example in Editor or Project Settings in order to not to scan each sub-sub dirs (especially if you know in advance that there are a lot of files there.)

After all, the feature might be optional and enabled by default

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

Is there a reason why this should be core and not an add-on in the asset library?:
should be core, because this defines the rules for detecting plugins

@Shatur
Copy link

Shatur commented Nov 21, 2020

This feature will also allow to use git submodules for addons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants