Skip to main content
Participant
October 19, 2022
Question

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

  • October 19, 2022
  • 1 reply
  • 231 views

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.

This topic has been closed for replies.

1 reply

Community Expert
October 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.

johnrellis
Legend
October 19, 2022

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:

 

 

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.)