Add keyboard shortcuts.

This commit is contained in:
Anna Rose 2024-07-30 20:44:35 -04:00
parent 9eb6d2a0a6
commit 82e1ab7523
5 changed files with 26 additions and 14 deletions

View File

@ -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

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8" ?>
<keyboard version="1">
<commands>
<key command="ABASEExportSpritesheetAdvanced" shortcut="Ctrl+Alt+E" mac="Ctrl+Cmd+E"/>
<key command="ABASEToggleIgnoreLayer" shortcut="Ctrl+Alt+I" mac="Ctrl+Cmd+I"/>
<key command="ABASEToggleExportAsSprite" shortcut="Ctrl+Alt+M" mac="Ctrl+Cmd+M"/>
</commands>
</keyboard>

View File

@ -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
}

View File

@ -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"}
]
}
}

View File

@ -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