diff --git a/Makefile b/Makefile index b4930dd..be7fc3e 100644 --- a/Makefile +++ b/Makefile @@ -1,2 +1,2 @@ all: - zip ./advanced-spritesheets.aseprite-extension *.lua package.json LICENSE + zip ./advanced-spritesheets.aseprite-extension *.lua *.aseprite-keys package.json LICENSE diff --git a/advanced-spritesheet-export.aseprite-keys b/advanced-spritesheet-export.aseprite-keys new file mode 100644 index 0000000..5a2cf19 --- /dev/null +++ b/advanced-spritesheet-export.aseprite-keys @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/advanced-spritesheet-export.lua b/advanced-spritesheet-export.lua index 590e21b..3cc93fa 100644 --- a/advanced-spritesheet-export.lua +++ b/advanced-spritesheet-export.lua @@ -59,9 +59,11 @@ function init(plugin) title="Toggle Merge Group", group="abase_layer_settings", onclick=function() - cmd.ToggleExportAsSprite() + if app.layer.isGroup then + cmd.ToggleExportAsSprite() + end end, - onnenabled=function() + onenabled=function() return app.layer.isGroup end } @@ -71,9 +73,11 @@ function init(plugin) title="Toggle Merge Group", group="abase_layer_settings_popup", onclick=function() - cmd.ToggleExportAsSprite() + if app.layer.isGroup then + cmd.ToggleExportAsSprite() + end end, - onnenabled=function() + onenabled=function() return app.layer.isGroup end } diff --git a/package.json b/package.json index 96c3f5b..8b7177d 100644 --- a/package.json +++ b/package.json @@ -2,18 +2,18 @@ "name": "advanced-spritesheets", "displayName": "Advanced Spritesheets", "description": "Improved spritesheet export functionality for Aseprite.", - "version": "0.0.3", + "version": "0.0.6", "author": { "name": "Anna Wiggins", "email": "annabunches@gmail.com", "url": "https://annabunches.net" }, "license": "GPL-3.0", - "categories": [ "Scripts" ], + "categories": [ "Scripts", "Keys" ], "contributes": { "scripts": [ - { "path": "./advanced-spritesheet-export.lua" }, - { "path": "./abase-listeners.lua" }, - { "path": "./abase-commands.lua" }, - { "path": "./abase-sprite.lua" } + { "path": "./advanced-spritesheet-export.lua" } + ], + "keys": [ + { "path": "./advanced-spritesheet-export.aseprite-keys"} ] } } diff --git a/readme.md b/readme.md index eaad8d5..80488d6 100644 --- a/readme.md +++ b/readme.md @@ -13,9 +13,9 @@ To install, go to Aseprite's Settings -> Extensions -> Add Extension, and select ## Usage -* All layers are exported by default. To ignore a layer or group, select Layer -> Advanced Export -> Toggle Ignore. -* To export a layer group as a single sprite, select Layer -> Advanced Export -> Toggle Merge Group. -* Invoke the tool via File -> Export -> Export Sprite Sheet (Advanced). +* All layers are exported by default. To ignore the active layer or group, select Layer -> Advanced Export -> Toggle Ignore. (default keyboard shortcut: Ctrl+Alt+I) +* To export a layer group as a single sprite, select Layer -> Advanced Export -> Toggle Merge Group. (default keyboard shortcut: Ctrl+Alt+M) +* Invoke the tool via File -> Export -> Export Sprite Sheet (Advanced). (default keyboard shortcut: Ctrl+Alt+E) ## Additional Notes