Skip to main content
caj.ms
Inspiring
Jun 27, 2020 3:32 PM UTC
Answered

All Corrections get overwritten when calling applyDevelopPreset with a plugin preset in LRC 9.3

Calling `applyDevelopPreset` on a preset created within the plugin with even just the edit of adjusting exposure will cause all "Corrections" (Local adjustment Brushes, Radial Filters and Graduated Filters) to be reset. All other image settings remain unchanged.

 

Is there a way to prevent this from happening?

 

 

local preset = LrApplication.addDevelopPresetForPlugin(_PLUGIN, editText, edits)
photo:applyDevelopPreset(preset, _PLUGIN)

 

 

 Currently, as a workaround I'm having to do this to keep existing Corrections applied between edits:

 

 

edits.PaintBasedCorrections = photoSettings.PaintBasedCorrections
edits.CircularGradientBasedCorrections = photoSettings.CircularGradientBasedCorrections
edits.GradientBasedCorrections = photoSettings.GradientBasedCorrections

 

 

 This did not happen in Lightroom Classic 9.2, and all other settings seem to be unaffected.

This topic is closed to new replies. Start a new post to keep the conversation going.
johnrellis
johnrellisCorrect answer
Legend
Jun 27, 2020 5:44 PM UTC

Got it, I didn't test for local adjustments. I observe the same behavior.

 

I recommend you post a bug report in the official Adobe feedback forum, where Adobe wants all bug reports and feature suggestions: 
https://feedback.photoshop.com/photoshop_family/categories/photoshop_family_photoshop_lightroom

 

(Safari users, uncheck the option Safari > Preferences > Privacy > Prevent Cross-Site Tracking or use Chrome or Firefox.)

Be sure to include the first ten lines of the menu command Help > System Info.  Package up a complete, self-contained test plugin with as few lines as possible into a .zip that can be unzipped, installed, and run, which demonstrates the problem.  Unfortunately, support for the SDK is absolutely minimal for the past many years, and unless you lead Adobe by the hand, it's very unlikely they'll even file an internal bug report.

 

A workaround is to use the undocumented photo:applyDevelopSettings() to apply the desired settings.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

7 replies

johnrellis
Legend
Oct 22, 2020 10:41 PM UTC
johnrellis
Legend
Jun 28, 2020 3:30 PM UTC

Great. If the status of that bug report (at the top) changes from Problem to Acknowledged, that means they've filed an internal bug report. Sometimes they then change the status to In Progress to mean they're actually working on it, but sometimes they forget to do that (and many Acknowledged bugs remain deprioritized and unfixed).

Translate
johnrellis
johnrellisCorrect answer
Legend
Jun 27, 2020 5:44 PM UTC

Got it, I didn't test for local adjustments. I observe the same behavior.

 

I recommend you post a bug report in the official Adobe feedback forum, where Adobe wants all bug reports and feature suggestions: 
https://feedback.photoshop.com/photoshop_family/categories/photoshop_family_photoshop_lightroom

 

(Safari users, uncheck the option Safari > Preferences > Privacy > Prevent Cross-Site Tracking or use Chrome or Firefox.)

Be sure to include the first ten lines of the menu command Help > System Info.  Package up a complete, self-contained test plugin with as few lines as possible into a .zip that can be unzipped, installed, and run, which demonstrates the problem.  Unfortunately, support for the SDK is absolutely minimal for the past many years, and unless you lead Adobe by the hand, it's very unlikely they'll even file an internal bug report.

 

A workaround is to use the undocumented photo:applyDevelopSettings() to apply the desired settings.

 

[Use the blue reply button under the first post to ensure replies sort properly.]

Translate
caj.ms
caj.msAuthor
Inspiring
Jun 27, 2020 6:05 PM UTC

Awesome! Thanks for testing it out and the advice. I'll raise a bug report as suggested.

 

Also thanks for the `photo:applyDevelopSettings() ` tip! That'll come handy. 😁

 

Appreciate your help!

Translate
johnrellis
Legend
Jun 27, 2020 5:06 PM UTC

I just did a quick test and photo:applyDevelopPreset() appears to be working correctly.  It sounds like you might be defining a preset that sets all the develop settings, not just Exposure2012.  You can quickly check that by clicking Preferences > Presets > Show All Other Lightroom Presets, going to the subfolder "Plugin Develop Presets/<your plugin>", and editing the .lrtemplate file corresponding to the preset.  It should only contain one develop setting, e.g.

s = {
	id = "9D7E33D2-DC8C-41C3-AF26-BC2D2EE4F9AE",
	internalName = "Preset1",
	title = "Preset1",
	type = "Develop",
	value = {
		Exposure2012 = 4,
	},
	version = 0,
}

 

[Use the blue reply button under the first post to ensure replies sort properly.]

 

Translate
caj.ms
caj.msAuthor
Inspiring
Jun 27, 2020 5:35 PM UTC

Hi John,

Thanks for your response! I just checked and here's the preset the plugin is generating.

 

s = {
	id = "35819D5A-5461-4BDA-802C-0A2AF7D3E4AC",
	internalName = "Exposure  +0.3  1.8",
	title = "Exposure  +0.3  1.8",
	type = "Develop",
	value = {
		Exposure2012 = 1.8,
	},
	version = 0,
}

 

Applying this preset to an image that has any "Corrections" on it (local adjustment brush, radial or graduated filter), these corrections are removed. All other image settings are not affected. (I realise my original post might not have been clear about this, I've updated it to reflect this point)

 

I should point out this only happens in LRC 9.3. This didn't happen in LRC 9.2 and prior.

Translate