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

[Q] Can LrDevelopController.setValue() timing be changed? "straightenAngle"

Community Beginner ,
May 30, 2018 May 30, 2018

Hi all,

I think there's about one second timeout for changing "straightenAngle" value from LrDevelopController.setValue().

Is there way to change the timing to be three second or other timing?

Following code change "straightenAngle" value to 33.

"straightenAngle" is Develop => Crop Overlay => Tool: Crop & Straighten => Angle

If it is in Crop Overlay, it stay in Crop Overlay.

If it is other tool, it change to Crop Overlay and come back to original state about one second.

It will stay longer if another LrDevelopController.setValue() within one second.

My question is the one second timing can be changed.

local LrDevelopController = import "LrDevelopController"

local p = "straightenAngle"

local v = 33

LrDevelopController.setValue(p,v)

Thank you,

Naoki

TOPICS
SDK
924
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 ,
May 30, 2018 May 30, 2018

What if you did this:

local tool = LrDevelopController.getSelectedTool ()

LrDevelopController.setSelectedTool ("crop")

LrDevelopController.setValue ("straightenAngle", v)

LrDevelopController.setSelectedTool (tool)

Also, I wonder if the value LrDevelopController.setMultipleAdjustmentThreshold() affects this -- it defaults to 0.5 seconds. 

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
Contributor ,
May 31, 2018 May 31, 2018
LATEST

Hi johnrellis

Thank you very much for the code.

Wow. The code behavior was totally unexpected from reading.

The grid does not show up. And no scrolling in right hand property panel happens.

So it looks more smooth transition on UI standpoint.

The switching tool timing seems not related from LrDevelopController.setMultipleAdjustmentThreshold() .

Following is updated code.

local LrDevelopController = import "LrDevelopController"

local p = "straightenAngle"

local v = 33

local tool = LrDevelopController.getSelectedTool()

LrDevelopController.selectTool("crop")

LrDevelopController.setValue(p, v)

LrDevelopController.selectTool(tool)

Thank you,

Naoki

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