From 36b6e218697f4b0a1066c58e9570b98ada533da0 Mon Sep 17 00:00:00 2001 From: Desmis Date: Fri, 29 Nov 2019 07:37:11 +0100 Subject: [PATCH] reset values when changing mode Exposure SH vibrance --- rtdata/languages/default | 1 + rtgui/locallab.cc | 62 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/rtdata/languages/default b/rtdata/languages/default index aa77539e9..00e19b153 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2380,6 +2380,7 @@ TP_LOCALLAB_NOISEMETH;Denoise TP_LOCALLAB_NONENOISE;None TP_LOCALLAB_OFFS;Offset TP_LOCALLAB_OPACOL;Opacity +TP_LOCALLAB_PASTELS2;Vibrance TP_LOCALLAB_PDE;Laplacian & PDE TP_LOCALLAB_PDEFRA;PDE IPOL - Contrast attenuator TP_LOCALLAB_PDEFRAME_TOOLTIP;PDE IPOL - personal algorithm adapted from IPOL to Rawtherapee: lead to very different results and needs differents settings that Standard (negative black, gamma < 1,...)\nMay be usefull for low exposure.\n diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 5a51b881e..d630a9294 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -1756,6 +1756,7 @@ pe(nullptr) saturated->setAdjusterListener(this); pastels->setAdjusterListener(this); + if (showtooltip) { psThreshold->set_tooltip_markup(M("TP_VIBRANCE_PSTHRESHOLD_TOOLTIP")); @@ -1838,6 +1839,10 @@ pe(nullptr) vibranceBox->pack_start(*saturated, Gtk::PACK_SHRINK, 0); } + if (complexsoft == 2) { + pastels->setLabel(M("TP_LOCALLAB_PASTELS2")); + } + vibranceBox->pack_start(*pastels, Gtk::PACK_SHRINK, 0); if (complexsoft < 2) { @@ -4559,6 +4564,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).strvibab = strvibab->getValue(); pp->locallab.spots.at(pp->locallab.selspot).strvibh = strvibh->getValue(); pp->locallab.spots.at(pp->locallab.selspot).angvib = angvib->getValue(); + if (complexsoft == 2) { + skinTonesCurve->reset(); + } + // Soft Light pp->locallab.spots.at(pp->locallab.selspot).expsoft = expsoft->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).streng = streng->getIntValue(); @@ -10319,6 +10328,24 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con if (complexsoft == 2) { expMethod->set_active(1); + expcomp->setValue(0); + hlcompr->setValue(0); + hlcomprthresh->setValue(0); + black->setValue(0); + shadex->setValue(0); + shcompr->setValue(0); + expchroma->setValue(0); + structexp->setValue(0); + blurexpde->setValue(5); + gammaskexp->setValue(1); + slomaskexp->setValue(0); + strmaskexp->setValue(0); + angmaskexp->setValue(0); + softradiusexp->setValue(0); + } + + if (complexsoft > 0) { + lapmaskexp->setValue(0); } if (pp->locallab.spots.at(index).exnoiseMethod == "one") { @@ -10347,6 +10374,11 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con fatanchor->setValue(pp->locallab.spots.at(index).fatanchor); fatlevel->setValue(pp->locallab.spots.at(index).fatlevel); + if (complexsoft > 0) { + laplacexp->setValue(0); + fatlevel->setValue(2); + } + // Shadow highlight expshadhigh->setEnabled(pp->locallab.spots.at(index).expshadhigh); highlights->setValue(pp->locallab.spots.at(index).highlights); @@ -10380,6 +10412,19 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con if (complexsoft == 2) { shMethod->set_active(1); + highlights->setValue(0); + shadows->setValue(0); + } + + if (complexsoft == 2) { + gammaskSH->setValue(1); + slomaskSH->setValue(0); + strSH->setValue(0); + angSH->setValue(0); + } + + if (complexsoft > 0) { + lapmaskSH->setValue(0); } for (int i = 0; i < 5; i++) { @@ -10417,6 +10462,23 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con strvibh->setValue(pp->locallab.spots.at(index).strvibh); angvib->setValue(pp->locallab.spots.at(index).angvib); + if (complexsoft < 2) { + pastels->setLabel(M("TP_VIBRANCE_PASTELS")); + } + + if (complexsoft == 2) { + gammaskvib->setValue(1); + slomaskvib->setValue(0); + skinTonesCurve->reset(); + + } + if (complexsoft > 0) { + lapmaskvib->setValue(0); + strvibab->setValue(0); + strvibh->setValue(0); + + } + // Soft Light expsoft->setEnabled(pp->locallab.spots.at(index).expsoft); streng->setValue(pp->locallab.spots.at(index).streng);