Batch scripting and ExportSpriteSheet

I have been working with aseprite scripting today to automate my pipeline and it’s been pretty smooth so far until I hit a roadblock.

My script does everything I need to when I run it from inside Aseprite or from command line without the (-b) option.

When I run it with the -b option:

  1. It does not block the console until the script is completed as I would expect from a batch mode. This does not allow me to run multiple scripts one after the other once the previous is completed
  2. app.command.ExportSpriteSheet does not seem to work and the debug log file says: “CTXT: Command ExportSpriteSheet is disabled”

Anyone experienced something similar and hopefully have a solution/workaround?

Thank you!

Hi @pokot0, is it possible that you are running the app.command.ExportSpriteSheet() function without opening a sprite first (so there is nothing to export). That might be a possibility for the “Command ExportSpriteSheet is disabled” message.

For example, you can try:

aseprite.exe -b my-sprite.aseprite -script my-export-script.lua

Where my-export-script.lua calls app.command.ExportSpriteSheet() (and the sprite to export is the active sprite, which is my-sprite.aseprite specified in the CLI initially to open and have an active sprite for the command.