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

Godot keeps preloading stuff within folders having .gdignore #20743

Closed
Zylann opened this issue Aug 5, 2018 · 11 comments
Closed

Godot keeps preloading stuff within folders having .gdignore #20743

Zylann opened this issue Aug 5, 2018 · 11 comments

Comments

@Zylann
Copy link
Contributor

Zylann commented Aug 5, 2018

Godot 3.1 master 464d599
Windows 10 64 bits

I added a .gdignore to a folder in my project, however Godot keeps loading all the stuff in it on editor startup:
image

Repro:

  1. Open a project in the editor (use -v for verbose output)
  2. Close the project
  3. Add a .gdignore in a folder
  4. Open the project again: files are still preloaded
@groud
Copy link
Member

groud commented Aug 5, 2018

I'm not sure this is how .gdignore is meant to be used. If it works like .gitignore you need a single.gdignore at the root and must specify, one per line, the folders you want to be ignored.

~~Edit : I mean writing into the .gdignore file~

Edit2: I was wrong

@Zylann
Copy link
Contributor Author

Zylann commented Aug 5, 2018

The way it was currently done is that all folders that have .gdignore in it should be ignored by the resource loader.

@eon-s
Copy link
Contributor

eon-s commented Aug 6, 2018

Is that ignore file for the loader or the importer? I think it does not auto import but can load and probably import manually too.

@Zylann
Copy link
Contributor Author

Zylann commented Aug 6, 2018

@eon-s it should be both. Initially it was needed because Godot was trying to import .obj files which were actually compilation binaries and then choke on them, but more generally it's a way to have folders being ignored regarding any resource management (though file API should still work).
In that case I think Godot tries to load that stuff because a plugin is referencing them, so perhaps it's not as bad as I thought.

@vnen
Copy link
Member

vnen commented Aug 6, 2018

I don't think this is a bug. If you are preloading things from somewhere, it doesn't matter where those things are. I mean, if you are trying to load a resource A and this resource depends on the resource B that is in an ignored folder, it should just load both. If the loading of B fails, this will cascade and fail A too, which is probably not what you want.

The .gdignore file is only meant for the importer. Native resources won't be affected.

@Zylann
Copy link
Contributor Author

Zylann commented Aug 6, 2018

@vnen wasn't it for the exporter as well? I would find awkward to have to tell the editor twice in two different ways to ignore the same folder... but that would be another issue

@KoBeWi
Copy link
Member

KoBeWi commented Jun 19, 2020

Can anyone still reproduce this bug in Godot 3.2.1 or any later release (e.g. 3.2.2-rc2)?

If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

btw, according to documentation, files in ignored folders can't be loaded with load and preload, so dependencies should probably fail too, for consistency.

@Zylann
Copy link
Contributor Author

Zylann commented Jun 19, 2020

I tried an MRP, could not reproduce this.
There is something a bit suspicious in my screenshot in the first post: my plugin was enabled and was probably the one loading all that stuff.

@fire
Copy link
Member

fire commented Nov 16, 2020

Closing since Zylann cannot reproduce.

@fire fire closed this as completed Nov 16, 2020
@fire fire added the archived label Nov 16, 2020
@boruok
Copy link
Contributor

boruok commented Jan 16, 2021

can any else reproduce this? i've putted .gdignore in /bin/screenshots/.gdignore and godot generates .import files, also textures appears in filesystem.
EDIT: just re-opened godot, folder now ignores

@KoBeWi
Copy link
Member

KoBeWi commented Jan 16, 2021

@boruok See #33314

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