View ase.diff
diff --git a/aseprite/docs/ase-file-specs.md b/aseprite-beta/docs/ase-file-specs.md | |
index 7199cab..98d8c95 100644 | |
--- a/aseprite/docs/ase-file-specs.md | |
+++ b/aseprite-beta/docs/ase-file-specs.md | |
@@ -25,7 +25,10 @@ ASE files use Intel (little-endian) byte order. | |
* `PIXEL`: One pixel, depending on the image pixel format: | |
- **RGBA**: `BYTE[4]`, each pixel have 4 bytes in this order Red, Green, Blue, Alpha. | |
- **Grayscale**: `BYTE[2]`, each pixel have 2 bytes in the order Value, Alpha. | |
- - **Indexed**: `BYTE`, Each pixel uses 1 byte (the index). | |
+ - **Indexed**: `BYTE`, each pixel uses 1 byte (the index). |
View Rotate Timeline Position.lua
app.preferences.general.timeline_position = | |
(app.preferences.general.timeline_position + 1) % 3 |
View Export Opaque Sprite Sheet.lua
local spr = app.activeSprite | |
if not spr then return print("No active sprite") end | |
app.command.ExportSpriteSheet() | |
if app.activeSprite ~= spr and | |
spr.backgroundLayer and | |
spr.colorMode == ColorMode.INDEXED then | |
local oldColor = app.bgColor | |
app.bgColor = Color(spr.transparentColor) | |
app.command.BackgroundFromLayer() | |
app.bgColor = oldColor |
View Select All Frames.lua
local spr = app.activeSprite | |
if not spr then return print("No active sprite") end | |
local frames = {} | |
for i=1,#spr.frames do | |
frames[i] = i | |
end | |
app.range.frames = frames |
View Swap Opacity.lua
if opacitydlg then | |
local toolPref = app.preferences.tool(app.activeTool) | |
local newValue = opacitydlg.data.opacity | |
opacitydlg.data = { opacity=toolPref.opacity } | |
toolPref.opacity = newValue | |
return | |
end | |
local dlg = Dialog{ title="Swap Opacity", onclose=function() opacitydlg=nil end } | |
dlg:slider{ id="opacity", min=0, max=255, value=app.preferences.tool(app.activeTool).opacity/2 } |
View export-palette.lua
-- Usage: aseprite.exe -b my-sprite.aseprite -script export-palette.lua | |
-- | |
-- Or from the UI you will see the output in a console that you can copy with Ctrl+C | |
-- | |
local spr = app.activeSprite | |
if not spr then return print("No active sprite") end | |
local pal = spr.palettes[1] | |
print("const char palette[] = {") |
View Copy-Frames-From-Files.lua
local filenames = { | |
"/Users/david/piano00.png", | |
"/Users/david/drums00.png", | |
"/Users/david/bass00.png" | |
} | |
local spr = app.activeSprite | |
if not spr then return app.alert "No active sprite" end | |
for _,fn in ipairs(filenames) do |
View New Sprite with Preset.lua
local s = Sprite(256, 256, ColorMode.RGB) | |
s:setPalette(Palette{ fromResource="DB32" }) |
View bash_profile.sh
#! /bin/bash | |
# open file/folder/url | |
if [[ "$(uname)" =~ "Darwin" ]] ; then | |
true # do nothing because macOS already have "open" command | |
elif [[ "$(uname)" == "Linux" ]] ; then | |
alias open=xdg-open | |
else | |
alias open=start | |
fi |
View ctrl-space.aseprite-keys
<?xml version="1.0" encoding="utf-8" ?> | |
<keyboard version="1"> | |
<commands /> | |
<tools /> | |
<quicktools> | |
<key tool="zoom" shortcut="Ctrl+Space" /> | |
</quicktools> | |
<actions /> | |
<wheel /> | |
</keyboard> |
NewerOlder