How to delete all invisible layers in Gimp 2.4?
Posted 03 September 2008 - 03:23 PM
When working with a slightly complex file I use to have multiple layers which I show, hide and duplicate as needed. After a while my layers dialog gets cluttered and I need to delete layers I don't need anymore, most of these layers are invisible and going one by one to delete takes much time, an option to remove all invisible layers would be great.
There's an option to delete invisible layers on "Image > Merge Visible Layers" but this, as the name says, merges all other layers.
Posted 03 September 2008 - 05:08 PM
Posted 03 September 2008 - 08:00 PM
You don't really need the Script-fu menu back. The functions that used to be in the Script-fu menu (in older versions of GIMP) have been relocated to other menus. You can add a Script-fu menu if you like (by installing a script which is placed in the menu), but it is not necessary.
Posted 03 September 2008 - 10:06 PM
but this may vary depending on your system.
My Sigs = My Photos
Check out my work at http://www.flickr.co...photomastergreg.
Posted 28 July 2009 - 06:38 PM
(let* ( (hidden-layers) )
(let* ( (hidden-layers 0) )
And it will work on version 2.6
More info here http://gimp.org/rele...s/gimp-2.6.html look for the section on backwards compatibility.
Posted 11 June 2012 - 12:24 PM
Would really like this script but the link is non-existent now. Is there another link to the script please?
Does it work for Gimp 2.6 which I need?
you can get it here
be patient and wait for it to load the archive
From memory it works with gimp 2.6
This post has been edited by rich2005: 11 June 2012 - 12:26 PM
Posted 11 June 2012 - 11:28 PM
Thankyou soooo much rich2005 !
I would never have found it without your help thankyou !
It does not work for 2.6 but will work with the editing from grgrssll.
It is named "Delete Hidden Layers" written by Saul Goode
SCRIPT PAGE HERE:
Thankyou soooo much grgrssll !
Your editing to make it work for 2.6 works perfectly thankyou !
And it was such a simple easy edit !
Posted 12 June 2012 - 08:34 AM
You might want to compare versions, this is from 2010
; This program is free software; you can redistribute it and/or modify it ; under the terms of the GNU General Public License as published by the ; Free Software Foundation; either version 2 of the License, or (at your option) ; any later version. ; ; This program is distributed in the hope that it will be useful, ; but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ; or FITNESS FOR A PARTICULAR PURPOSE. ; See the GNU General Public License for more details. ; (define (script-fu-delete-hidden-layers image drawable) (let* ( (layer's (vector->list (cadr (gimp-image-get-layers image)))) ) (gimp-image-undo-group-start image) (while (pair? layer's) (when (= (car (gimp-drawable-get-visible (car layer's))) FALSE) (gimp-image-remove-layer image (car layer's)) ) (set! layer's (cdr layer's)) ) (gimp-image-undo-group-end image) (gimp-displays-flush) ) ) (script-fu-register "script-fu-delete-hidden-layers" "Delete Hidden Layers" "Delete all layers which aren't visible." "Saul Goode" "Saul Goode" "May 2010" "*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 ) (script-fu-menu-register "script-fu-delete-hidden-layers" "<Image>/Image/" )