Luminous Landscape Forum
Raw & Post Processing, Printing => Digital Image Processing => Topic started by: sanfairyanne on May 29, 2022, 07:59:56 am
-
I'm hoping someone can help me find, or give me advice, for creating an action to open multiple files as Smart Objects in Photoshop Layers. I can do this manually, but it would be good to have an action. I tried making one, however, I ran into some issues that are a bit too complex to explain. I know Tony Kuyper has this feature on his panel, but I'd like to know how to write my own.
Many thanks in advance.
-
John Beardsworth wrote a script for me some time ago to do this, though the images need to be opened as SO's in PS first. The script then moves them into a single layered file and closes everything. Make sure you have nothing else opened in PS.
https://forum.luminous-landscape.com/index.php?topic=122780.msg1022813#msg1022813
-
John Beardsworth wrote a script for me some time ago to do this, though the images need to be opened as SO's in PS first. The script then moves them into a single layered file and closes everything. Make sure you have nothing else opened in PS.
https://forum.luminous-landscape.com/index.php?topic=122780.msg1022813#msg1022813
Thank you, I have the script, I'm just not sure how to work with a script. I'll have to do some Googling.
-
I have this script for building layers as smart objects in Layers in Photoshop. I followed a pretty good video on YouTube showing how to add a script, but in the video the person uses a .jsx file. So I assumed I'd have to copy this script into a Text Editor and save it as a .jsx file. I did that using Script Editor on the Mac. I saved it onto my computer but when I direct Photoshop to the script it is greyed out. I suppose it's not possible to allow sharing of files on the forum. I'll keep trying. Incidentally, I've been trying to open files as Smart Objects in Layers with Lightroom, I assume it's also not possible with Adobe Camera Raw?
// LayerPasteAllToOne.jsx
// http://forum.luminous-landscape.com/index.php?topic=122780.msg1022848#msg1022848
// Save the file anywhere - desktop for testing
// name it LayerPasteAllToOne.jsx
// What it does is copy the active layer from each open file to the first file
// then closes all the other files
// regards john beardsworth
var AllDocs = app.documents;
if (AllDocs.length > 1) {
var itemDoc = null;
var otherDocs = Array();
for (var m = 1; m < AllDocs.length; m++) {
var aDoc = app.documents[m];
app.activeDocument = aDoc ;
var actLay = aDoc.activeLayer;
//change the layer name to the file's name
var docName = aDoc.name;
actLay.name = docName.replace('-1','');
//copy the layer or smart object to the first file
actLay.duplicate ( app.documents[0] );
//app.refresh();
// populate an array of the other files
otherDocs.push(app.documents[m]);
}
//now close all the other files
for (var m = 0; m < otherDocs.length; m++) {
app.activeDocument = otherDocs[m] ;
app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);
}
} else {
alert ("No other documents open")
}
//copy this line too - this is the end
-
"So I assumed I'd have to copy this script into a Text Editor and save it as a .jsx file."
That's what I did in Windows with Notepad (then changed the extension). But if it's greyed out it sounds to me that for some reason it is not recognized as a .jsx file.
Any typo's, spaces in the file name?
I don't see why it should make a difference, but did you name it according to the instruction in the script?
" // name it LayerPasteAllToOne.jsx"
If you PM me with your email I'll send you the version I created (if email allows it)
Lightroom doesn't recognize individual layers so no surprise.
-
I don't knw much about MAC but look at the permissions of the file as well
-
"So I assumed I'd have to copy this script into a Text Editor and save it as a .jsx file."
That's what I did in Windows with Notepad (then changed the extension). But if it's greyed out it sounds to me that for some reason it is not recognized as a .jsx file.
Any typo's, spaces in the file name?
I don't see why it should make a difference, but did you name it according to the instruction in the script?
" // name it LayerPasteAllToOne.jsx"
If you PM me with your email I'll send you the version I created (if email allows it)
Thank you, I PM'd you. I'm sorry I'm no sure how to look at the permissions of the file. I'm a bit of a dummy with these things!
Lightroom doesn't recognize individual layers so no surprise.
-
The problem is the saved action does not remember the Add Open Files command or the check on Create Smart Object on the script>Load Files as a Stack pop-up. So you are stuck if trying to create an action. It will stop where you have to manually do those 2 things when the window opens. Defeats the purpose.
-
Thank you McBroomf it's working now.
-
Thank you McBroomf it's working now.
Good to hear, thanks for letting me know ... puzzling why creating the file on a Mac didn't work.
Mike