Skip to main content
Participating Frequently
March 13, 2013
Question

How to disable auto rename text layer with content

  • March 13, 2013
  • 1 reply
  • 3211 views

HI Every one,

I want to disable the auto renaming feature in text layers so that I can change the content without change the name of the text layer.

also i want to do this to all the text in one step, wthout do it manual one by one.

for more description, i am working on replace English text with other language but i want to keep English name of all text layers SO i want to disable auto renaming while replacing the content.

 

I guess a Script could do this by changing the names (adding a space or a _ for example)

Thanks in advance


  

This topic has been closed for replies.

1 reply

Inspiring
March 13, 2013

You don't need to add a prefix/suffix to the layer name. All you have to do is name the layer. Photoshop by default names a text layer with at least part of the text contents. When the contents is changed Photohop updates the layer name. To stop the auto-updating of the layer name you just need to name the layer. Photoshop will not update a named layer.

Are any of the text layers in layerSets? The code are looping layers is different if there are layerSets in the document.

kenrou123Author
Participating Frequently
March 13, 2013

Dear Michael

Thanks for your advice but i need to do this in all the text layers in one step, I have 50+ test layer I want to stop the update process and keep the name of the text layer the same.

Paul Riggott
Inspiring
March 17, 2013

Dear Paul

Thanks for you work

your script works very good but I need to remove the space again from all the text layers so that the text layer name remain in its original name without space.

That because I use another script require the text layer name to be the same.


You could change line 6 from...

putLayerNameByID(Number(txtLayers[0]),(txtLayers[1].toString()+' '));

To...

putLayerNameByID(Number(txtLayers[0]),(txtLayers[1].toString().replace(/\s$/,'')));

This will remove the space at the end of the layers name.

For future use on different files.

Change that line again so it is setting the name as the name with...

putLayerNameByID(Number(txtLayers[0]),(txtLayers[1].toString()));