mirror of
https://github.com/aseprite/aseprite.git
synced 2024-10-06 06:50:07 +00:00
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:
parent
abaf76e0cf
commit
40d3fc131a
@ -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
|
||||
|
BIN
tests/sprites/groups4.aseprite
Normal file
BIN
tests/sprites/groups4.aseprite
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user