Check that -sheet keeps the transparent color index of the source

This commit is contained in:
David Capello 2019-10-01 10:12:22 -03:00
parent 3c336cb997
commit 4fb4c30ecb
3 changed files with 16 additions and 0 deletions

View File

@ -119,3 +119,17 @@ end
assert(expected:isEqual(sheet.cels[1].image))
EOF
$ASEPRITE -b -script "$d/compare.lua" || exit 1
# Test that the transparent color persists in the output sheet
d=$t/sheet-custom-transparent-index
if ! $ASEPRITE -b sprites/bg-index-3.aseprite -sheet "$d/sheet.aseprite" -data "$d/sheet.json" ; then
exit 1
fi
cat >$d/compare.lua <<EOF
local original = Sprite{ fromFile='sprites/bg-index-3.aseprite' }
assert(original.transparentColor == 3)
local sheet = Sprite{ fromFile='$d/sheet.aseprite' }
assert(sheet.transparentColor == 3)
EOF
$ASEPRITE -b -script "$d/compare.lua" || exit 1

View File

@ -10,3 +10,5 @@
three layers each one (called "a", "b", "c" too). There is a
combination of visibilities ("b/b", "c", "c/a", and "c/b" are
hidden).
* `bg-index-3.aseprite`: Indexed, 4x4, two layers ("fg" and "bg")
with a special transparent index color (= palette index 3).

BIN
sprites/bg-index-3.aseprite Normal file

Binary file not shown.