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

SDK: Programmatically load grid previews?

Community Beginner ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

Hey folks,

 

When importing new photos, the thumbnails are generated for only the visible photos on the grid. Scrolling down and stopping, Lightroom then triggers a process that loads the previews for the newly visible photos if they've not already been calculated. Is there a way to programmatically do this same thing, but for all of the selected photos (in this case the collection of LrPhoto objects being passed to my plugin by the LrCatalog getTargetPhotos method)?

 

I've done some digging but to little avail. One solution that works (but is jenky in terms of user experience and speed), is to iterate through the photos by changing the selection to each (using the LrCatalog setSelectedPhotos method) - each selection triggering the aformentioned update. But there has to be a more elegant way to this.

 

Any wisdom from those more familiar with the Lightroom Classic SDK would be greatly appreciated. 🙏

TOPICS
SDK

Views

276

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
community guidelines

correct answers 1 Correct answer

LEGEND , Apr 25, 2023 Apr 25, 2023

Unfortunately, there is no SDK function that does the equivalent of Library > Previews > Build Standard-Sized Previews. The only other workaround I can think of is to select all the desired photos and then invoke Build Standard-Sized Previews using a keystroke-stuffing utility like Autohotkey on Windows or the equivalent on Mac, which is fragile and can take some care to make reasonably robust.

 

Votes

Translate

Translate
LEGEND ,
Apr 25, 2023 Apr 25, 2023

Copy link to clipboard

Copied

Unfortunately, there is no SDK function that does the equivalent of Library > Previews > Build Standard-Sized Previews. The only other workaround I can think of is to select all the desired photos and then invoke Build Standard-Sized Previews using a keystroke-stuffing utility like Autohotkey on Windows or the equivalent on Mac, which is fragile and can take some care to make reasonably robust.

 

Votes

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
community guidelines
Community Beginner ,
Apr 28, 2023 Apr 28, 2023

Copy link to clipboard

Copied

LATEST

Got it - thanks for the perspective John. Using a keystroke-stuffing utility sounds like a good workaround - though, one that will take ample testing to get stable! Onwards and forwards.

Votes

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
community guidelines