Luminous Landscape Forum

Raw & Post Processing, Printing => Adobe Lightroom Q&A => Topic started by: mcbroomf on January 19, 2018, 10:31:39 am

Title: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on January 19, 2018, 10:31:39 am
I do a good number of lightpainted images, starting in LR with file adjustments, then > Edit In : Open as Layers in PS  for all of the shots I think I'll need in the final image
This works very well, I blend the layers in Lighten mode and mask each layer as necessary to eliminate extraneous light.  I will use anything from a handful to 20 or so layers in more complicated lighting or objects and save it with all the layers and masks as a .psb before flattening for print or web.  Some examples below
https://photos.app.goo.gl/NJxLnUUv5g5aqRz12

I can use the ACR (filter > Camera Raw Filter) on a layer if it's not Smart, but it does not remember the LR adjustment, nor the 1st if I go back and do a 2nd and of course it's not editing in RAW, so what I'd like to do is transfer the files into PS as Smart Objects in each layer so that I can get back into ACR to tweak any setting on a RAW file/layer that I didn't get right, or use the other tools (WB and adjustment brush especially).  I've found 1 work around, 4) below, but it takes a lot more steps.  I'm no expert so I wonder if anyone can help.  This is what I've found so far;

1) No option from LR to open as Smart Objects and as layers in PS
2) If I open all of the files as SO's in PS (ie ending up with many tabs/files) then try to load them as layers in > Script > Load Files into Stack > Add Open Files; 1) It tells me they need to be saved 1st, 2) after saving them (as tif's with the SO layer) I get the message Load Layers can not merge Smart Object documents.  They will be skipped.  So I get nothing.
3) Tried to stack a set of images in LR and open as a SO in PS but just got one image in 1 layer
4) If I load them for Edit into PS as SO's (as in 2) above) ending up with many tabs/files I can then drag each image, one at a time, onto a base file and end up with the full set of layers, all SOs with a result exactly what I need.  By holding shift of course they are aligned, but pretty tedious if it's a complicated image that might start out with 25 or so layers.  This is my workaround at the moment.


Any other ideas?  Have I missed something pretty basic or is this the best I can do at the moment?

Thanks
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: john beardsworth on January 19, 2018, 01:15:21 pm
I don't think you have missed anything, so I would focus on improving your step 4.

An action might do the shift+drag, but it might be tricky - and you might have to run it once per photo. If you can script (JS is the best option over AppleScript or VB), I think it would be possible to do something pretty efficient. But I suggest looking around as I'm sure someone else will have gone down this path before.

UPDATE https://forums.adobe.com/thread/1496531 is the most promising script I could find.

UPDATE2 The devil makes work for idle hands... I'm just testing a script to do the job.

John
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on January 19, 2018, 03:36:31 pm
Thanks John,
Well too much to hope for (that I might have missed an obvious way) and unfortunately I don't know the 1st thing about scripts so I decided to try an action and I think it might do the job.  I opened 6 files as SOs in PS and starting the action using the left tab as the base, saved it then selected the next tab and copied it (not the layer as that copies the name and the action fails, and not the image as it doesn't copy as a SO).  Once copied, pasted it into the base file which correctly created a new SO layer, then moved to the 3rd tab and copied it etc.  As I repeated this the action showed the commands;

...
Select Document +2
Copy
Select document -2
Paste
Select Document +3
Copy
Select document -3
 ... etc

so it looks like it's counting the tabs/files from the left one where the action starts and correctly identifying the next file it needs, then navigating back to the base file and copying the SO into a new layer.  After saving the action I backed out the changes and ran them again and then on another set of 6 new images fresh from LR and both worked OK.  I'll have to test to see if I can just make one huge action which will run until it fails if I have less files open than in the action.  If for some reason that doesn't work I could make many actions, eg from 3 to 30 files, or have a half a dozen for different number of layers and run them as needed in combination, closing the files that are copied (eg a 10 and a 3 for a 14 layer image, closing the 1st 10 files before running the 3 file action).

In any case this is much faster than doing it manually so thanks for the input and link ...

Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: john beardsworth on January 19, 2018, 03:52:33 pm
That's good to know, Mike. The trouble with actions is that they aren't great at looping intelligently and that's where a script comes in handy. Hopefully the instructions at the start of this will be enough to let you try it.

John

    // 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
 
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on January 19, 2018, 04:52:57 pm
Hi John,
That's great, it worked perfectly ... thanks so much.
I'm looking through my old images now to see if I can find one that I remember needed some tweaking that was going to force me back into LR.  It'll be much easier now.

Cheers,
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: john beardsworth on January 20, 2018, 04:17:09 am
Thanks for letting me know, Mark. You got lucky - once I understood your question I soon began thinking that I could use such a script for myself!

One handy trick is to put the script in its long term folder location, and then record running the script as an action. You can then run the script more conveniently, even assigning a keyboard shortcut to the action.

John
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on January 20, 2018, 04:56:19 am
Another good tip ...

Thanks again
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on April 23, 2023, 07:11:16 am
Dragging up an old thread for (for me) a well used script created by John many years ago. 

Lost in the AI Denoise Hooha, in LRC Adobe added in the Open In options "Open as Smart Object Layers in Photoshop"

While John's script has been working flawlessly, this allows me to skip the extra step to run it in PS.  I'm always looking for ways to save fingers/wrists so this is welcome.

Thank you one last time John ...

Mike
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: David Eckels on April 23, 2023, 09:37:10 am
LR 12.3 has this option under Edit In>
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: mcbroomf on April 23, 2023, 10:21:32 am
LR 12.3 has this option under Edit In>

I guess you completely missed the point of my post ...  ;D
Though I did call it Open In by mistake
Title: Re: Getting files from Lightroom to PS layers as Smart Objects?
Post by: David Eckels on April 23, 2023, 07:14:41 pm
I guess you completely missed the point of my post ...  ;D
I guess I did :-[