Skip to main content
C.Cella
Legend
November 24, 2023
Question

How to avoid creation of multiple history step after using a script.

  • November 24, 2023
  • 1 reply
  • 332 views

I have created small scripts to increment/decrement Exposure and Local Exposure.

This is one of them.

 

local LrDevelopController = import "LrDevelopController"
local mode = LrDevelopController.increment ("Exposure2012")

 

 

The scripts works fine BUT if I move a different slider before the changes in exposure Exposure are recorded in history I end up creating a multitude of unwanted steps for naught for the other setting/parameter I changed.

 

Steps I do (video shows the issue)

 

1. I use the script (I assigned it to a KBC on my Wacom Tough Ring for fast use)

2. Before the "Exposure + X" step is recorded I click and hold another slider and move it left right.

 BUT I do not let it go.

 

Result: A multitude of steps are added, each single movement of the other slider is recorded as a new history step even if effectively I dind't let go of the slider so LrC should still tracking the setting but not write the changes in history.

 

I tired to fix this issue by adding LrDevelopController.startTracking ("Expsure2012") to the script but without success.

 

I am definitely making some mistake here,  I am missing the necessary line in the script to prevent this from happening.  

Any help would be appreciated.

 

 

This topic has been closed for replies.

1 reply

johnrellis
Legend
November 26, 2023

I don't think the API documentation is complete or accurate with respect to tracking, and I don't have much experience with it. But I think you need to include a call to stopTracking():

local LrDevelopController = import "LrDevelopController"
LrDevelopController.startTracking ("Exposure2012")
LrDevelopController.increment ("Exposure2012")
LrDevelopController.stopTracking ("Exposure2012")

 

 

C.Cella
C.CellaAuthor
Legend
November 26, 2023

@johnrellis I did create a script like yours (and a few other variations but nothing works)

Actually your script basically removes the default tracking delay of 2 seconds and every single Exposure increment/decrement is recorded in history. 

 

So from what I can tell unless I wait the Exposure +/- stpes to be recorded I can't click and hold any other slider.

This might actually be a bug.

 

.

johnrellis
Legend
November 27, 2023

I poked around trying to understand the logic, and history tracking is broken when you mix the keyboard shortcuts "=" and "-" with using the mouse to adjust sliders:

https://community.adobe.com/t5/lightroom-classic-bugs/incorrect-history-steps-when-using-keyboard-shortcuts-to-adjust-develop-sliders/idi-p/14259463

 

I observed the same behavior in LR 6.14 / Windows 11, so it's nothing new.

 

I'm guessing that the shortcuts use the same underlying code as LrDevelopController.