Skip to main content
Adobe Photoshop Family

21 Messages

 • 

550 Points

Wed, Apr 4, 2018 2:18 AM

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

Responses

Official Solution

Employee

 • 

291 Messages

 • 

7.8K Points

2 years ago

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

497 Messages

 • 

9.6K Points

2 years ago

Thanks for letting us know.
We are investigating.

Thanks,
Sunil

75 Messages

 • 

1.5K Points

2 years ago

@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

21 Messages

 • 

550 Points

create a partial develop setting, that change only one setting, for instance white balance, and name it "New Preset".
create a script that calls photo:applyDevelopPreset, like this:

local LrApplication = import 'LrApplication'
local catalog = LrApplication.activeCatalog()
catalog:withWriteAccessDo("ApplyNR", function()
local myPreset
for _, folder in ipairs(LrApplication:developPresetFolders()) do
if folder:getName() == "User Presets" then
for _, preset in ipairs(folder:getDevelopPresets()) do
        if preset:getName() == "New Preset" then 
          myPreset = preset
end end end end
for _,photo in pairs(catalog:getTargetPhotos()) do
    photo:applyDevelopPreset(myPreset)
end
end)
This should change only white balance, but resets all other develop settings to default.

12 Messages

 • 

444 Points

Please fix this in the next update, it breaks MIDI2LR functionality and a lot of people are using it and depend on it working properly.

75 Messages

 • 

1.5K Points

Thanks  @ariel martini for the details.

I am able to reproduce the issue you are reporting. We will make a fix.

Thanks,
Ganesh

21 Messages

 • 

550 Points

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?

75 Messages

 • 

1.5K Points

@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

1 Message

 • 

60 Points

2 years ago

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.

1 Message

 • 

64 Points

2 years ago

following... applying presets via script resets every setting to 0 which r not included in preset!

Champion

 • 

5K Messages

 • 

91.5K Points

2 years ago

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}

Champion

 • 

5K Messages

 • 

91.5K Points

2 years ago

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.

Champion

 • 

5K Messages

 • 

91.5K Points

2 years ago

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

14.6K Messages

 • 

282.6K Points

Creating a separate topic for the remaining issue

Please reference the new conversation here: Lightroom SDK: issue with preset:getSetting()

1 Message

 • 

60 Points

2 years ago

Is with the Update from 18.June fixed the Issue?

Champion

 • 

5K Messages

 • 

91.5K Points

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

7.9K Messages

 • 

114.4K Points

2 years ago

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!

Adobe Photography Products
Quality Engineer: Customer Advocacy

Champion

 • 

5K Messages

 • 

91.5K Points

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

9 Messages

 • 

226 Points

2 years ago

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/

7.9K Messages

 • 

114.4K Points

2 years ago

Greetings

Updates to Lightroom Classic CC (8.2), Lightroom CC for desktop (2.2), Lightroom CC.Mobile (Android and iOS) were released on Monday, February 11, 2019. Please verify that your issue is fixed by the current update.

Thank you for your patience.

Adobe Photography Products
Quality Engineer: Customer Advocacy

Champion

 • 

5K Messages

 • 

91.5K Points

I just ran the recipe above, and the bug appears to be fixed, thanks.