On GitHub, aseprite/api has picked up 314 stars. Scripting API for Aseprite
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
This is the scripting API for Aseprite. Since version 1.2.10 you
are able to create scripts with Lua.
You can find some examples
for this API or some tests.
Where to start
Generally you will want to write a script to solve a problem or to do
a little experiment, so you have six options to approach your idea:
Transform the active sprite: In this case
app.sprite will give you access
to the current sprite (it's nil if there is no active sprite,
e.g. we are in the Home tab).
Create a new sprite : Here the
Sprite() function creates a new
sprite and sets it as the active one. From there you can modify the
Sprite object as you want.
Open one or several existing files: You can use
app.open to load a sprite from the disk and
then modify it.
Save the modified sprite: After you have done some modifications
to a sprite, you might want to save the result directly to the
disk, Sprite:saveCopyAs() function is a
good option to export the modified sprite.
Show a dialog to the user: The Dialog object
gives you the possibility to show controls to the user to enter values.
Add new options to any menu: In this case you'll need to create a
plugin with a script.
API Changes
API changes between versions.
Reference
Global namespace
app
app.clipboard
app.command
app.fs
app.os
app.pixelColor
app.theme
json
Constants
Align
AniDir
BlendMode
BrushPattern
BrushType
ColorMode
FilterChannels
FlipType
Ink
MouseButton
MouseCursor
RangeType
SelectionMode
SpriteSheetDataFormat
SpriteSheetType
TilemapMode
TilesetMode
WebSocketMessageType
Classes/objects
Brush
Cel
Color
ColorSpace
Dialog
Editor
Events
Frame
GraphicsContext
Grid
Image
ImageSpec
KeyEvent
Layer
MouseEvent
Palette
Plugin
Point
Range
Rectangle
Selection
Site
Size
Slice
Sprite
Tag
Tile
Tileset
Timer
Tool
TouchEvent
Version
Uuid
WebSocket
Window
Lua libraries
Base library and Basic Functions in Lua manual
Coroutine Manipulation
String Manipulation
UTF-8 Support
Table Manipulation
Mathematical Functions
Operating System Facilities
Some functions like os.exit, os.tmpname are not available yet
Other functions like os.execute and io.open will ask for permissions to the user
Yes — aseprite/api ships under the MIT license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/aseprite/api.
What is aseprite/api?
aseprite/api (aseprite/api) is a multi-language project on GitHub. From the project's own README: Scripting API for Aseprite
Where do I read more about aseprite/api?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/aseprite/api is the definitive source.
Read full README in the tab above.
Still deciding about api?
One click hands the question to an AI along with this page — see what it says about api.