Feedback
- press ENTER to search or ESC to cancel
Table of content
Globals namespaces
Constants
- Align
- AniDir
- BlendMode
- BrushPattern
- BrushType
- ColorMode
- FilterChannels
- Ink
- MouseButton
- MouseCursor
- RangeType
- SelectionMode
- SpriteSheetDataFormat
- SpriteSheetType
- WebSocketMessageType
Classes/objects
- Brush
- Cel
- Color
- ColorSpace
- Dialog
- Editor
- Events
- Frame
- GraphicsContext
- Image
- ImageSpec
- KeyEvent
- Layer
- MouseEvent
- Palette
- Plugin
- Point
- Properties
- Range
- Rectangle
- Selection
- Site
- Size
- Slice
- Sprite
- Tag
- Tile
- Tileset
- Timer
- Tool
- TouchEvent
- Version
- WebSocket
- Window
API Changes
We will try minimize API changes between versions and keep backward compatibility, but if a function in the API was introduced with a bug, it's probable that its behavior will change in the next Aseprite release.
Deprecated should be avoided because might be removed in future versions of Aseprite.
Detect available API
You can use app.apiVersion
:
if app.apiVersion == nil then
-- First scripting API available
app.alert("This is Aseprite v1.2.10-beta1 or v1.2.10-beta2")
elseif app.apiVersion == 1 then
-- Second revision of the scripting API
app.alert("This is Aseprite v1.2.10-beta3")
else
-- Future versions will be 2, 3, etc.
end
v1.3.7
app.apiVersion
is28
- New
app.os
with some properties about the running platform - New
recent
parameter to SaveFile and ExportSpriteSheet commands
v1.3.3
app.apiVersion
is27
- Fixed some bugs using tabs widget #4288, #4268
v1.3-rc7
app.apiVersion
is26
- New
Dialog:tab()/endtabs()
widget - New
Dialog:show{ autoscrollbars=true }
parameter - New
app.editor:askPoint{ decorate={ rulers=true, dimmed=true } }
options - New
Align
enum - New
Image.bytesPerPixel
property
v1.3-rc5
app.apiVersion
is25
- Removed
App.events
'beforepaintemptytilemap'
- New
app.window
object. - New integrated
json.decode()
andjson.encode()
functions.
v1.3-rc4
app.apiVersion
is24
- New
Image:flip()
function andFlipType
- New
App.events
:'beforecommand'
,'aftercommand'
,'beforepaintemptytilemap'
v1.3-rc3
app.apiVersion
is23
- New
require()
function - New
app.editor
andEditor
object - New
plugin.name
andplugin.path
properties - New
Cel.zIndex
property - New
Uuid
class - New
image:clear(bounds, color)
variant (we can specify a Rectangle to clear) - New short property names for active objects: app.sprite (same as app.activeSprite), app.layer/frame/cel/tag/tool/brush
- New width/height short names for Rectangle.w/h and Size.w/h
- New
gridBounds
parameter toapp.command.NewLayer
v1.3-rc2
app.apiVersion
is22
- New
app.uiScale
property - New
app.theme:styleMetrics()
function - New
plugin:newMenuGroup()
andplugin:newMenuSeparator()
functions - New
Size:union()
function - New GraphicsContext.opacity/blendMode properties
- New GraphicsContext:oval() function
- Renamed
KeyEvent:repeat
toKeyEvent:repeatCount
- New
ondblclick
event for Dialog:canvas() widget
v1.3-rc1
app.apiVersion
is21
- New
ev
argument forSprite.events:on('change', ...)
callback to detect if the change is from an undo/redo change (related to #3539) - New AniDir.PING_PONG_REVERSE field
- New Tag.repeats field
- New Sprite.isModified property
- New Image.bounds property and Image:shrinkBounds() function
- New app.theme class
- New Dialog:canvas() widget
- New GraphicsContext class
- New Rectangle.origin and Rectangle.size properties
- New Tile and new Sprite:newTile()
- New Timer class
- New properties field for several objects
v1.2.40 & v1.3-beta21
app.apiVersion
is20
- Added app.range.slices object
-
Only in v1.3-beta21:
- Added
bounds
parameter to app.command.SaveFileCopyAs command - Added
splitGrid
&fromTilesets
parameters to app.command.ExportSpriteSheet command
- Added
v1.2.36
app.apiVersion
is19
- Fixed several issues with app.command.SaveFile/SaveFileAs/SaveFileCopyAs commands
- Fixed Sprite:newSlice, now it adds undo information
v1.2.35
app.apiVersion
is18
- Now
Dialog()
returnsnil
if we are running in-batch
mode - New
Cel.frame
/Cel.frameNumber
setters - Comparing
Layer
s withSprite
s just return false #3218
v1.2.33
app.apiVersion
is17
- New
Color{ index }
- Now
Color.index
returns an integer instead of a number
v1.2.31
app.apiVersion
is16
- New
filenamechange
event forSprite.events
- Possibility to change
options
field forDialog:combobox()
fromDialog:modify()
v1.2.30
app.apiVersion
is15
- New
onenabled
attribute forplugin:newCommand()
- New
App.events
andSprite.events
properties, andEvents
class - New
Image.bytes
andImage.rowStride
properties - New
WebSocket
class andWebSocketMessageType
constants - New
Layer.isReference
property
v1.2.28
app.apiVersion
is14
- Added
selection
argument toapp.useTool{}
to use selection tools - New
SelectionMode
-
In v1.3-beta1
- New
Layer.isTilemap
- New
Tileset
- New
v1.2.26
app.apiVersion
is13
- New
app.fs.makeDirectory
/app.fs.makeAllDirectories
/app.fs.removeDirectory
functions to manipulate directories - Added
Sprite.pixelRatio
property - Added
app.command.ImportSpriteSheet
.
v1.2.22
app.apiVersion
is12
- New
app.command.CanvasSize()
params (ui
andbounds
) - Fixed crash undoing
Sprite:newCel()
in background layer - Fixed
Dialog onclose
event, now it's called when we close the app and the dialog is still opened #28 -
API changes:
- You must use
Dialog:newrow{ always=true }
to activate the automatic "newrow" (Dialog:newrow{ always }
cannot be used) - You must use
ColorSpace{ sRGB=true }
to create an sRGB color space (ColorSpace{ sRGB }
cannot be used) - Now
app.command.SetInkType{ type=... }
works
- You must use
v1.2.19
app.apiVersion
is11
- Added support to modify more properties with
Dialog:modify{}
(PR#2359, separator text #27) - Added some extra
onchange
andonrelease
events for some widgets likeDialog:slider{}
(PR#2359) - Added more arguments (
bgColor
,ink
,button
,opacity
,contiguous
,tolerance
,freehandAlgorithm
) toapp.useTool{}
- New Ink constants
v1.2.18
app.apiVersion
is10
- New
Tag.color
property - New
MouseButton
which enumerates possible values for the newev.button
value of theDialog:shades{ onclick }
widget callback - New
Dialog:modify{}
method to change widget properties dynamically - New
Dialog:newrow{ always=true }
variant - New
Range:clear()
function - New
Range.layers
andRange.frames
setters
v1.2.17
app.apiVersion
is9
- New
app.fs
with several functions to handle filenames and paths - New
Dialog{ onclose }
constructor with a table with fields liketitle
andonclose
- New
Dialog:shades{}
widget - New
Image:saveAs{ filename, palette }
function
v1.2.16.3
app.apiVersion
is8
- Fixed
Layer.stackIndex
setter when the number we use is higher than the currentstackIndex
of the layer - Now
app.preferences.document(nil)
returns the default preferences for documents
v1.2.16
app.apiVersion
is7
- Added
Sprite.gridBounds
property
v1.2.15
app.apiVersion
is6
- Fixed
Sprite:resize()
: Now it can resize the non-active sprite. - Fixed
Sprite:newTag()
: Adds undo information (can be used inside a transaction now).
v1.2.14
app.apiVersion
is5
- Added filter commands:
- New types:
- Added support to convert arrays of 2 or 4 integers into points, sizes, and rectangles.
- Added
Range.colors
andRange.containsColor
members. And new commandsCopyColors
/MoveColors
. - Added
Image:resize()
function. - Changed
Sprite:resize()
behavior: resizes the sprite and images (not only the canvas). Sprite.layers
returns only the first level of layers (in previous versions it returned all the layers, even sublayers inside groups).- New
Layer.layers
property to get the layer groups - Possibility to change
Layer.parent
property - New
Layer.stackIndex
property to reorder layers
v1.2.13
app.apiVersion
is4
app.useTool()
now can be used inside aapp.transaction()
(#18)- New params for
app.command.NewFile
.
v1.2.10
app.apiVersion
is3
app.version
is anVersion
object-
Sprite
- Added
sprite:close()
function - Added
sprite:assignColorSpace()
andsprite:convertColorSpace()
- Now
sprite:saveAs()
changes the state of the sprite as a saved document - Now you can set
sprite.filename
property
- Added
- New
ColorSpace
class. - New
focus
property for Dialog:button and Dialog:entry. - New parameters for
ExportSpriteSheet
. - New
app.useTool()
,Brush
,Tool
class.
v1.2.10-beta4
app.apiVersion
is2
- Fixed
app.sprites
table - Added
app.params
table
v1.2.10-beta3
-
app
- New
app.apiVersion
with value1
. -
Different return value for
app.activeFrame
: Now it returns aFrame
instead of a frame number (an integer value). In v1.2.10-beta2 this function returnednil
when we were in the first frame, now it returns the validFrame
object withframe.frameNumber = 1
. You can access the old frame number value doing:local activeFrameNumber = app.activeFrame.frameNumber
- New
app.range
- New
-
Site
- Different return value for
app.site.frame
: Now it returns aFrame
instead of a frame number.
- Different return value for
-
Rectangle
- Added
Rectangle.contains
function. - Added
Rectangle.intersect
function. - Added
Rectangle.intersects
function. - Added
Rectangle.union
function.
- Added
-
Sprite
- Added
Sprite.bounds
property. - Different
Sprite:newFrame
andSprite:newEmptyFrame
behavior (check documentation and issue #4).
- Added
-
Image
- Added
Image:clear()
function. - Added
Image:isEqual
,Image:clear
. - Added
Image:drawPixel
as an alias forImage:putPixel
(both functions will be available). - Deprecated
, replaced withImage:putImage
Image:drawImage
. - Deprecated
, replaced withImage:putSprite
Image:drawSprite
. AlsoImage:putSprite
wasn't working correctly for positions !=0,0
.
- Added
-
ColorMode
:- Deprecated
, replaced withColorMode.GRAYSCALE
ColorMode.GRAY
.
- Deprecated
-
Tag
:- Different return value for
Tag.fromFrame
andTag.toFrame
: now they return aFrame
object instead of an integer value.
- Different return value for
- All functions that receive an integer can automatically accept
floating numbers doing an implicit
math.floor(number)
conversion.
v1.2.10-beta2
-
app
app.apiVersion
didn't exist (isnil
)