Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
7

Save to Lightroom from Photoshop as action

Explorer ,
Nov 01, 2023 Nov 01, 2023

Hi!

 

When I open files from Lightroom to Photoshop, I am able to save them back to Lightroom again, with cmd+S. I want to do this in an action, to save all open files to the original folder back to Lightroom. 

 

A workaround is to use cmd+shift+w to close all files and choose save in the checkbox, but I would like the files to stay opened in Photoshop. I've tried Image Processor but it doesn't do it the way I want. 

TOPICS
Actions and scripting , macOS
802
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Nov 01, 2023 Nov 01, 2023

@mliretouch 

 

One option is a simple 1 step action, where you insert the menu item for Save.

 

Then File > Automate > Batch with the source being open files.

 

Otherwise, a custom script would be required – such as:

 

/*
Save all open docs.jsx
https://community.adobe.com/t5/photoshop-ecosystem-discussions/save-to-lightroom-from-photoshop-as-action/td-p/14201903
*/

#target photoshop

var currentDoc = activeDocument;
for (var i = 0; i < app.documents.length; i++) {
    activeDocument = app.documents[i];
    activeDocument.save();
}
activeDocument = currentDoc;

alert("Script completed!");

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 01, 2023 Nov 01, 2023

I've tried that but the problem is that the specific destination is recorded instead of just 'original folder'. I want the action to work for images in other folders aswell. 

 

I've tried the script but the files are not saved. Whats the script doing? Thank's for the help!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2023 Nov 01, 2023

@mliretouch wrote:

I've tried that but the problem is that the specific destination is recorded instead of just 'original folder'.


 

Please note that I specifically wrote to insert the menu item for save, not record the menu item. Use the option menu in the Action panel to insert.

 

action-menu.png

 

insert-menu-item.png

 

The script worked for me if the files contained edits that required a save. I tested before posting the script... But I don't use Lightroom.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2023 Nov 01, 2023
quote

I've tried the script but the files are not saved. Whats the script doing? Thank's for the help!


By @mliretouch

 

Have the files had edits applied to them?

 

I have updated the script code with an alert at the end. Please save the updated code and try again. Do you see the message dialog "Script completed!"?

 

 

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 02, 2023 Nov 02, 2023

Okey I see. Then I think I have to specify my problem a bit more. 

 

Here's my workflow: I open many exposures from Lightroom to Photoshop, and then place the brackets on top of each other manually (insted of open as layers from Lightroom, since this option doesn't allow me to open many stacks at the same time). Then I want to play an action with adjustment layers and then save all the open files without a pop up window comes up for every image saved. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Just so we're clear: Photoshop doesn't save "back" to Lightroom. It just saves to disk. The files aren't "in" Lightroom. This is a common misunderstanding.

 

The reason it appears in the Lightroom catalog is that a background script tracks the file and adds it to the catalog.

 

For this to work, Lightroom has to remain open during the save process. 

 

I can't see how an additional script can make any difference one way or the other here. This is just a perfectly normal "Save" from Photoshop. At default settings, this will save back to the original folder the file came from. 

 

If Lightroom isn't open, it won't be visible in the catalog and you need to import it later.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 02, 2023 Nov 02, 2023

Thank's for the clarification, it makes sense 🙂 

 

It works perfect when I save each image at a time, using the normal save. However, I would love to be able to save all open images with this normal save in a batch but I can't find the way to do this. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

@mliretouch 

 

The action method or the script method both use the standard save command.

 

Have you tried the updated script?

 

Have you tried inserting the menu item in the action instead of recording the save?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

@D Fosse 

 

Thank you for your insight, I don't use Lr.

 

All the batch action or script should do is run the standard save command over each open doc. Nothing more, nothing less.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023

Yeah, there's a lot of confusion about the relationship between PS and LrC, even among people who do use it.

 

This notion that Photoshop saves specifically to Lightroom is very widespread, and in a way understandable because functionally, it looks like it does. You save from Photoshop, and a second later pop! there it is in the Lightroom catalog.

 

But in reality, all this is handled by a background script tracking the file on its journey.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2023 Nov 02, 2023
quote

But in reality, all this is handled by a background script tracking the file on its journey.


By @D Fosse

 

So a batch action or script to save should work then on all open docs.

 

Can you confirm if the script or batch action as previously described works?

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 02, 2023 Nov 02, 2023

Unfortunately, Photoshop actions can't directly save files back to Lightroom. Instead, follow these steps:

  1. Import images into Lightroom.
  2. Right-click and "Edit in Adobe Photoshop."
  3. Edit in Photoshop.
  4. Use "Save" or "Save As" in Photoshop.
  5. Changes will automatically appear in Lightroom.

No need for an action.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 28, 2023 Nov 28, 2023

Yes, I love this and I want to be able to do this on many open files in an action. If I do your steps 1-3, then I will play an action on 20 open images. I don't want to have to go to every file manually and save, I want all the files to be saved in an action, since if Photoshop crashes, my files with all my layers are already saved. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2023 Nov 28, 2023

At the risk of repeating myself, a simple 1 step action with the Save command inserted (use the action panel to insert menu item) can be run on all open files via the Batch command. This takes multiple steps but is simple enough for most users.

 

A script (such as posted previously) can also do the same in a single run.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 28, 2023 Nov 28, 2023

Is there a way to save to the original folder in Photoshop with an action? 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 28, 2023 Nov 28, 2023
LATEST
quote

Is there a way to save to the original folder in Photoshop with an action? 

 


By @mliretouch

 

 

If the file has been previously saved and has a backing path, then yes, that is what "Save" does, as long as changes to the document are detected.

 

Newly created Untitled documents have never been saved and don't have a backing path.

 

Camera raw files rendered into Photoshop unfortunately inherit the backing path and file extension of the original raw file, even though they are essentially a new untitled/unsaved document and in my opinion should not have a backing path.

 

I don't have or use Lr, so I don't know how that behaves when you send a file to Photoshop.

 

The following script will report on the file path and save state of the active document:

 

try {
    activeDocument.path;
    alert(activeDocument.path.fsName + activeDocument.name + "\r" + "No save required = " + activeDocument.saved);

} catch (e) {
    alert("Unsaved document, no backing path!");
}

 

A related recent discussion:

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines