Gimp-Forum.net
toggle layer visibility in GIMP 3.0 - Printable Version

+- Gimp-Forum.net (https://www.gimp-forum.net)
+-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP)
+--- Forum: Gimp 2.99 & Gimp 3.0 (https://www.gimp-forum.net/Forum-Gimp-2-99-Gimp-3-0)
+--- Thread: toggle layer visibility in GIMP 3.0 (/Thread-toggle-layer-visibility-in-GIMP-3-0)



toggle layer visibility in GIMP 3.0 - MichaJo - 10-18-2022

About 17 years ago i've written a little script "toglayvis.scm" which i myself use very often.
Meanwhile this script is being shipped with GIMP - releases.
Now the upcoming GIMP 3.0 has a new concept regarding layers.
My script uses the chain symbol as a tag which isn't existent in GIMP 3.0 anymore.
The chained layers build the the group of involved layers.
Toggleing happens between the layers WITH and the layers WITHOUT an eye icon.
So i can see differences with one click (keyboard shortcut)


Here's a gif what it does:

[attachment=8879]

Does anybody know if a similar functionality (toggle the visibility of layers) will be provided by GIMP 3.0 ?


Michael


RE: toggle layer visibility in GIMP 3.0 - Ofnuts - 10-18-2022

AFAIK layer visibility is still there in Gimp3. The big difference is that Gimp3 has multiple layer selection that replace chain links (it's a recent change in 2.99.12, so your script may have to register as being able to handle multiple layers on input (at least this is how it works for plugins now)


RE: toggle layer visibility in GIMP 3.0 - MichaJo - 10-18-2022

(10-18-2022, 10:47 PM)Ofnuts Wrote: AFAIK layer visibility is still there in Gimp3. The big difference is that Gimp3 has multiple layer selection that replace chain links (it's a recent change in 2.99.12, so your script may have to register as being able to handle multiple layers on input (at least this is how it works for plugins now)

But in 3.0 they've removed quote: "..the link feature and added instead a “layer set” feature..".
But that's the flag (link feature / chain icon) i use to choose the layers to be toggled in their visibility.
So my script won't work in 3.0.


RE: toggle layer visibility in GIMP 3.0 - Ofnuts - 10-19-2022

(10-18-2022, 11:18 PM)MichaJo Wrote:
(10-18-2022, 10:47 PM)Ofnuts Wrote: AFAIK layer visibility is still there in Gimp3. The big difference is that Gimp3 has multiple layer selection that replace chain links (it's a recent change in 2.99.12, so your script may have to register as being able to handle multiple layers on input (at least this is how it works for plugins now)

But in 3.0 they've removed quote: "..the link feature and added instead a “layer set” feature..".
But that's the flag (link feature / chain icon) i use to choose the layers to be toggled in their visibility.
So my script won't work in 3.0.

Yes... but it is half-broken in 2.10 already... Chain-linking is really for transforms. Here you can't rotate one of your layers without having to unlink/relink.

What you could be using is either:
  • Color tags:  gimp-item-get-color-tag, and gimp-item-set-color-tag and your script looks at these to toggle visibility
  • Use layer  groups (possibly with the new "pass-through" attribute) and toggle group visibility (and then you don't need a script)



RE: toggle layer visibility in GIMP 3.0 - MichaJo - 10-19-2022

(10-19-2022, 08:44 AM)Ofnuts Wrote: Yes... but it is half-broken in 2.10 already... Chain-linking is really for transforms. Here you can't rotate one of your layers without having to unlink/relink.

What you could be using is either:
  • Color tags:  gimp-item-get-color-tag, and gimp-item-set-color-tag and your script looks at these to toggle visibility
  • Use layer  groups (possibly with the new "pass-through" attribute) and toggle group visibility (and then you don't need a script)

Thanks for the hint!