Skip to content

Unstable resource ids when using SpriteFrames importer with split layers #152

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

Closed
olanti-p opened this issue Jun 14, 2024 · 3 comments
Closed
Labels
bug Something isn't working

Comments

@olanti-p
Copy link

olanti-p commented Jun 14, 2024

Hello. I've tried using this plugin in one of my projects, and run into an unexpected issue with version control.

Basically, each time .godot folder is deleted, or absent (for example, on a fresh clone of a project repository), the editor would change (regenerate?) .res files generated with SpriteFrames importer (split layers option turned ON). There doesn't seem to be any reason behind such changes, as the parent .aseprite file does not change, but that makes it harder to work with git.

Here's an example project to try this on:
AseWiz_Test.zip
The last commit in that zip file is an example of Godot changing .res file after the .godot folder has been cleared. As the zip itself does not contain .godot folder, opening the project in editor should prompt a new change to gfx/main_file_Layer 1.res that'll show up in git as unstaged.

Godot v4.2.2.stable.official [15073afe3]
AsepriteWizard v7.4.1 installed from AssetLib
Aseprite v1.3.7
Windows 11 x64

@viniciusgerevini
Copy link
Owner

Hello there. Thanks for the info and sharing a sample project. That will be super useful.

I haven't used the importers split layers option myself so I never noticed this behaviour. From a quick diff it doesn't seem anything really changed:

Screenshot from 2024-06-15 08-17-25

However, this diff is just checking a binary as text so it's not really reliable. My suspicion is that might be something to do with the new images timestamp. I'll check it further this week. Cheers.

@viniciusgerevini
Copy link
Owner

Hi. After putting some thought the actual issue is the same as described here #163 . Even though nothing has changed, the new textures generated on import are new objects. These files should not be outside the .godot folder, however due to the current limitations there is no way around it so a new texture is created every time.

For the split situation, there might be more changes required, but I reckon being able to import ctex resources directly will unlock some workarounds.

I opened a proposal that would solve this issue here: godotengine/godot-proposals#11042. Please give it an upvote or comment in case you are still interested on the fix so it gets more attention. Cheers.

@viniciusgerevini
Copy link
Owner

Version 9.0.0 solves this issue by exposing separate split importers. These references should be internal now and not exposed to the version control. Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants