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

Aseprite command failed. Please, check if the right command is in your PATH or configured through "Editor > Editor Settings > Aseprite > General > Command Path" #151

Closed DawidGaleziewski closed 2 months ago

DawidGaleziewski commented 3 months ago

Hi, Hope you are doing well. I am quite new to godot and I am trying to use your plugin. However I have some issues on start. I am using godot 4.2.1 stable on macOS with sprite wizard 7.4.0.

When trying to setup the plugin and add the path to 'Editor > Editor Settings > Aseprite > General > Command Path' it seems my path is not being read. the path I am currently using is: 'Library/Application Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite' (I use aspire from steam).

However I have also tried Library/Application\ Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite

And Library/Application' 'Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite

(also tried to put whole path in double quotes/single quotes etc.) When I run this path from terminal I will get aseprite opened, despite that the path doesn't work.

I was playing around with some other settings and this error popped up (changing 'layers' option):

["sh: Library/Application\ Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite: No such file or directory\n"]

seems to me that the code underneath is escaping the escape character, same when I put the path in single quotes it will add '\'. Am I doing something wrong or maybe is there a way to workaround this?

DawidGaleziewski commented 3 months ago

I just copied the files to /Applications/Aseprite.app/Contents/MacOS/aseprite and it's working. But I am leaving the issue opened if you wan't to correct this :)

viniciusgerevini commented 2 months ago

Hello @DawidGaleziewski . I'm happy you were able to fix your issue.

From your comment you say you were using this path: Library/Application Support/Steam/steamapps/common/Aseprite/Aseprite.app/Contents/MacOS/aseprite. Given you repeated it a few times I assume there are no typos in it.

Escaping the space character is expected behaviour, otherwise it would be read as two paths. The first thing I noticed is that your path is missing the initial /. If that's really the case, this is likely the reason why it was not working in the first place. By not including the initial / the path will be resolved as relative to Godot instead of absolute from the root.

I just copied the files to /Applications/Aseprite.app/Contents/MacOS/aseprite and it's working.

This is good to know. If this is the case even for steam installed apps I reckon I can set this one as default for MacOS, which would reduce the friction. Cheers.