Created
January 4, 2020 13:19
-
-
Save dacap/ecd88cbd235ff496f861f22d34723889 to your computer and use it in GitHub Desktop.
Save each cel/layer of the file in its own file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local sprite = app.activeSprite | |
for _,layer in ipairs(sprite.layers) do | |
local cel = layer.cels[1] | |
if cel then | |
cel.image:saveAs('layer-' .. cel.layer.name .. '.png') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment