GimpTalk Announcement :
Try your digital-art skills against your fellow gimpers in GIMPtalk's Biweekly Art competition !


Board index » GimpTalk » GIMP General Help Web Development Services . Convert FLV to Cell Phone Format
Featured Tutorial : Learn how to create characters by Griatch
Search for :  


Post new topic Reply to topic   [ 8 posts ]  


Author Message
Offline
 Post subject: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 3:23 pm 

Joined:
Sun Jan 29, 2006 11:28 pm

Topics:
Posts: 4

Find User's Topics

Hello, I can't find a way in Gimp 2.4 to delete all invisible layers, is there one?

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.

Any ideas?

Thanks!



Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 5:08 pm 
Retired Staff

User avatar

Joined:
Mon Aug 22, 2005 8:35 pm

Topics:
Posts: 5314

Find User's Topics
Here is a simple Script-fu which adds a command to the bottom of your Image menu which will delete hidden layers: http://flashingtwelve.brickfilms.com/GIMP/Scripts/delete-hidden.scm

_________________
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 5:48 pm 
User avatar

Joined:
Sat Dec 01, 2007 6:01 pm

Topics:
Posts: 1334
Location: Norway(near griatch's country :D )

Find User's Topics
What do i do to it??, and how do i get script-fu back :'(

_________________
MNM
Image
saulgoode wrote:
(we want our image to be "gimped", not "photoshopped"; the difference being one can't tell when an image has been properly gimped :) ).


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 8:00 pm 
Retired Staff

User avatar

Joined:
Mon Aug 22, 2005 8:35 pm

Topics:
Posts: 5314

Find User's Topics
Download the file and save it to your GIMP scripts folder (information about data folders and where they are located on your computer can be found at the bottom of this page of the GIMP Manual). The next time you open GIMP, the command will be there at the bottom of your "Image" menu.

Quote:
and how do i get script-fu back


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.

_________________
Everybody makes their own fun. If you don't make it yourself it's not fun, it's entertainment.


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 8:06 pm 
User avatar

Joined:
Sat Dec 01, 2007 6:01 pm

Topics:
Posts: 1334
Location: Norway(near griatch's country :D )

Find User's Topics
I don't see a file in there, more like a source code-ish thingy

_________________
MNM
Image
saulgoode wrote:
(we want our image to be "gimped", not "photoshopped"; the difference being one can't tell when an image has been properly gimped :) ).


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Wed Sep 03, 2008 10:06 pm 
User avatar

Joined:
Mon May 15, 2006 5:31 am

Topics:
Posts: 840

Find User's Topics
Right click on the link and select save as. Save it in your scripts directory, which on my machine is
C:\Program Files\Gimp-2.4\share\gimp\2.0\Scripts
but this may vary depending on your system.

Greg

_________________
Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Thu Sep 04, 2008 2:02 pm 

Joined:
Sun Jan 29, 2006 11:28 pm

Topics:
Posts: 4

Find User's Topics
Fantastic! This is exactly what I was looking for and works like a charm.

Thanks Saulgoode!


Top
 Profile  
 
Offline
 Post subject: Re: How to delete all invisible layers in Gimp 2.4?
PostPosted: Tue Jul 28, 2009 6:38 pm 

Joined:
Tue Jul 28, 2009 6:32 pm

Topics:
Posts: 1

Find User's Topics
The above script doesn't work in version 2.6 I have modified it to work. All you need to do is change the lines (lines 34-36 when I downloaded it)

Code:
(let* (
      (hidden-layers)
      )

TO
Code:
(let* (
      (hidden-layers 0)
      )


And it will work on version 2.6

More info here http://gimp.org/release-notes/gimp-2.6.html look for the section on backwards compatibility.


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  

Post new topic Reply to topic
 [ 8 posts ] 



Who is online

Users browsing this forum: floatingpepsi, MzLegendary-pirate and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Related Website
Gimp tutorials database
All rights reserved © GimpTalk 2008
forum software by
phpBB