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

Automatic angle to set in LrDevelopController.setValue("straightenAngle", angle)

Oct 19, 2022 Oct 19, 2022

Hi, is there any way to call 

LrDevelopController.setValue("straightenAngle", angle)

but to pass angle to be auto (just like to click the button in the UI of Lightroom Classic? 

I'm trying to automate batch processing of several photos of sports games and the angle is not always the same, and doing manually is a bit tedius. 

 

Maybe with other class or controller? If there's an option in the UI should be an option to do it with programming.

 

Thank you.

TOPICS
SDK , Windows
228
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 ,
Oct 19, 2022 Oct 19, 2022

An alternative to consider: Transform panel / Upright modes.

 

These are very easy to batch apply using conventional LrC means, e.g. within default processing at import. And Upright knows to recalculate for each image in its own right, in my experience doing a reliable and efficient job. Sure, sometimes it may be 'led astray' by mis-analysing genuinely tilted items within the photo - but the same equally happens with the Auto button for (crop) straightening.

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
LEGEND ,
Oct 19, 2022 Oct 19, 2022
LATEST

To build on Richard's reply, use Transform > Level to automatically level a photo.  Then create a preset or Sync/Copy with only Upright Mode selected:

 

johnrellis_0-1666194268014.png

 

That will cause Level to be recalculated for each target photo.  (Checking the other boxes will cause all the target photos to get the same angle of leveling as the source, and is a frequent source of confusion.)

 

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