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

Exclude certain folders from search/quick scene #25

Open
TheFlamyy opened this issue Sep 5, 2019 · 7 comments
Open

Exclude certain folders from search/quick scene #25

TheFlamyy opened this issue Sep 5, 2019 · 7 comments

Comments

@TheFlamyy
Copy link

Describe the project you are working on:
I'm working on a project relying on a few addons and a lot of scenes which won't are used as "base classes"

Describe how this feature / enhancement will help your project:
Currently typing something into the file system's search bar will find any result - also addon related data, which shouldn't be modified/used as is. The same issue occurs when using the quick scene button.

Show a mock up screenshots/video or a flow diagram explaining how your proposal will work:
Previously, an option in the project settings e.g. "exclude addons" would have been sufficient. Thinking about it, the ability to exclude any folder would be more beneficial. Either through the project settings menu (navigating to the folder), adding a custom file (like .gdignore) or inside the file system's context menu (right click > Disable/Enable from search)

A discussion/further details about the current implemention would help to clarify the right solution.

Describe implementation detail for your proposal (in code), if possible:
I have glanced over the code for the search bar. It should be able to check whether or not the folder is inside a "blacklist" in order to check for exclusion.

If this enhancement will not be used often, can it be worked around with a few lines of script?:
I'm not sure it's possible to implement right now, since some editor functionalities are seemingly hard-coded.

Is there a reason why this should be core and not an add-on in the asset library?:
it would mostly benefit work-flows. Thus I doubt it's reasonable to make these features "discoverable" instead of part of the main "framework".

Side note: This issue has been moved from the "old tracker" godotengine/godot#24794

@willnationsdev
Copy link
Contributor

willnationsdev commented Sep 6, 2019

I think this is a useful idea, but it feels to me like it would need to be balanced out with a feature that allowed plugin creators to generate documentation for their plugins' scripts and have them automatically imported into the in-engine docs. Otherwise, it would make it more complicated for someone to find and peruse the code for a plugin (which often has detailed comments instructing users on how to extend and make use of the script's class).

As for the implementation ideas presented, I like the idea of it being a ProjectSettings configuration value. I don't know if I'd put it in the FileSystemDock context menu since it doesn't seem like something that someone would change all that often and we don't want to bloat the number of options in there (it's already a little long).

For a .gdignore file, if I saw that in practice, my assumption would be that it is something that blacklists files and directories from being included in the final binary export for the project, not hiding certain files and directories from a single quick-open popup. That's just too small-time for needing a dedicated file on-hand imo.

Edit: I see this would be for the FileSystemDock search bar too, based on the original Issue. I might recommend, in that case, just having a quick-toggle in the FileSystemDock that automatically filters res://addons/* files and directories depending on whether the toggle is on. Seems sensible to me, and I'm not sure to what extent people would really need more customized functionality. Perhaps have a note in the quick open popups that addons are hidden and the hiding should be toggled off in the FileSystemDock if they want to see them?

@belzecue
Copy link

belzecue commented Dec 7, 2020

I found this item when googling why Godot resource scripts do not show up in the "Create New Resource" search panel when the script is located under the root "addons" folder. Has this already been implemented in the Editor (excluding Addons folder from search)?

Not showing when under Addons folder:

Screenshot at 2020-12-07 16-44-15

But showing when under any other folder:

Screenshot at 2020-12-07 16-43-26

@Calinou
Copy link
Member

Calinou commented Dec 7, 2020

I found this item when googling why Godot resource scripts do not show up in the "Create New Resource" search panel when the script is located under the root "addons" folder. Has this already been implemented in the Editor (excluding Addons folder from search)?

This is not implemented yet (not even in a hardcoded form).

You need to create an editor plugin and enable it for script classes to be visible in the Create New Node dialog. See https://github.com/godot-extended-libraries/godot-lod/blob/master/addons/lod/plugin.gd for an example of this.

@hilfazer
Copy link

I made this:

Godot_exclude_addons.mp4

@Mickeon
Copy link

Mickeon commented Feb 7, 2022

I propose using a file called .gdquickopenignore the same way .gdignore works. Equally as documented, perhaps even noted in the addon-related Documentation.

I feel like extending this beyond the addons folder would be more than beneficial. Nothing much changed for your average user, but for the advanced user... there can definitely be a lot of situations where a Scene or Script is created, works as intended, doesn't need to be touched ever again, but shares a similar name with another one.
Included in the example may be the addon's Scenes or Scripts, as well. Having them show up in Quick Open is rather jarring, but .gdquickopenignore may allow advanced users to better control what Addons should be visible in the Quick Open window.

I think this is a useful idea, but it feels to me like it would need to be balanced out with a feature that allowed plugin creators to generate documentation for their plugins' scripts and have them automatically imported into the in-engine docs.

Seems like we got that in Godot 4, to some extent, at least.

@elvisish
Copy link

elvisish commented Aug 1, 2023

Would it be possible for search exclusions to be added to 3.6 before it's finalized?

@Calinou
Copy link
Member

Calinou commented Aug 2, 2023

Would it be possible for search exclusions to be added to 3.6 before it's finalized?

godotengine/godot#47563 was originally designed to work on 3.x, but if it's rebased, it'll need a separate PR to be merged there (as the code will have slight differences).

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

7 participants