Share this topic on AskShare this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on TwitterShare this topic on YahooShare this topic on Google buzz

Author Topic: [Script-Fu] Copy Visible & Paste as Layer Script  (Read 1637 times)

0 Members and 1 Guest are viewing this topic.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
[Script-Fu] Copy Visible & Paste as Layer Script
« on: December 20, 2007, 08:40:47 AM »
This script is a simple one, yet very useful.  The script copies all of the visible layers in the active image and pastes them into a single layer at the top of the layer stack (the new layer is called "Copied Layers").  This way, if you want to apply additional effects to the "current look" of your layers, you can do so in one simple step and, most importantly, keep your original layers intact.  Also, if a selection is active at the time the script is run, only the selected area will be copied/pasted.

You can download it here: http://fence-post.deviantart.com/art/Copy-Visible-and-Paste-Script-72552828

These steps can be done quite easily in GIMP (Copy Visible > Paste > Add New Layer > Anchor Floating Selection), but this really speeds things up.

Essentially, it is GIMP's version of Photoshop's Apply Image option (although I believe the PS version has more options....not sure on that though). 

The inspiration for this script is from kward (http://kward1979uk.deviantart.com/art/Merge-copy-28607825) who wrote the original version, but I've updated it to run in GIMP version 2.4.  I've also modified the script to work on Grayscale and Indexed images.

Just download the zip file, double-click the zip file to open, and place the script (scm file) in your GIMP scripts folder (ie....C:\Program Files\GIMP-2.4\share\gimp\2.0\scripts)

Then, go to the main GIMP window (not the image window) and choose the Xtns Menu > Script-FU > Refresh Scripts and it should appear in the Image Window under the Edit Menu > Copy Visible & Paste as Layer

Enjoy!

Art
« Last Edit: February 22, 2008, 10:06:28 PM by fencepost »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline Darth_Gimp

  • Number One
  • *****
  • Posts: 2,894
  • Karma: 0
  • Faith, Folk, Family!
    • lds-jedi.deviantart.com
    • Odinic Rite
Re: Copy Visible & Paste Script
« Reply #1 on: December 20, 2007, 05:43:56 PM »
I wish your scripts were available from the image window. That's probably the one thing holding me back from installing them.
GimpDome Group: http://gimpdome.deviantart.com/
My DeviantArt: http://lds-jedi.deviantart.com/

There's no worse feeling than that millisecond you're sure you are going to die after leaning your chair back a little too far.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Copy Visible & Paste Script
« Reply #2 on: December 20, 2007, 05:47:44 PM »
They should be.....This one is under the Edit Menu and the other one (powertoning) is found under Filters Menu > Decor.  Is that what you're referring to?  See the last line of my description.....
« Last Edit: December 20, 2007, 05:52:53 PM by fencepost »
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline Damascus

  • Global Moderator
  • *****
  • Posts: 1,301
  • Karma: 0
Re: Copy Visible & Paste Script
« Reply #3 on: December 20, 2007, 05:49:50 PM »
I wish your scripts were available from the image window. That's probably the one thing holding me back from installing them.

OMGawsh, you are sooo picky!  It sounds like a great script Fence... nvm him, he's just a Grinch.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Copy Visible & Paste Script
« Reply #4 on: December 20, 2007, 05:50:28 PM »
That's ok, even the Grinch found redemption!  ;D
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.


Offline Darth_Gimp

  • Number One
  • *****
  • Posts: 2,894
  • Karma: 0
  • Faith, Folk, Family!
    • lds-jedi.deviantart.com
    • Odinic Rite
Re: Copy Visible & Paste Script
« Reply #5 on: December 20, 2007, 06:04:13 PM »
My apologies... I read "Then, go to the main GIMP window (not the image window)" and then my brain stopped reading.

Got both scripts installed in windows and they work great!
GimpDome Group: http://gimpdome.deviantart.com/
My DeviantArt: http://lds-jedi.deviantart.com/

There's no worse feeling than that millisecond you're sure you are going to die after leaning your chair back a little too far.

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: Copy Visible & Paste Script
« Reply #6 on: December 20, 2007, 06:37:02 PM »
Cool!  I'm glad you like them.

I'll probably be modifying this one as I've been given some suggestions for improvement from a programming standpoint.  I'll let y'all when I do update it.

Art
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Offline Hi-T3k~HillBilly

  • Administrator
  • *****
  • Posts: 1,526
  • Karma: 0
    • hitech-hillbilly.deviantart.com
    • Facebook:jacob.c.dillon
    • hitek_hillbilly:imageshack
    • droz928: PhotoBucket
    • jcdillon28:twitter
    • HillBillyGFX
Re: Copy Visible & Paste Script
« Reply #7 on: December 21, 2007, 09:27:53 AM »
Great script Fence. Once again a script that just simplfies life. Gotta love that

Offline fencepost

  • Member
  • **
  • Posts: 2,626
  • Karma: 0
    • fence-post.deviantart.com
Re: [Script-Fu] Copy Visible & Paste as Layer Script
« Reply #8 on: October 03, 2008, 11:25:23 AM »
Thanks, Jake!  Glad you like it. 

I've modified the script, based on suggestions by saulgoode at GT.  Basically, if you have an area selected prior to running the script, the selection is temporarily turned off, but stored in a channel so that the entire contents of the visible layers are copied/pasted.  After the paste operation, the original selected area is turned back on and the channel deleted.  This way, you don't lose your selection in the process and you can always do an Invert Selection > Delete if you want the area outside of the selection if you want. 

Let me know if you have any questions or suggestions for improvement.

Art

Posted on: December 25, 2007, 10:52:46 PM
This script is no longer necessary as it has been included in GIMP under Layer > New from Visible
I'd rate you as an upper-middle-lower-mod with pro-novice-inter tendencies.....and a twist of lime!  Of course, my rating scale is completely objectively subjective, but ALWAYS consistently inconsistent.

Tags:
 

anything