You are here

Select Top/Previous/Next/Bottom Layer Only

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!
cycle-layer-visibility.scm2.9 KB

This script cycles through layers making the active layer the only visible layer (useful for hand-editing simple animations) similar to Layer > Stack > Select Next/Previous Layer.

Code License: 
GIMP Version: 
Scripting Engine: 


I folks. I'm searching for a script that will cycle through all of my layers and create and export for web jpg or png for every combination of layers. I have a backgrounf layer that is always visible and any/all of the other layers may or may not be visible. Because I can have a dozen or so layers the combinations are tedious to set up and keep track of and take a lot of time to make. I am looking for help with a script that can cycle through every combination of layers and create the export to web files. Example would be (With background always on...) background plus layer 1, background plus layer 2, background plus layer3....background layer 1 and 2, background layer 1 and 3, ... background layer 2 and 3...background plus 2, not 3, and 4... iterating through all combinations...

Thanks...I hope somebody has a solution as this is killing me...slowly :)

Here's a little tutorial I've put together for making frame-by-frame animation with the plug-in; the tutorial covers installation, setting up short-cuts, and the basic process of animation through to MonkeyJam and exporting as an AVI. I'm using this process for my animation grad-film and it's working out pretty neat!

Hi, gigadude!

This script-fu works very well - responds as intuitively anticipated.

Thanks for the props! (authorship)

How about editing your original post to include an update heading? I only noticed the change due to an alteration to the post's title. (I have been monitoring for some sort of possible change; it did not "jump out at me.") How about images in "INDEXED*" modes? I tested your (modified) scripts with such - and they (indexed images) work on my system - on GIMP 2.6 for Linux anyway.

BTW: GIFF are both indexed and animated!


This works fine for me too. However I think there's a much more elegant solution to the layer selection issue, maybe touch pad or gestures could be the future.

Convert to indexed is a step to perform AFTER saving the original as (rgb).xcf, even if the image is to be used (and so exported) as animated gif

Anyway you seems right i cannot see reason to limit the use of the script to RGB images
(except that is the correct mode to use in most of cases,convert UNSAVED images in other modes is usually a mistake)


;;; I typically bind these to Ctl+PgUp and Ctl+PgDn so I can do simple
;;; layer-based animations

I am running GIMP 2.6 on a Linux platform. How do you assign key bindings? I have searched the web - this site specifically. I am unsure as to how to go about specifying key bindings for a script or plug-in.


I answered my own question regarding keybindings. In case anyone else has the same question...
1) Open menu item: Edit -> Preferences
2) Select 'Interface'.
3) Under 'Keyboard Shortcuts', check the box labeled 'Use dynamic keyboard shortcuts'.
4) Close preferences dialog.
5) Find desired menu item, and highlight it (via hovering mouse cursor).
6) Press desired key combination.


I downloaded this script-fu plug-in. It appropriately works well in concert with my recent posting "Guillotine into Layers" (useful for selecting guillotined regions for exporting). Have you considered adding additional functionality: "Select Top Layer Only" and "Select Bottom Layer Only"?


Subscribe to Comments for "Select Top/Previous/Next/Bottom Layer Only"