Change every layer's visibility in group

hi tmdemd! yes, working with groups can be tricky, but luckily for us we can use scripts.
following will hide or show every layer in group:

local sel = app.layer 
local visibility = sel.isVisible 
sel.isVisible = not visibility 

if sel.isGroup then 
	for i, layer in ipairs(sel.layers) do 
		local visible = layer.isVisible
		if visible == visibility then 
			layer.isVisible = not visibility 

for convenience i recomment to set the keyboard shortcut to run the script.
hope it helps.

PS.: the script is super simple, so it will work only on single selected group. also note that the script is NOT recursive, meanig the visibility of any group nested in parent group will be set accordingly, but the layers inside will keep their visibility setting (default aseprite behaviour).

this also means that any already hidden layers inside the group will be eventually switched on. if you need quick clean up of layer stack, you can use this script.