Created
November 11, 2024 11:08
-
-
Save pabloasanchez/6feef590574b8e2dbebdfd8a1bc29240 to your computer and use it in GitHub Desktop.
hide-show-all-layers.py
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
#!/usr/bin/env python | |
# A simple plugin for hiding/showing all layers. | |
from gimpfu import * | |
def hide_show_all_layers(origin, hide): | |
layers = origin.layers | |
pdb.gimp_undo_push_group_start(origin) | |
for layer in layers: | |
layer.visible = False if hide == 0 else True | |
gimp.progress_init("Processing" + origin.name + "...") | |
pdb.gimp_undo_push_group_end(origin) | |
register( | |
"hide_show_all_layers", | |
"A simple plugin for hiding/showing all layers.", | |
"Simple layer hide/show plug-in", | |
"Pablo Sanchez", | |
"MIT License", | |
"2024", | |
"Hide/Show All Layers", | |
"", | |
[ | |
(PF_IMAGE, "image", "Source image", None), | |
(PF_OPTION, "option", "Hide/Show", 0, ("Hide All", "Show All")), | |
], | |
[], | |
hide_show_all_layers, | |
menu="<Image>/Filters/User") | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment