GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - aseprite/api: Scripting API for Aseprite

BranchesTags
Open more actions menu

Latest commit

 

History

452 Commits
452 Commits

Folders and files

NameName
Last commit message
Last commit date
api
api
 
 
Changes.md
Changes.md
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
sidebar.md
sidebar.md
 
 

Repository files navigation

Aseprite API

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:

  1. 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).
  2. 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.
  3. Open one or several existing files: You can use app.open to load a sprite from the disk and then modify it.
  4. 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.
  5. Show a dialog to the user: The Dialog object gives you the possibility to show controls to the user to enter values.
  6. 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
  • The Debug Library

About

Scripting API for Aseprite

www.aseprite.org/api/

Resources

Readme
MIT license
Activity
Custom properties

Stars

316 stars

Watchers

15 watching

Forks

68 forks
Report repository

Releases

Packages

Used by

Contributors

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.