Open the Import prompt from NodeJs or Python

New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

Hi all!

I am building an app which does some preprocessing on the RAW and JPEG images before the users import it into Lightroom.

Is there a way I can automatically import the images from my app into Lightroom classic (assuming that it's installed on the user's machine)

If not, then is there a way with which I can open Lightroom and then the import prompt from my app?

For reference, this is the dialog I am talking about.

Screenshot 2020-11-17 at 7.04.25 PM.png

I am currently using Python and NodeJs in my app.

TOPICS
FAQ, How to, Mac, SDK, Windows

Views

52

Likes

Translate

Translate

Report

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

Open the Import prompt from NodeJs or Python

New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

Hi all!

I am building an app which does some preprocessing on the RAW and JPEG images before the users import it into Lightroom.

Is there a way I can automatically import the images from my app into Lightroom classic (assuming that it's installed on the user's machine)

If not, then is there a way with which I can open Lightroom and then the import prompt from my app?

For reference, this is the dialog I am talking about.

Screenshot 2020-11-17 at 7.04.25 PM.png

I am currently using Python and NodeJs in my app.

TOPICS
FAQ, How to, Mac, SDK, Windows

Views

53

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 17, 2020 0
LEGEND ,
Nov 17, 2020

Copy link to clipboard

Copied

What exact Pre-Processing are you doing to the images before they get imported into LrC?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

Hi, thanks for your reply!

I'm adding some keywords to the exif data of images (it would be xmp for RAW and modifying the metadata for JPEGs)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
Mentor ,
Nov 17, 2020

Copy link to clipboard

Copied

Import into Lightroom Classic is not always a simple or 'neutral' event since (under LR's control and as the user selects) the images may be appropriate to copy, move or leave in place - they may be DNG converted - the files may be renamed - a duplicate copy may be archived elsewhere - batch keywording and metadata preset and develop preset may be applied. So I guess one question is, what KIND of import should your app be achieving and how would it make that happen. That;s besides the possibility that LR may be used with more than one Catalog, which (regardless of the usual arguments supporting a single catalog, which we can take as read here) some people will do.

 

Perhaps another approach may be to employ a watched folder, set up previously in LR, where newly added images will auto-import the moment LR sees them. However this watched folder is unlikely to be the best permanent location for these images to live in, so that stores up some extra work. And this approach will forgo LR's ability to fully take over the work of folder-filing images, e.g. directly into a consistent capture-date scheme.

 

So, looking at either a 2-stage process of altering metadata then doing a standard LR import (images can be drag-dropped onto LR as an alternative)

 

OR there is an option to write out metadata externally from LR after import (so as to preserve whatever edits / default processing have happened during that or subsequently), invoke an external tool that changes this XMP metadata on disk, then read this altered metadata back into LR.

 

I recall a LR plugin called LensTagger worked like this - mainly used to update/correct Lens descriptive metadata, which could otherwise not be changed within the LR metadata panel, though I think some other kinds of metadata could be addressed the same way also.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 1
New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

That makes sense.

Is it possible for me to open just the import popup (and not perform any import)?

That way I can open the source folder and Lightroom's import popup and ask the users to simply drag and drop the opened folder into lightroom.

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
LEGEND ,
Nov 17, 2020

Copy link to clipboard

Copied

“I'm adding some keywords to the exif data of images (it would be xmp for RAW and modifying the metadata for JPEGs)”

 

 

Why does this have to be done BEFORE import?

 

Why can't it be done at Import, via a Ligthroom Classic preset?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
New Here ,
Nov 17, 2020

Copy link to clipboard

Copied

It can, but my app does some backend processing as well which is a little tricky to do withing the restricted plugin environment

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0
Most Valuable Participant ,
Nov 17, 2020

Copy link to clipboard

Copied

The LR SDK for plugins has a number of facilities you might use in a plugin installed into LR:

 

catalog:addPhoto() adds photos (imports them) to a catalog

 

catalog:triggerImportUI (path) opens the Import dialog, with "path" selected as the source

 

catalog:triggerImportFromPathWithPreviousSettings (path) starts an import from "path", using the previous import settings

 

You external app can communicate with LR plugin using a lightroom:// URL, which will pass the URL parameters to your plugin.  Or the plugin could listen on a socket using LrSocket.

 

You can download the LR SDK from here:

https://console.adobe.io/downloads 

 

Expect to spend at least 8 - 20 hours getting up to speed on the SDK and the Lua language, though.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 17, 2020 0