Add layers from other psd file and retain text layers (Batch processing)
I want to batch process a large number of portraits adding text info from the filename (year_name_number.jpg) to existing text layers. I want to make a template psd file containg the correct labeled text layers formatted and adjusted (With bleding effects and more) How can i add layers from an other psd file to the active document and retaining the text layers editable. The place command in PS5 adds the file as a smart object, no use.
Any ideas?
I tried the combined action/script way, but no joy so far. Right now i am making the text layers with a action, then calling the script from the action. It works but its difficult to make different templates from adjusting a action.
The code i am using now (in combination with a action creating the 3 text layers and other grapchical elements)
var docRef = activeDocument;
// strip the extension off
var fileNameNoExtension = docRef.name;
fileNameNoExtension = fileNameNoExtension.split( "_" );
if ( fileNameNoExtension.length > 1 ) {
fileNameNoExtension.length--;
}
fileNameNoExtension = fileNameNoExtension.join("_");
var myString = fileNameNoExtension;
var mySplitResult = myString.split("_");
var textLayer = docReflayers['Year']; // define the existing text layer to a var
docRef.activeLayer = textLayer;
textLayer.kind = LayerKind.TEXT;
var T1 = textLayer.textItem;
T1.contents = mySplitResult[0]
var textLayer = docRef.layers['Name']; // define the existing text layer to a var
docRef.activeLayer = textLayer;
textLayer.kind = LayerKind.TEXT;
var T2 = textLayer.textItem;
T2.contents = mySplitResult[1]
var textLayer = docRef.layers['Number']; // define the existing text layer to a var
docRef.activeLayer = textLayer;
textLayer.kind = LayerKind.TEXT;
var T3 = textLayer.textItem;
T3.contents = mySplitResult[2]
Thanks
Eivind
