Skip to main content
Participating Frequently
Oct 4, 2024 1:26 AM UTC
Question

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

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 is closed to new replies. Start a new post to keep the conversation going.

2 replies

johnrellis
Legend
Oct 4, 2024 2:44 AM UTC

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}

 

Translate
Participating Frequently
Oct 6, 2024 12:28 PM UTC

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!

Translate