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.
My actual code is
LrTasks.startAsyncTask(function ()
local catalog = LrApplication.activeCatalog()
local photos = catalog:getTargetPhotos()
if photos == nil then
LrDialogs.message("Hello World", "Please select the photos to Straigthten")
return
end
for photoCount = 1, #photos do
local photo = photos[photoCount]
if LrApplicationView.getCurrentModuleName() == "develop" then
LrDevelopController.setValue("straightenAngle", 5)
else
LrApplicationView.switchToModule ("develop")
LrDevelopController.setValue("straightenAngle", 5)
end
end
end)
It works okey for the firts photo selected and set the angle to 5, but I want to find de way to click the UI button to let Lightroom calculate the angle by it self.