blackears / cyclopsLevelBuilder

A Godot plugin to let you block in levels inside the Godot editor.
MIT License
920 stars 36 forks source link

Add .import files to create_addon_archive.py #167

Closed ashelleyPurdue closed 1 month ago

ashelleyPurdue commented 1 month ago

This should fix issue 127: https://github.com/blackears/cyclopsLevelBuilder/issues/127

blackears commented 1 month ago

The point of the script was to avoid including the .import files. It was causing issues on some people's machines. The way I understand how Godot works, these files are not supposed to be checked in. I know there are installation issues with Cyclops at the moment- I hope to address this when I get enough time to get back to this.

ashelleyPurdue commented 1 month ago

Import files are supposed to be checked in, as per the Godot docs. It is in fact the lack of them that causes problems on other peoples' machines(and the fact that the original import files are present on your machine is why you're unable to reproduce issue 127). See my comment on issue 127 for an explanation.

The script is still useful for avoiding including the .aesprite and .blend1 files(although, personally, I think the blend1 files should be getting gitignored as well), which is why I simply added ".import" to it instead of getting rid of the script entirely.

darkhog commented 1 month ago

@blackears Import files store important data allowing Godot to read the data correctly, such as e.g. the import settings of a texture (bit depth, whether it's a normalmap or not, etc.). They're vital for Godot to read stuff correctly, otherwise it will make the best guess which may be good or may be bad.

Also, leaving import files in seems to make import process much smoother as I've just tested. It both cut down on amount of errors I was getting (still had to restart Godot after import) and stopped funky stuff from happening (when upgrading my project from 1.0.2 to 1.0.3 the entire scene went completely blank except non-Cyclops stuff and I was worried for a bit that I lost weeks of work (of course wouldn't lose it even if it was the case as I made a backup and even if not, there was healthy version of it in source control), but not when the import files were intact.

So yeah, adding the ".import" to the extensions array would be a good idea.

blackears commented 1 month ago

I've checked in changes so the .import files are now part of the archive.