Skip to main content
arielmartini
Known Participant
Apr 4, 2018 2:18 AM UTC
Released

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

[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.

This topic is closed to new replies. Start a new post to keep the conversation going.

25 replies

johnrellis
Legend
Jun 19, 2018 6:23 AM UTC
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...
Translate
Smit K
Participating Frequently
Jun 19, 2018 4:33 AM UTC
Hi,

Lightroom Classic 7.4 was released today and should address this issue.  Please update your Lightroom to the latest version and let us know if you continue to see the issue. Thank you for your patience.

https://helpx.adobe.com/lightroom/help/whats-new.html

Thanks,
Smit Keniya
Translate
Smit | Lightroom Team
johnrellis
Legend
Jun 12, 2018 3:29 PM UTC
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...
Translate
johnrellis
Legend
Jun 12, 2018 3:25 PM UTC
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.
Translate
johnrellis
Legend
Jun 12, 2018 3:15 PM UTC



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}
Translate
Inspiring
Jun 12, 2018 10:59 AM UTC
following... applying presets via script resets every setting to 0 which r not included in preset!
Translate
Inspiring
May 12, 2018 6:36 PM UTC
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.
Translate
arielmartini
Known Participant
Apr 26, 2018 12:42 AM UTC
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.
Translate
Adobe Employee
Apr 25, 2018 6:18 AM UTC
@9206501 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
Translate
arielmartini
Known Participant
Apr 25, 2018 4:22 AM UTC
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?
Translate