From da8928be0f4fe5d69deaae5fe2a4d12da46ce4e6 Mon Sep 17 00:00:00 2001 From: annabunches Date: Sun, 11 Aug 2024 22:46:40 -0400 Subject: [PATCH] Fix hidden layers not being exported correctly. --- abase-commands.lua | 4 ++-- abase-layer.lua | 1 - package.json | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/abase-commands.lua b/abase-commands.lua index 61236eb..060663e 100644 --- a/abase-commands.lua +++ b/abase-commands.lua @@ -10,9 +10,9 @@ local function ExportSpritesheetAdvanced() local spr = Sprite(app.sprite) + l.RevealLayers(spr.layers) l.DeleteLayers(spr, spr.layers) l.FlattenLayers(spr.layers) - l.RevealLayers(spr.layers) app.command.ExportSpriteSheet { splitLayers = true @@ -46,7 +46,7 @@ local function ToggleExportAsSprite() merge = true end end - + for _, layer in ipairs(app.range.layers) do p.SetMerged(layer, merge) c.SetColorFromRoot(layer) diff --git a/abase-layer.lua b/abase-layer.lua index 09acb12..75d64d6 100644 --- a/abase-layer.lua +++ b/abase-layer.lua @@ -34,7 +34,6 @@ local function FlattenLayers(layers) end -- Makes all layers visible. --- This should be called after deleteLayers and flattenLayers local function RevealLayers(layers) for _, layer in ipairs(layers) do if layer.isGroup then diff --git a/package.json b/package.json index f3cb8f9..1bb55e9 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "advanced-spritesheets", "displayName": "Advanced Spritesheets", "description": "Improved spritesheet export functionality for Aseprite.", - "version": "0.1", + "version": "0.1.1", "author": { "name": "Anna Wiggins", "email": "annabunches@gmail.com", "url": "https://annabunches.net" },