flixel icon indicating copy to clipboard operation
flixel copied to clipboard

Aseprite plugin

Open Geokureli opened this issue 2 years ago • 10 comments

Continuation from https://github.com/HaxeFlixel/flixel-demos/pull/326

We need to add Aseprite here and add a download for the plugin. it's essentially a zip but the extension is not .zip so computers may not whine about security issues

Geokureli avatar Oct 18 '23 17:10 Geokureli

some things to look into later, be nice if we could:

  • change the tags' "repeat" field to something more intuitive
  • use slices in some way
  • add a flixel-tools command to install it, or at least distribute it

Geokureli avatar Oct 18 '23 17:10 Geokureli

Quick summary from the other issue:

  • WIP of Aseprite plugin to provide decent settings for Exporting Sprite Sheets: https://github.com/MondayHopscotch/aseprite-scripts
  • Plugin relies on the functionality of the existing Export Sprite Sheet command

Current Options as of writing this comment (v0.5): Aseprite_G9dqgW601V

"Customize Export Settings", when checked, clicking Confirm opens the aforementioned Export Sprite Sheet dialog in case user wants to change any settings prior to export. When unchecked, atlas files are immediately created/saved upon clicking Confirm

I figure for visibility, this issue is a good place to discuss desired functionality of the plugin for whatever we want to call "v1.0"

MondayHopscotch avatar Oct 18 '23 18:10 MondayHopscotch

bet 10$ "Ask before overwriting existing files" won't work on mac

Geokureli avatar Oct 18 '23 18:10 Geokureli

bet 10$ "Ask before overwriting existing files" won't work on mac

I'm only tapping into an existing option that was already part of the Export Sprite Sheet, so if it works for other parts of Exports in Aseprite, it should work just the same here. I have no way to test Mac, though. I've got Windows and Linux at home.

MondayHopscotch avatar Oct 18 '23 19:10 MondayHopscotch

I've never seen that option, what version are you on? I'm using 1.3-rc6 Screenshot 2023-10-18 at 2 16 58 PM

Geokureli avatar Oct 18 '23 19:10 Geokureli

I think for the Export Sprite Sheet dialog, it always asks, but per the docs (and testing), when doing it in a script, you can set the askOverwrite property to false, if you like (it defaults to true)

Edit: And to answer your other question, I'm currently on v1.3-rc4

MondayHopscotch avatar Oct 18 '23 19:10 MondayHopscotch

I was unaware that I needed to go to File > Export > Flixel Atlas Export, but it seems to be working. Only thing I would change is I would make it trim cels: Screenshot 2023-11-14 at 11 49 15 AM

it might be good to have a default spacing of 1, too, to prevent cel bleeding on html5 (or maybe a checkbox)

Geokureli avatar Nov 14 '23 17:11 Geokureli

We can put the Menu Item wherever we want. I originally had it just as File -> Flixel Atlas Export, but it seemed more correct to have it live next to the normal Sprite Sheet export menu option. I did give it the Ctrl+Shift+F hotkey, as I didn't see any default shortcuts bound to that, and F seems appropriate for Flixel (that was the thinking, at least)

MondayHopscotch avatar Nov 14 '23 17:11 MondayHopscotch

We can put the Menu Item wherever we want. I originally had it just as File -> Flixel Atlas Export, but it seemed more correct to have it live next to the normal Sprite Sheet export menu option. I did give it the Ctrl+Shift+F hotkey, as I didn't see any default shortcuts bound to that, and F seems appropriate for Flixel (that was the thinking, at least)

this is all fine, I've just never used custom extensions before and assumed it would be in File > Scripts, lol

Geokureli avatar Nov 14 '23 18:11 Geokureli

I was unaware that I needed to go to File > Export > Flixel Atlas Export, but it seems to be working. Only thing I would change is I would make it trim cels: Screenshot 2023-11-14 at 11 49 15 AM

it might be good to have a default spacing of 1, too, to prevent cel bleeding on html5 (or maybe a checkbox)

If we want to go down the road of providing extra options, we can. My original thought for this little export helper was basically just to give a "this should just work" settings with the Customize Export Settings checkbox to give them a way to tweak anything else if they know what they are doing.

It gets a little messy with that interaction, though. Ideally, folks who know what they're doing / want custom behavior will just use the Export Spritesheet window as the Flixel Atlas Export will reset your export settings each time. I haven't figure out a way to both a) provide good defaults AND b) keep any that you change due to limitations of their scripting (or at least the limitations I've found myself with my limited knowledge)

At the moment the best workflow I have found is to use the Flixel Atlas Export and: a) just use the defaults. No "customize" checkbox b) if i check "customize" checkbox, just use regular export after that so I can continue using my custom settings without having to redo them each time

MondayHopscotch avatar Nov 14 '23 19:11 MondayHopscotch