Add test to check that the app.command.ExportSpriteSheet command

accepts layer name which is expressed by its path in the
layer hierarchy.
For example:
layer = "Group1/Layer1"
This commit is contained in:
Gaspar Capello 2024-05-17 13:14:36 -03:00
parent abaf76e0cf
commit 40d3fc131a
2 changed files with 16 additions and 1 deletions

View File

@ -1,4 +1,4 @@
-- Copyright (C) 2019-2023 Igara Studio S.A.
-- Copyright (C) 2019-2024 Igara Studio S.A.
-- Copyright (C) 2018 David Capello
--
-- This file is released under the terms of the MIT license.
@ -99,6 +99,21 @@ do -- ExportSpriteSheet
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,
})
local s = Sprite{ fromFile="sprites/groups4.aseprite" }
local c = app.pixelColor.rgba(75, 105, 47)
app.command.ExportSpriteSheet {
type=SpriteSheetType.ROWS,
textureFilename="_test_export_spritesheet4.png",
layer="G1/G2/G3/b",
trim=true,
}
local i = Image{ fromFile="_test_export_spritesheet4.png" }
expect_img(i, {
c,c,0,
c,c,0,
c,c,c,
})
end
do -- NewLayer/RemoveLayer

Binary file not shown.