1

When you create a Text Layer in Photoshop (I believe CS3 and above) the "Layer Name" auto-updates when the "Layer Content" gets changed.

This link from "content" to "name" remains until you manually change the "Layer Name". Then, the link is broken.

I was wondering if there is a way to create a script that can remove the "manually entered name" of a layer and re-link it to the content of the layer?

Another option would be for a script, to read all the attributes of a text layer, delete the layer and create a new layer that looks identical to the deleted layer, in the exact same position, with the same font and contents, but with a link from "text content" to "Layer Name"?

thank you.

1 Answers1

0

the second option is definately possible, not sure about the first. There is a snippet to create a new text layer below. In your case just copy all the relevant properties off the existing one.

#target Photoshop

var doc = app.activeDocument;

var newLayer = doc.artLayers.add();
newLayer.kind = LayerKind.TEXT;
newLayer.textItem.contents = "test";
Anna Forrest
  • 1,711
  • 14
  • 21