Lightroom SDK: photo:applyDevelopPreset() changes all settings, not just those of preset

  • 5
  • Problem
  • Updated 4 months ago
  • (Edited)
[Update: There are two symptoms of the same underlying bug introduced in LR 7.3:

- preset:getSetting() returns all develop settings, not just those set by the preset

- photo:applyDevelopPreset() changes all settings, not just those of the preset

See this post for a script demonstrating both:
https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-3-resets-settings-when-develop-p...

-- John Ellis]

I use a script that uses "photo:applyDevelopPreset". If i use it with a partial preset (that have only a few or only one setting) it resets all other settings to default.
Reverting to previous version until this is fixed.
Photo of ariel martini

ariel martini

  • 17 Posts
  • 5 Reply Likes

Posted 7 months ago

  • 5
Photo of Sunil Bhaskaran

Sunil Bhaskaran, Official Rep

  • 348 Posts
  • 120 Reply Likes
Thanks for letting us know.
We are investigating.

Thanks,
Sunil
Photo of Ganesh

Ganesh, Lightroom Engineer

  • 65 Posts
  • 22 Reply Likes
@ariel can you share more details about the issue? If possible share your script, preset(s) along with the steps to reproduce. We will reach your email to request more details.

Thanks,
Ganesh
Photo of ariel martini

ariel martini

  • 17 Posts
  • 5 Reply Likes
Hey Ganesh, 7.3.1 not only DOESNT fix this, it makes scripts totally useless. I get "Assertion Failed" dialog box. How is this even released without passing this test?
Photo of Ganesh

Ganesh, Lightroom Engineer

  • 65 Posts
  • 22 Reply Likes
@ariel Lr 7.3.1 does not has the fix. Can you provide more details about the "assertion failed" dialog box. If possible please share the exact script which you are testing over email. One of our team member already contacted you over email some time back.

Regards,
Ganesh
Photo of ariel martini

ariel martini

  • 17 Posts
  • 5 Reply Likes
Ganesh I have no time to debug and troubleshoot for you, I pay for the software, I do not get paid to use it. If you want to pay me to debug it for you, I will be glad to do so.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1013 Reply Likes
Ganesh, please see this post for a script that demonstrates both symptoms of the bug:
https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-3-resets-settings-when-develop-p...
Photo of kitty van gemert

kitty van gemert

  • 19 Posts
  • 2 Reply Likes
Ariel no one is asking you to debug, just to add the script so THEY can investigate and debug. 
Photo of Joan Torrijos

Joan Torrijos

  • 1 Post
  • 0 Reply Likes
I have the same problem... I have a preset that sets the sharpening parameters.  When I apply it in LR Classic CC 7.3.1 it reverts the basic parameters to default.
Photo of Tomasz Sagadyn

Tomasz Sagadyn

  • 1 Post
  • 0 Reply Likes
following... applying presets via script resets every setting to 0 which r not included in preset!
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes
This reply was created from a merged topic originally titled Lightroom SDK: preset:getSetting() returns all develop settings, not just those o....

In LR 7.3.1, preset:getSetting() returns all develop settings, not just the settings actually changed by the preset. This breaks existing plugins.

For example, the .xmp of a preset that changes just Exposure contains just the Exposure2012 develop setting:
   crs:Exposure2012="-0.12"
