Skip to main content
Participating Frequently
October 4, 2024
Question

Code to access the "Auto" option in the Crop tool?

  • October 4, 2024
  • 1 reply
  • 231 views

Hi,

I'm developing a plugin using the Lightroom Classic SDK, and I would like to know if there's a way to access the "Auto" option in the Crop tool (Auto Angle adjustment) programmatically. Is there any specific function or method available to trigger this adjustment via code?

Thank you for your assistance!

This topic has been closed for replies.

1 reply

johnrellis
Legend
October 4, 2024

There's no way for a plugin to access that option via the SDK. However, it can set Transform > Level, which does the same thing as Crop > Auto:

targetPhoto:applyDevelopSettings {
    PerspectiveAspect = 0, 
    PerspectiveHorizontal = 0, 
    PerspectiveRotate = 0, 
    PerspectiveScale = 100, 
    PerspectiveUpright = 3, 
    PerspectiveVertical = 0, 
    PerspectiveX = 0, 
    PerspectiveY = 0}

 

Participating Frequently
October 6, 2024

Thank you for your response!

I really appreciate you pointing out that using Transform > Level achieves the same result.

Your explanation was very helpful.

I’m grateful for your guidance, and I look forward to any future advice you may have!