From 02e0c89562026a9e557575e1527ab37e49928dd9 Mon Sep 17 00:00:00 2001 From: annabunches Date: Mon, 29 Jul 2024 22:30:13 -0400 Subject: [PATCH] Duplicate menu options in top Layer menu. --- advanced-spritesheet-export.lua | 51 ++++++++++++++++++++++++++++----- 1 file changed, 44 insertions(+), 7 deletions(-) diff --git a/advanced-spritesheet-export.lua b/advanced-spritesheet-export.lua index 395e3d4..705cb36 100644 --- a/advanced-spritesheet-export.lua +++ b/advanced-spritesheet-export.lua @@ -4,7 +4,7 @@ local cmd = require "abase-commands" function init(plugin) plugin:newCommand{ - id="AnnabunchesASEExportSpritesheetAdvanced", + id="ABASEExportSpritesheetAdvanced", title="Export Spritesheet (Advanced)", group="file_export_1", onclick=function() @@ -19,19 +19,56 @@ function init(plugin) group="layer_popup_merge" } - plugin:newCommand{ - id="AnnabunchesASEToggleIgnoreLayer", - title="Ignore on Export", + plugin:newMenuSeparator{ + group="layer_merge" + } + + plugin:newMenuGroup{ + id="abase_layer_settings", + title="Advanced Export", + group="layer_merge", + } + + plugin:newMenuGroup{ + id="abase_layer_settings_popup", + title="Advanced Export", group="layer_popup_merge", + } + + plugin:newCommand{ + id="ABASEToggleIgnoreLayer", + title="Toggle Ignore", + group="abase_layer_settings", onclick=function() cmd.ToggleIgnore() end } plugin:newCommand{ - id="AnnabunchesASEToggleExportAsSprite", - title="Export as Sprite", - group="layer_popup_merge", + id="ABASEToggleIgnoreLayerPopup", + title="Toggle Ignore", + group="abase_layer_settings_popup", + onclick=function() + cmd.ToggleIgnore() + end + } + + plugin:newCommand{ + id="ABASEToggleExportAsSprite", + title="Toggle Merge Group", + group="abase_layer_settings", + onclick=function() + cmd.ToggleExportAsSprite() + end, + onnenabled=function() + return app.layer.isGroup + end + } + + plugin:newCommand{ + id="ABASEToggleExportAsSpritePopup", + title="Toggle Merge Group", + group="abase_layer_settings_popup", onclick=function() cmd.ToggleExportAsSprite() end,