RetouchPRO

Go Back   RetouchPRO > Tools > Software > Photoshop Scripting
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photoshop Scripting Learning and sharing for all platforms

Script to find/replace text in layer names?

Reply
 
Thread Tools
  #1  
Old 09-16-2008, 01:39 PM
Sequitur Sequitur is offline
Junior Member
 
Join Date: Sep 2008
Posts: 2
Script to find/replace text in layer names?

I'm looking for a script that can do a standard text "find and replace" of group names and layer names within photoshop. I'm not sure if this is actually doable, but it would be helpful if anyone knows of such a routine. I'm working with documents that have 1000+ layers that need to conform to a particular naming convention and something like this would definitely save some time.
Reply With Quote top
  #2  
Old 10-23-2009, 04:45 AM
plofstront plofstront is offline
Junior Member
 
Join Date: Oct 2009
Posts: 1
Re: Script to find/replace text in layer names?

I don't know if you already have found a script that renames layers.
(I just registered at retouchpro, your post is over 1 year old..)
If you haven't you can find one here:
http://www.aoow34.dsl.pipex.com/
look in the left menu under PSCS2/3, there you can find the Layer Name Editor script.
Reply With Quote top
  #3  
Old 04-06-2010, 08:44 PM
taliwalt taliwalt is offline
Junior Member
 
Join Date: Apr 2010
Posts: 1
Thumbs up Re: Script to find/replace text in layer names?

Just want to thank plofstront for posting that website link. Great resource!
Reply With Quote top
  #4  
Old 03-30-2012, 08:37 PM
mofo mofo is offline
Junior Member
 
Join Date: Mar 2012
Posts: 1
Re: Script to find/replace text in layer names?

Well, I just joined this forum while finding the "Layers to Textfile" script and wanted to show my appreciation with a script that more than answers your older post here.

This is a Layer Names Editor script that goes well beyond renaming layers. It also uses reg. expressions, wild cards and such.

I didn't write this one but feel it's a worthy one to share. Anyway, I took one today so heres one to leave. Enjoy!

Works for me in CS3 but am sure it'll work in most other version.
Attached Files
File Type: zip Layer Names Editor.jsx.zip (1.8 KB, 219 views)
Reply With Quote top
  #5  
Old 05-17-2012, 11:47 AM
Limey2632 Limey2632 is offline
Junior Member
 
Join Date: May 2012
Posts: 4
Re: Script to find/replace text in layer names?

Thanks for the script Mofo!
I noticed that The Layer Names Editor affects all layers. Example: Adds a suffix to all layers and not to a selected few. Am I missing something or is this an all or nothing script?

Thanks,
Limey
Reply With Quote top
  #6  
Old 05-18-2012, 10:43 AM
Paul R Paul R is offline
Junior Member
 
Join Date: Jan 2010
Posts: 18
Re: Script to find/replace text in layer names?

That is a very old script, that I wrote. I would write it totaly differently now.
What features would you like and I will see if I can put something together.
Reply With Quote top
  #7  
Old 05-18-2012, 12:04 PM
Limey2632 Limey2632 is offline
Junior Member
 
Join Date: May 2012
Posts: 4
Re: Script to find/replace text in layer names?

Hi Paul,
What foremost comes to mind is the ability to affect only selected layers rather than changing names on all layers within the document.

Something nice would be a remove first (n) characters, last (n) characters and from (n) to (n) characters.

Is it possible to do an Insert at (n) characters?

We often have combo skus for our products. An example would be a ceiling fan.
Motor, blades, light kit and glass= K1234-02314-R4325-H3420

This is where the above features would be helpful.

By the way, Might you possibly be the same Paul as Paul MR on PS-Scripts? If so, "Hi Paul!"

All the best, and thanks!
Limey
Reply With Quote top
  #8  
Old 05-18-2012, 12:13 PM
Paul R Paul R is offline
Junior Member
 
Join Date: Jan 2010
Posts: 18
Re: Script to find/replace text in layer names?

You have got me Paul! Yup I'm the same one
I will have a look and see what can be done, I will be using Action Manager code so it should be magnitudes faster.
Althouth if you are using Photoshop CS6 it will slow it down as it will need to select the layer to modify the name, CS6 is a bad release for scripters, and Bridge is terrible.
Reply With Quote top
  #9  
Old 05-18-2012, 12:25 PM
Limey2632 Limey2632 is offline
Junior Member
 
Join Date: May 2012
Posts: 4
Re: Script to find/replace text in layer names?

Great to see you Paul :-) Thanks for the heads up on CS6 and Bridge! I am currently using CS5 on snow leopard 10.6.8

As always thanks for the incredible support!

Limey (Paul)
Reply With Quote top
  #10  
Old 05-19-2012, 08:04 AM
Paul R Paul R is offline
Junior Member
 
Join Date: Jan 2010
Posts: 18
Re: Script to find/replace text in layer names?

Ok Paul, here is something for you to test, I have also added a checkbox so that you can create a snapshot.
For general information, this script requires Photoshop CS3 or better.
Attached Images
File Type: jpg Layer Name Edit.jpg (27.0 KB, 186 views)
Attached Files
File Type: zip Layer Name Edit.zip (3.3 KB, 312 views)

Last edited by Paul R; 05-19-2012 at 09:13 AM.
Reply With Quote top
Reply

  RetouchPRO > Tools > Software > Photoshop Scripting


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial 05: Converting a Color Image to Black and White grayscale BW DannyRaphael Photo-Art 101 17 05-22-2011 05:55 PM
help with german Photoshop commands please pure Photoshop Help 9 06-21-2010 03:33 PM
Layer Tutorials..again? zip022 RP Tutorials 21 11-18-2004 11:10 PM
select shape Peg Hidden Power Support 7 08-29-2004 07:10 PM
Help needed understanding these layers. peejay Photo-Based Art 3 01-16-2004 09:15 PM


All times are GMT -6. The time now is 03:58 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved