viniciusgerevini / godot-aseprite-wizard

Godot Editor plugin to help import Aseprite animations to AnimationPlayers, AnimatedSprites and SpriteFrames.
MIT License
821 stars 42 forks source link

Bugfix: res:/ was being set as default output instead of res:// #150

Closed HexBlit closed 2 months ago

HexBlit commented 3 months ago

Working on a new video I was trying to export via reimport button on the import tab and got the error:

Error importing 'res://bluesquare.aseprite'. ERROR - Could not import aseprite file: output location does not exist
Screenshot 2024-06-02 153830
When investigating I found the folder dir was being set to res:/ instead of res:// causing export failures. see screenshot below of the discovery.
Screenshot 2024-06-02 154114

This fix adds the +1 to finding the '/' on the directory so 'res://' is the output on the 3 options.

HexBlit commented 3 months ago

Any chance this can get reviewed and merged?

viniciusgerevini commented 2 months ago

Thanks for fixing this. It seems that this only happens when saving the file in the root directory. That line of code is legacy that was likely copied over to the other places. There is a better way to do that. Do you mind changing the output folder line to be:

var source_path = source_file.get_base_dir()

Cheers

HexBlit commented 2 months ago

@viniciusgerevini done!

viniciusgerevini commented 2 months ago

Awesome. Thank you.