godot
godot copied to clipboard
Fix group reimport bug
When testing files for reimport the presence of a UID causes the file to be reimported (treated as if the file were from a version prior to UIDs I assume), this however causes problem with group files, in this case TextureAtlas, as in this case no UID is written (or kept in fact) when reimporting, causing the files in a group to be reimported each time
Also at some times (when opening the editor I believe) the resulting file (the group file) can be reimported itself causing it to be reimported twice in such cases, added a check to make sure files that are group files, but not yet in the group file cache, aren't reimported twice.
Edit: Also added editor progress update for group files in reimport
Fixes #68256 Fixes #54817
I'd guess it also fixes #54817 which is supposed to be fixed by #60888 which... is almost identical to this PR. :smile:
Oh damn I missed that one!
Think there are some factors the other PR doesn't cover so I'll leave this up for now unless you want me to close it
Thank you for finding
Think there are some factors the other PR doesn't cover so I'll leave this up for now unless you want me to close it
Let @akien-mga decide what to do about this PR and #60888. Either way I think the changes need a review from @reduz.
Hi @akien-mga can we please get some traction on this PR?
It unblocks the basic scenarios of atlas textures which are very important for any 2D game.
Also added a fix to ensure group files are updated properly after reimport, previously they would only be imported if the group file itself was reimported
After your latest commit, I deleted the .godot folder, and that seemed to error out one specific atlas file. I reinitialized its constituents as a new atlas file and all seems to be fine.
Any reason you deleted the .godot folder? It would error stuff if it is not initialized again probably, as some of the parameters have changed if you are using both this and #68380, not sure what you are asking about or what the issue is.
I always delete the .godot folder after a fresh build. Is that not good practice?
I am not using #68380 with this, for issues I have mentioned in the PR.
I just thought I should mention this, in case you have any insight into the reason for this. It only messed with one specific file, so it could be simply due to the deletion of the folder.
Otherwise, everything is working well.
Got it! Suspect it's just because of the deletion if it works well after
Thanks!
Thank you again :)
@akien-mga I guess #60888 can be closed then (see https://github.com/godotengine/godot/pull/68324#issuecomment-1304852353).
Really great work
Thank you! Sorry forgot to reply before