But preset:getSetting() returns all the develop settings:
{--table: 1
    AutoBrightness = false, 
    AutoContrast = false, 
    AutoExposure = false, 
    AutoGrayscaleMix = false, 
    AutoLateralCA = 0, 
    AutoShadows = false, 
    AutoTone = false, 
    Blacks2012 = 0, 
    BlueHue = 0, 
    BlueSaturation = 0, 
    Brightness = 50, 
    ChromaticAberrationB = 0, 
    ChromaticAberrationR = 0, 
    Clarity = 0, 
    Clarity2012 = 0, 
    ColorNoiseReduction = 25, 
    ColorNoiseReductionDetail = 50, 
    ColorNoiseReductionSmoothness = 50, 
    Contrast = 25, 
    Contrast2012 = 0, 
    ConvertToGrayscale = false, 
    Defringe = 0, 
    DefringeGreenAmount = 0, 
    DefringeGreenHueHi = 60, 
    DefringeGreenHueLo = 40, 
    DefringePurpleAmount = 0, 
    DefringePurpleHueHi = 70, 
    DefringePurpleHueLo = 30, 
    Dehaze = 0, 
    EnableCalibration = true, 
    EnableCircularGradientBasedCorrections = true, 
    EnableColorAdjustments = true, 
    EnableDetail = true, 
    EnableEffects = true, 
    EnableGradientBasedCorrections = true, 
    EnableGrayscaleMix = true, 
    EnableLensCorrections = true, 
    EnablePaintBasedCorrections = true, 
    EnableRedEye = true, 
    EnableRetouch = true, 
    EnableSplitToning = true, 
    EnableToneCurve = true, 
    EnableTransform = true, 
    Exposure = 0, 
    Exposure2012 = -0.12, 
    FillLight = 0, 
    GrainAmount = 0, 
    GrainFrequency = 50, 
    GrainSize = 25, 
    GrayMixerAqua = 0, 
    GrayMixerBlue = 0, 
    GrayMixerGreen = 0, 
    GrayMixerMagenta = 0, 
    GrayMixerOrange = 0, 
    GrayMixerPurple = 0, 
    GrayMixerRed = 0, 
    GrayMixerYellow = 0, 
    GreenHue = 0, 
    GreenSaturation = 0, 
    HighlightRecovery = 0, 
    Highlights2012 = 0, 
    HueAdjustmentAqua = 0, 
    HueAdjustmentBlue = 0, 
    HueAdjustmentGreen = 0, 
    HueAdjustmentMagenta = 0, 
    HueAdjustmentOrange = 0, 
    HueAdjustmentPurple = 0, 
    HueAdjustmentRed = 0, 
    HueAdjustmentYellow = 0, 
    LensManualDistortionAmount = 0, 
    LensProfileEnable = 0, 
    LensProfileSetup = "LensDefaults", 
    LuminanceAdjustmentAqua = 0, 
    LuminanceAdjustmentBlue = 0, 
    LuminanceAdjustmentGreen = 0, 
    LuminanceAdjustmentMagenta = 0, 
    LuminanceAdjustmentOrange = 0, 
    LuminanceAdjustmentPurple = 0, 
    LuminanceAdjustmentRed = 0, 
    LuminanceAdjustmentYellow = 0, 
    LuminanceNoiseReductionContrast = 0, 
    LuminanceNoiseReductionDetail = 50, 
    LuminanceSmoothing = 0, 
    OverrideLookVignette = false, 
    ParametricDarks = 0, 
    ParametricHighlights = 0, 
    ParametricHighlightSplit = 75, 
    ParametricLights = 0, 
    ParametricMidtoneSplit = 50, 
    ParametricShadows = 0, 
    ParametricShadowSplit = 25, 
    PerspectiveAspect = 0, 
    PerspectiveHorizontal = 0, 
    PerspectiveRotate = 0, 
    PerspectiveScale = 100, 
    PerspectiveUpright = 0, 
    PerspectiveVertical = 0, 
    PerspectiveX = 0, 
    PerspectiveY = 0, 
    PostCropVignetteAmount = 0, 
    PostCropVignetteFeather = 50, 
    PostCropVignetteHighlightContrast = 0, 
    PostCropVignetteMidpoint = 50, 
    PostCropVignetteRoundness = 0, 
    PostCropVignetteStyle = 1, 
    ProcessVersion = "10.0", 
    RedEyeInfo = {}, 
    RedHue = 0, 
    RedSaturation = 0, 
    RetouchInfo = {}, 
    Saturation = 0, 
    SaturationAdjustmentAqua = 0, 
    SaturationAdjustmentBlue = 0, 
    SaturationAdjustmentGreen = 0, 
    SaturationAdjustmentMagenta = 0, 
    SaturationAdjustmentOrange = 0, 
    SaturationAdjustmentPurple = 0, 
    SaturationAdjustmentRed = 0, 
    SaturationAdjustmentYellow = 0, 
    Shadows = 5, 
    Shadows2012 = 0, 
    ShadowTint = 0, 
    SharpenDetail = 25, 
    SharpenEdgeMasking = 0, 
    SharpenRadius = 1, 
    Sharpness = 40, 
    SplitToningBalance = 0, 
    SplitToningHighlightHue = 0, 
    SplitToningHighlightSaturation = 0, 
    SplitToningShadowHue = 0, 
    SplitToningShadowSaturation = 0, 
    ToneCurve = {--table: 2
        [1] = 0, 
        [2] = 0, 
        [3] = 32, 
        [4] = 22, 
        [5] = 64, 
        [6] = 56, 
        [7] = 128, 
        [8] = 128, 
        [9] = 192, 
        [10] = 196, 
        [11] = 255, 
        [12] = 255}, 
    ToneCurveBlue = {--table: 3
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurveGreen = {--table: 4
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurveName = "Medium Contrast", 
    ToneCurveName2012 = "Linear", 
    ToneCurvePV2012 = {--table: 5
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurvePV2012Blue = {--table: 6
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurvePV2012Green = {--table: 7
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurvePV2012Red = {--table: 8
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneCurveRed = {--table: 9
        [1] = 0, 
        [2] = 0, 
        [3] = 255, 
        [4] = 255}, 
    ToneMapStrength = 0, 
    UprightCenterMode = 0, 
    UprightCenterNormX = 0.5, 
    UprightCenterNormY = 0.5, 
    UprightFocalLength35mm = 35, 
    UprightFocalMode = 0, 
    UprightFourSegmentsCount = 0, 
    UprightPreview = false, 
    UprightTransformCount = 6, 
    UprightVersion = 151388160, 
    Version = "10.3", 
    Vibrance = 0, 
    VignetteAmount = 0, 
    VignetteMidpoint = 50, 
    WhiteBalance = "As Shot", 
    Whites2012 = 0}
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes
There are two symptoms of the same underlying bug:

- preset:getSetting() returns all develop settings, not just those set by the preset

- photo:applyDevelopPreset() changes all settings, not just those of the preset

Here is a script and accompany preset that demonstrates both symptoms:
https://www.dropbox.com/s/pp5hjilw3zeno9r/applypresetsbug.2018.06.12.zip?dl=0

To run the script:

1. Install the accompanying preset "ApplyPresetsBug.xmp" in the User Presets
   group. This preset sets Exposure to 1.23 but not other setting.

2. Place "applypresetsbug.lua" in LR's Scripts folder and run it from the Scripts menu.
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1014 Reply Likes
Unfortunately, while 7.4 fixes the problem with photo:applyDevelopPreset(), it doesn't address the related problem with preset:getSetting().  See this previous post for the test script: 
https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-3-resets-settings-when-develop-p...
(Edited)
Photo of Jeffrey Tranberry

Jeffrey Tranberry, Sr. Product Manager, Digital Imaging

  • 14469 Posts
  • 1866 Reply Likes
Creating a separate topic for the remaining issue

Please reference the new conversation here: Lightroom SDK: issue with preset:getSetting()
Photo of Danjel Rojka

Danjel Rojka

  • 1 Post
  • 0 Reply Likes
Is with the Update from 18.June fixed the Issue?
Photo of John R. Ellis

John R. Ellis, Champion

  • 3848 Posts
  • 1009 Reply Likes
LR 7.4 only fixes the problem with photo:applyDevelopPrest() -- it doesn't fix the bug with preset:getSetting(): https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-3-resets-settings-when-develop-p...
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 4253 Posts
  • 810 Reply Likes
Lightroom Classic CC Version 7.4 was released earlier today and should have a fix for this issue. Give it a try and let us know if you continue to see this problem. Thank you for your patience!
Photo of John R. Ellis

John R. Ellis, Champion

  • 3857 Posts
  • 1013 Reply Likes
LR 7.4 only fixes the problem with photo:applyDevelopPrest() -- it doesn't fix the bug with preset:getSetting(): https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-3-resets-settings-when-develop-p...
Photo of LighroomStatistics

LighroomStatistics

  • 9 Posts
  • 1 Reply Like
This also breaks the Relative adjustments plugin, which many people use.
The first bugs have come in.
http://www.photographers-toolbox.com/products/lightroomstatistics/relativeadjustments/ 

Please fix preset:getSetting() asap, because people now get totally unwanted results!
This is a major issue!
Also my plug-in "Preset viewer" is broken now: http://www.photographers-toolbox.com/products/lightroomstatistics/presetviewer/
(Edited)