SDK: Getting the position of the Loupe Overlay > Layout Image
#SDK - I have some ideas on expanding the use of the Layout Image overlay (View > Loupe Overlay > Layout Image), so I've been digging for how to get its properties.
So far, all I've found is that it saves the placement, opacity and filename of the layout image in the main preferences file in /AppData/Roaming/Adobe/Lightroom/Preferences:
LayoutOverlay_bottom = 0,
LayoutOverlay_left = 0,
LayoutOverlay_margin_bottom = 0.29698442820092,
LayoutOverlay_margin_left = 0.075870798890978,
LayoutOverlay_margin_right = 0.069698054660461,
LayoutOverlay_margin_top = -0.17659156262512,
LayoutOverlay_matte_opacity = 0,
LayoutOverlay_mruLayoutImages = "paths = {\...(edited)}\",
LayoutOverlay_opacity = 0.47666666666667,
LayoutOverlay_place_horizontal = 0,
LayoutOverlay_place_vertical = 0,
LayoutOverlay_right = 0,
LayoutOverlay_scale = 1,
LayoutOverlay_top = 0,
...
LoupeOverlay_grid_size = 49,
LoupeOverlay_guide_X = 0.5,
LoupeOverlay_guide_Y = 0.5,
LoupeOverlay_imagePath = "...(edited)...",
LoupeOverlay_show_grid = false,
LoupeOverlay_show_guides = true,
LoupeOverlay_show_image = true,
Sadly, all these preferences are not available as part of the API's LrPrefs namespace. I found a way to read this file manually and access these keys and their values, with one caveat: it seems that this preferences file gets written to disk 30 seconds after the last change to it.
This means that the actual placement/properties of the layout image is not available until 30 seconds after the user modifies it.
I've tried to find if there are any other ways or temp files that can be used to get more of a real-time state of the layout image, but so far no luck. I think Lightroom simply stores the real-time values in memory and writes them to disk after the 30 seconds delay.
Does anyone have further insight into this? Maybe @johnrellis ?
Thanks.
