IMPORTANT: As of version 1.2.17 of Aseprite (March 11, 2020, about three months after I released this script) this Lua script has been rendered obsolete by the addition of tile selecting, which can be done by double-clicking and then dragging the mouse. This script might be useful for other purposes, and so it will remain here, but otherwise, this script might not be useful to you anymore.
SnapSelection is a Lua script for Aseprite that snaps your current selection to the grid.
What It Does:
SnapSelection will Snap your current Selection to the Grid, as configured in
View > Grid > Grid Settings.
SnapSelection will only work properly on a rectangular Selection. Selections created with the Lasso or other non-rectangular Selections will be converted to a rectangle by this script.
- The Selection is Snapped by moving the top left corner of the Selection to the left and up, and the bottom right corner down and to the right. Therefore, your selection must never be bigger than the cells you are trying to Snap it to.
SnapSelection won't work if you are not working on a Sprite, or if you have not made a Selection yet.
- In Aseprite, go to
File > Scripts > Open Scripts Folder. This should open an Explorer window on
<Aseprite program folder>/scripts.
- Copy the file
SnapSelection.lua to this folder, close Explorer and restart Aseprite.
- The next time you open Aseprite, the script will be available for you to use in the
- While editing a Sprite, you must first make a Selection using any of the tools provided by Aseprite for such purpose.
- Go to
File > Scripts > SnapSelection, and this will automatically run the
SnapSelection script, which will Snap your Selection to the Grid.
- You can also bind it to a
Keyboard Shortcut by using the available option in the
Edit menu. Read the Aseprite documentation for more information.
In case of a bug or any other kind of unintentional behavior, feel free to contact me at
kidmarscat [at] gmail.com or leave a comment below.
2019–12–19 — 0.1 — First Release