aseprite / api

Scripting API for Aseprite
https://www.aseprite.org/api/
MIT License
238 stars 48 forks source link

Cutom output format #21

Open amundgr opened 5 years ago

amundgr commented 5 years ago

Hi! I am trying to create a script that can save an animation from aseprite to my own custom file format. I already have the python script that converts a aseprite file to my format and i am able to run that script from Lua. The only problem that i have is that i first need to save the animation as a aseprite file and then converting it and if that is going to work, then i need to be able to get the path to were the file was saved. Are there any way to use app.command.SaveFileAs and get the path it saved the file to? If not, can i send an argument to app.command.SaveFileAs which says where it should save it?

PureAsbestos commented 4 years ago

The trick is to use Sprite:saveAs(filename) or Sprite:saveCopyAs(filename) You can use it with the current sprite by using app.activeSprite