Looking for Help with setting up a LrDevelopController.addAdjustmentChangeObserver
So I am trying to send some current develop settings to my Stream deck using the SDK and am looking for the right way to obtain the values whenever the Develop Tab is opened, a new photo is selected, or adjustments have been made. From the docs the AdjustmentChangeObserver in the LrDevelopController should provide a lot of that information, but when I set it up like below, I do not see any traces in my log, assuming it's not being called:
myObserver = {}
-- Function to monitor slider changes
local function adjustmentChangeObserverCallback(propertyName, newValue)
logger:trace("Adjustment changed: " .. tostring(propertyName) .. " = " .. tostring(newValue))
-- Callback function is triggered when an adjustment changes
if propertyName and newValue then
-- Log the property name and its new value
logger:trace("Adjustment changed: " .. propertyName .. " = " .. tostring(newValue))
-- Example: Perform some action when exposure changes
if propertyName == "Exposure" then
logger:trace("Exposure changed to: " .. tostring(newValue))
-- Add any additional logic here, e.g., sending data via socket
end
end
end
LrTasks.startAsyncTask (function ()
LrFunctionContext.callWithContext ("adjustmentObserver", function (context)
LrDevelopController.addAdjustmentChangeObserver (context, myObserver, adjustmentChangeObserverCallback)
while _G.running do
LrTasks.sleep (1)
end
end)
end)Any idea what I am doing wrong here?
I also did not find which values are being passed by the function, the documentation is a bit sparse on this function.
thank you!
Wolfgang
