Created
December 16, 2020 13:05
-
-
Save dacap/dbaaed3597a7a4fa6f07c63a37705a15 to your computer and use it in GitHub Desktop.
Little Aseprite script to swap the opacity value with an alternative value specified in a floating dialog
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
if opacitydlg then | |
local toolPref = app.preferences.tool(app.activeTool) | |
local newValue = opacitydlg.data.opacity | |
opacitydlg.data = { opacity=toolPref.opacity } | |
toolPref.opacity = newValue | |
return | |
end | |
local dlg = Dialog{ title="Swap Opacity", onclose=function() opacitydlg=nil end } | |
dlg:slider{ id="opacity", min=0, max=255, value=app.preferences.tool(app.activeTool).opacity/2 } | |
dlg:show{ wait=false } | |
opacitydlg = dlg |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment