mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-06 12:39:57 +00:00
Check that -sheet keeps the transparent color index of the source
This commit is contained in:
parent
3c336cb997
commit
4fb4c30ecb
14
cli/sheet.sh
14
cli/sheet.sh
@ -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
|
||||
|
@ -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
BIN
sprites/bg-index-3.aseprite
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user