Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Little Aseprite script to swap the opacity value with an alternative value specified in a floating dialog
if opacitydlg then
local toolPref = app.preferences.tool(app.activeTool)
local newValue = = { opacity=toolPref.opacity }
toolPref.opacity = newValue
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