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

"Load failed due to missing dependencies" for packed textures. #319

Closed
arceryz opened this issue May 2, 2022 · 3 comments
Closed

"Load failed due to missing dependencies" for packed textures. #319

arceryz opened this issue May 2, 2022 · 3 comments

Comments

@arceryz
Copy link

arceryz commented May 2, 2022

Hello,

I am using this plugin in a project and notice that the packed textures are not properly regenerated when they are not import folder is missing. All texture sets using the packed textures break. This means that every time the import folder is cleared, all texture sets must be recreated for all terrains instances. This is cumbersome.
A similar issue was already posted at the heightmap demo repository which contains even more detail, but was never replied to.
Zylann/godot_hterrain_demo#5

I think this happens because the plugin tries to load packed textures which are not yet generated by the importer.
If the .import packed textures are regenerated when the project is already open, then there seems to be no issue. The issue only occurs when the project is opened without the .import packed textures.

Godot version is 3.4.

Steps to reproduce:

  1. Create any project with a test heightmap.
  2. Leave the project.
  3. Remove the .import folder.
  4. Open the project.
@Zylann
Copy link
Owner

Zylann commented May 3, 2022

That doesnt make sense though... it's not the plugin's job to decide when to reimport files that have no imported files associated anymore... it's Godot.
Note that TextureSet is not an imported format, it's just a custom resource which in turn references textures, and these textures can be packed ones which need import. You should not need to reassign or recreate them, it's an import issue, the links are still there, the importers only need to run properly.

The plugin implements a custom importer for the .packed_tex and .packed_texarr file extensions, but that's about it. There is no API anywhere to tell Godot to import them explicitely, Godot is supposed to do that automatically. Are you using these?

So if Godot is not calling again the packed texture importers, or if references to those textures break spontaneously, that would be a Godot problem.
This could be related to #26 (and then godotengine/godot#17483), which is caused by the fact Godot does not import anything before the plugin initializes (so it can't load any icons, brushes or meshes on startup, which is quite problematic). Which means it might fail to register the importers. A workaround is to reopen the project. Does repoening keeps causing the same issue? I don't know how it could be fixed otherwise.

@arceryz
Copy link
Author

arceryz commented May 3, 2022

You are correct.
Re-opening the project after the error works correctly. The bug lies within Godot itself.
Thanks for response and great plugin.

@arceryz arceryz closed this as completed May 3, 2022
@Zylann
Copy link
Owner

Zylann commented May 3, 2022

I'm currently attempting to make some changes to the plugin to make it load the logic properly so importers aren't messed up, however the UI of the plugin might still be buggy and require a restart

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

No branches or pull requests

2 participants