It is currently Wed Sep 09, 2026 10:45 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 15 posts ] 
Author Message
 Post subject: Clear selection on all layers. [SOLVED]
PostPosted: Tue Jun 11, 2013 7:15 pm  (#1) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
GIMP Version: 2.6.11
Operating System: Windows
OS Version: XP - SP3
GIMP Experience: Beginner Level



Does Anyone know how to clear a selection on all layers, without doing every layer one by one?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Last edited by Wallace on Tue Jun 11, 2013 8:57 pm, edited 2 times in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 7:16 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2090
Haha, I was just making a new thread, and came back and saw that you did. Am very curious about this. Thanks Wallace.

_________________
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 7:17 pm  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
The Warrior wrote:
Haha, I was just making a new thread, and came back and saw that you did. Am very curious about this. Thanks Wallace.


Yeah, me too.... :hehe

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 7:42 pm  (#4) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Open the Script-fu console ("Filters->Script-Fu->Console") and paste the following command:

(map gimp-edit-clear (vector->list (cadr (gimp-image-get-layers (vector-ref (cadr (gimp-image-list)) 0)))))


Note: this assumes that you are working on the last image you opened (to be safe, only have one image opened).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:05 pm  (#5) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
saulgoode wrote:
Open the Script-fu console ("Filters->Script-Fu->Console") and paste the following command:

(map gimp-edit-clear (vector->list (cadr (gimp-image-get-layers (vector-ref (cadr (gimp-image-list)) 0)))))


Note: this assumes that you are working on the last image you opened (to be safe, only have one image
opened).


Tried this command, but can't seem to be able to Past anything into the console. I also dont' know how to execute the command.

More information needed... :(

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:14 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
In the console there are two text areas. The top one is read-only and displays the output of running commands. The bottom one -- a single line for text entry -- is where you enter the commands. After pasting the above command, just hit ENTER to execute it.

Attachment:
SS-console.png
SS-console.png [ 9.28 KiB | Viewed 7834 times ]

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:17 pm  (#7) 
I have this one installed. You will find it under the Select menu
Attachment:
fp-script-fu-select-delete-all.zip [1019 Bytes]
Downloaded 833 times


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:48 pm  (#8) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
fluffybunny wrote:
I have this one installed. You will find it under the Select menu
Attachment:
fp-script-fu-select-delete-all.zip


Thanks FB, that's the script alright! :yes

Once the script is installed, all you have to do is go to, Select> Delete Selection All Layers and it removes everything within the selected region. :yes

Thanks much FB. :hehe That's what we were looking for. :bigthup

This is one terrific website! Everyone that's deeply involved with it and some really great members, makes a big difference.
Thanks

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Last edited by Wallace on Tue Jun 11, 2013 8:52 pm, edited 2 times in total.

Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:51 pm  (#9) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2090
fluffybunny wrote:
I have this one installed. You will find it under the Select menu
Attachment:
fp-script-fu-select-delete-all.zip

Yyyyyyes!!!! Works excellent. Thanks you so much fluffybunny, very much appreciated. :jumpclap

_________________
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:55 pm  (#10) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
The Warrior wrote:
fluffybunny wrote:
I have this one installed. You will find it under the Select menu
Attachment:
fp-script-fu-select-delete-all.zip

Yyyyyyes!!!! Works excellent. Thanks you so much fluffybunny, very much appreciated. :jumpclap


A very handy script, I would say, that it should be part of every Gimp installation.

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 8:58 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jun 02, 2013
Posts: 2090
Wallace wrote:
The Warrior wrote:
fluffybunny wrote:
I have this one installed. You will find it under the Select menu
Attachment:
fp-script-fu-select-delete-all.zip

Yyyyyyes!!!! Works excellent. Thanks you so much fluffybunny, very much appreciated. :jumpclap


A very handy script, I would say, that it should be part of every Gimp installation.
I second the motion.

_________________
Image


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Tue Jun 11, 2013 9:08 pm  (#12) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 14197
Location: Native to NYC living in Arizona, Gimp 2.8 - 3.0, Win 11 PC.
The Warrior wrote:
I second the motion.

Why this isn't per-installed is beyond me. It seems like something lots of people would want to know how to accomplish.
Oh well... that's why we have GC. :jumpclap

Thanks you guys... :bigthup

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Clear selection on all layers. [SOLVED]
PostPosted: Sat Jun 15, 2013 5:39 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Nov 16, 2011
Posts: 5127
Location: Metro Vancouver, BC
I was just testing, fp-script-fu-select-delete-all.scm.
FYI, if you don't have an Alpha channel on a layer the script will remove the selection and add the background color. A layer without an Alpha channel can be anywhere in the stack, without affecting the script.

_________________
Image
Gimp 2.8.18, Linux, median user
Gimp Chat Tutorials Index
Spirit Bear (Kermode)


Top
 Post subject: Re: Clear selection on all layers???
PostPosted: Sun Jun 16, 2013 6:17 am  (#14) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Wallace wrote:
The Warrior wrote:
I second the motion.

Why this isn't per-installed is beyond me. It seems like something lots of people would want to know how to accomplish.
Oh well... that's why we have GC. :jumpclap

Thanks you guys... :bigthup


Not that many people... I have had this script in my sourceforge collections (clear-layers, at http://sourceforge.net/projects/gimp-to ... s/scripts/) and the download stats aren't that big (343 over a 15 months).

_________________
Image


Top
 Post subject: Re: Clear selection on all layers. [SOLVED]
PostPosted: Sun Jun 16, 2013 8:48 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
Thanks, fluffybunny! Very useful script to have.

There are other scripts that IMO should be included to standard gimp package
1. all layers to image size
2. add alpha to all layers

I'm not uploading these since I have them in Animation menu I'd created and they will not
register in your gimp. You can find them on http://registry.gimp.org/


Top
Post new topic Reply to topic  [ 15 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group