diff --git a/rtdata/languages/default b/rtdata/languages/default index 011404400..32bd3da42 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1023,6 +1023,8 @@ HISTORY_MSG_782;Local - Blur Denoise Mask Wavelet levels HISTORY_MSG_783;Local - Color Mask Wavelet levels HISTORY_MSG_784;Local - Mask DeltaE HISTORY_MSG_785;Local - Mask Scope DeltaE +HISTORY_MSG_787;Local - Equalizer multiplier +HISTORY_MSG_788;Local - Equalizer detail HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2128,6 +2130,11 @@ TP_LOCALLAB_SLOMASKCOL;Slope mask TP_LOCALLAB_SHAMASKCOL;Shadows mask TP_LOCALLAB_HIGHMASKCOL;Highlights mask TP_LOCALLAB_LAPMASKCOL;Laplacian threshold mask +TP_LOCALLAB_LUMADARKEST;Darkest +TP_LOCALLAB_LUMAWHITESEST;Whiteest +TP_LOCALLAB_SH1;Shadows Highlights +TP_LOCALLAB_SH2;Equalizer +TP_LOCALLAB_DETAILSH;Details TP_LOCALLAB_LMASK_LL_TOOLTIP;Give priority to action on midtones and high lights TP_LOCALLAB_LMASK_LEVEL_TOOLTIP;Give priority to action on midtones and high lights and by choosing the concerned wavelet levels TP_LOCALLAB_SCOPEMASK;Scope Mask DeltaE Image diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 0d87711fa..14a3c77ce 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -812,6 +812,9 @@ enum ProcEventCode { EvlocallabcsThresholdcol = 782, Evlocallabdeltae = 783, EvLocallabSpotscopemask = 784, + EvlocallabshMethod = 785, + EvlocallabEqualizersh = 786, + EvlocallabdetailSH = 787, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 592f53a63..574cca2b4 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2510,6 +2510,8 @@ LocallabParams::LocallabSpot::LocallabSpot() : fatanchor(50.0), fatlevel(2), // Shadow highlight + shMethod("std"), + multsh{0, 0, 0, 0, 0}, expshadhigh(false), highlights(0), h_tonalwidth(70), @@ -2529,6 +2531,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : gammaskSH(1.0), slomaskSH(0.0), lapmaskSH(0.0), + detailSH(0), LmaskSHcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, // Vibrance expvibrance(false), @@ -2808,6 +2811,17 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && fatanchor == other.fatanchor && fatlevel == other.fatlevel // Shadow highlight + && shMethod == other.shMethod + && [this, &other]()->bool { + for (int i = 0; i < 5; i++) + { + if (multsh[i] != other.multsh[i]) { + return false; + } + } + + return true; + }() && expshadhigh == other.expshadhigh && highlights == other.highlights && h_tonalwidth == other.h_tonalwidth @@ -2827,6 +2841,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gammaskSH == other.gammaskSH && slomaskSH == other.slomaskSH && lapmaskSH == other.lapmaskSH + && detailSH == other.detailSH && LmaskSHcurve == other.LmaskSHcurve // Vibrance && expvibrance == other.expvibrance @@ -4092,6 +4107,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fatanchor, "Locallab", "Fatanchor_" + std::to_string(i), spot.fatanchor, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).fatlevel, "Locallab", "Fatlevel_" + std::to_string(i), spot.fatlevel, keyFile); // Shadow highlight + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).shMethod, "Locallab", "ShMethod_" + std::to_string(i), spot.shMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expshadhigh, "Locallab", "Expshadhigh_" + std::to_string(i), spot.expshadhigh, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).highlights, "Locallab", "highlights_" + std::to_string(i), spot.highlights, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).h_tonalwidth, "Locallab", "h_tonalwidth_" + std::to_string(i), spot.h_tonalwidth, keyFile); @@ -4111,7 +4127,11 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskSH, "Locallab", "GammaskSH_" + std::to_string(i), spot.gammaskSH, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskSH, "Locallab", "SlomaskSH_" + std::to_string(i), spot.slomaskSH, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskSH, "Locallab", "LapmaskSH_" + std::to_string(i), spot.lapmaskSH, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).detailSH, "Locallab", "DetailSH_" + std::to_string(i), spot.detailSH, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LmaskSHcurve, "Locallab", "LmaskSHCurve_" + std::to_string(i), spot.LmaskSHcurve, keyFile); + for (int j = 0; j < 5; j++) { + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).multsh[j], "Locallab", "Multsh" + std::to_string(j) + "_" + std::to_string(i), spot.multsh[j], keyFile); + } // Vibrance saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expvibrance, "Locallab", "Expvibrance_" + std::to_string(i), spot.expvibrance, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).saturated, "Locallab", "Saturated_" + std::to_string(i), spot.saturated, keyFile); @@ -5502,6 +5522,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Fatanchor_" + std::to_string(i), pedited, spot.fatanchor, spotEdited.fatanchor); assignFromKeyfile(keyFile, "Locallab", "Fatlevel_" + std::to_string(i), pedited, spot.fatlevel, spotEdited.fatlevel); // Shadow highlight + assignFromKeyfile(keyFile, "Locallab", "ShMethod_" + std::to_string(i), pedited, spot.shMethod, spotEdited.shMethod); assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + std::to_string(i), pedited, spot.expshadhigh, spotEdited.expshadhigh); assignFromKeyfile(keyFile, "Locallab", "highlights_" + std::to_string(i), pedited, spot.highlights, spotEdited.highlights); assignFromKeyfile(keyFile, "Locallab", "h_tonalwidth_" + std::to_string(i), pedited, spot.h_tonalwidth, spotEdited.h_tonalwidth); @@ -5521,7 +5542,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "GammaskSH_" + std::to_string(i), pedited, spot.gammaskSH, spotEdited.gammaskSH); assignFromKeyfile(keyFile, "Locallab", "SlomaskSH_" + std::to_string(i), pedited, spot.slomaskSH, spotEdited.slomaskSH); assignFromKeyfile(keyFile, "Locallab", "LapmaskSH_" + std::to_string(i), pedited, spot.lapmaskSH, spotEdited.lapmaskSH); + assignFromKeyfile(keyFile, "Locallab", "DetailSH_" + std::to_string(i), pedited, spot.detailSH, spotEdited.detailSH); assignFromKeyfile(keyFile, "Locallab", "LmaskSHCurve_" + std::to_string(i), pedited, spot.LmaskSHcurve, spotEdited.LmaskSHcurve); + for (int j = 0; j < 5; j ++) { + assignFromKeyfile(keyFile, "Locallab", "Multsh" + std::to_string(j) + "_" + std::to_string(i), pedited, spot.multsh[j], spotEdited.multsh[j]); + } // Vibrance assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + std::to_string(i), pedited, spot.expvibrance, spotEdited.expvibrance); assignFromKeyfile(keyFile, "Locallab", "Saturated_" + std::to_string(i), pedited, spot.saturated, spotEdited.saturated); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 3c7bd58cc..e73775097 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1058,6 +1058,8 @@ struct LocallabParams { double fatanchor; int fatlevel; // Shadow highlight + Glib::ustring shMethod; + int multsh[5]; bool expshadhigh; int highlights; int h_tonalwidth; @@ -1077,6 +1079,7 @@ struct LocallabParams { double gammaskSH; double slomaskSH; double lapmaskSH; + int detailSH; std::vector LmaskSHcurve; // Vibrance bool expvibrance; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 9d8d3fe2a..e6997c033 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -811,7 +811,10 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabcsThresholdblur LUMINANCECURVE, //EvlocallabcsThresholdcol LUMINANCECURVE, //Evlocallabdeltae - LUMINANCECURVE //EvLocallabSpotscopemask + LUMINANCECURVE, //EvLocallabSpotscopemask + LUMINANCECURVE, //EvlocallabshMethod + LUMINANCECURVE, //EvlocallabEqualizersh + LUMINANCECURVE // EvlocallabdetailSH }; namespace rtengine diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index e4db70e95..4f0812412 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -244,6 +244,7 @@ Locallab::Locallab(): gammaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), slomaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), lapmaskSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), + detailSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_DETAILSH"), -5, 5, 1, 0))), // Vibrance saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., 0.))), pastels(Gtk::manage(new Adjuster(M("TP_VIBRANCE_PASTELS"), -100., 100., 1., 0.))), @@ -407,6 +408,7 @@ Locallab::Locallab(): expMethod(Gtk::manage(new MyComboBoxText())), exnoiseMethod(Gtk::manage(new MyComboBoxText())), //Shadows Highlight + shMethod(Gtk::manage(new MyComboBoxText())), showmaskSHMethod(Gtk::manage(new MyComboBoxText())), showmaskSHMethodinv(Gtk::manage(new MyComboBoxText())), // Blur & Noise @@ -1038,6 +1040,19 @@ Locallab::Locallab(): expshadhigh->set_tooltip_text(M("TP_LOCALLAB_SHADOWHIGHLIGHT_TOOLTIP")); } + shMethod->append(M("TP_LOCALLAB_SH1")); + shMethod->append(M("TP_LOCALLAB_SH2")); + shMethod->set_active(0); + shMethodConn = shMethod->signal_changed().connect(sigc::mem_fun(*this, &Locallab::shMethodChanged)); + + if (showtooltip) { + expMethod->set_tooltip_text(M("TP_LOCALLAB_EXPMETHOD_TOOLTIP")); + } +/* + ctboxshmethod = Gtk::manage(new Gtk::HBox()); + Gtk::Label* const labelshmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_NOISEMETH") + ":")); + ctboxshmethod->pack_start(*labelshmethod, Gtk::PACK_SHRINK, 4); +*/ setExpandAlignProperties(expmasksh, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); expmasksh->signal_button_release_event().connect_notify(sigc::bind(sigc::mem_fun(this, &Locallab::foldAllButMe), expmasksh)); expmasksh->setLevel(2); @@ -1045,6 +1060,22 @@ Locallab::Locallab(): expmasksh->set_tooltip_markup(M("TP_LOCALLAB_MASK_TOOLTIP")); } + for (int i = 0; i < 5; i++) { + Glib::ustring ss; + ss = Glib::ustring::format(i); + + if (i == 0) { + ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMADARKEST")); + } else if (i == 5) { + ss += Glib::ustring::compose(" (%1)", M("TP_LOCALLAB_LUMAWHITESEST")); + } + + multipliersh[i] = Gtk::manage(new Adjuster(std::move(ss), -100, 100, 1, 0)); + multipliersh[i]->setAdjusterListener(this); + } + + + highlights->setAdjusterListener(this); h_tonalwidth->setAdjusterListener(this); shadows->setAdjusterListener(this); @@ -1058,6 +1089,7 @@ Locallab::Locallab(): gammaskSH->setAdjusterListener(this); slomaskSH->setAdjusterListener(this); lapmaskSH->setAdjusterListener(this); + detailSH->setAdjusterListener(this); if (showtooltip) { radmaskSH->set_tooltip_text(M("TP_LOCALLAB_LAPRAD_TOOLTIP")); @@ -1145,6 +1177,11 @@ Locallab::Locallab(): mask2SHCurveEditorG->curveListComplete(); ToolParamBlock* const shadhighBox = Gtk::manage(new ToolParamBlock()); +// shadhighBox->pack_start(*shMethod); +// for (int i = 0; i < 5; i++) { +// shadhighBox->pack_start(*multipliersh[i]); +// } +// shadhighBox->pack_start(*detailSH); shadhighBox->pack_start(*highlights); shadhighBox->pack_start(*h_tonalwidth); shadhighBox->pack_start(*shadows); @@ -3403,7 +3440,17 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).gammaskSH = gammaskSH->getValue(); pp->locallab.spots.at(pp->locallab.selspot).slomaskSH = slomaskSH->getValue(); pp->locallab.spots.at(pp->locallab.selspot).lapmaskSH = lapmaskSH->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).detailSH = detailSH->getIntValue(); pp->locallab.spots.at(pp->locallab.selspot).LmaskSHcurve = LmaskSHshape->getCurve(); + if (shMethod->get_active_row_number() == 0) { + pp->locallab.spots.at(pp->locallab.selspot).shMethod = "std"; + } else if (shMethod->get_active_row_number() == 1) { + pp->locallab.spots.at(pp->locallab.selspot).shMethod = "tone"; + } + for (int i = 0; i < 5; i++) { + pp->locallab.spots.at(pp->locallab.selspot).multsh[i] = multipliersh[i]->getIntValue(); + } + // Vibrance pp->locallab.spots.at(pp->locallab.selspot).expvibrance = expvibrance->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).saturated = saturated->getIntValue(); @@ -3747,7 +3794,12 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).gammaskSH = pe->locallab.spots.at(pp->locallab.selspot).gammaskSH || gammaskSH->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).slomaskSH = pe->locallab.spots.at(pp->locallab.selspot).slomaskSH || slomaskSH->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).lapmaskSH = pe->locallab.spots.at(pp->locallab.selspot).lapmaskSH || lapmaskSH->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).detailSH = pe->locallab.spots.at(pp->locallab.selspot).detailSH || detailSH->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).LmaskSHcurve = pe->locallab.spots.at(pp->locallab.selspot).LmaskSHcurve || !LmaskSHshape->isUnChanged(); + pe->locallab.spots.at(pp->locallab.selspot).shMethod = pe->locallab.spots.at(pp->locallab.selspot).shMethod || shMethod->get_active_text() != M("GENERAL_UNCHANGED"); + for (int i = 0; i < 5; i++) { + pe->locallab.spots.at(pp->locallab.selspot).multsh[i] = pe->locallab.spots.at(pp->locallab.selspot).multsh[i] || multipliersh[i]->getEditedState(); + } // Vibrance pe->locallab.spots.at(pp->locallab.selspot).expvibrance = pe->locallab.spots.at(pp->locallab.selspot).expvibrance || !expvibrance->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).saturated = pe->locallab.spots.at(pp->locallab.selspot).saturated || saturated->getEditedState(); @@ -4049,7 +4101,12 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).gammaskSH = pedited->locallab.spots.at(pp->locallab.selspot).gammaskSH || gammaskSH->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).slomaskSH = pedited->locallab.spots.at(pp->locallab.selspot).slomaskSH || slomaskSH->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).lapmaskSH = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskSH || lapmaskSH->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).detailSH = pedited->locallab.spots.at(pp->locallab.selspot).detailSH || detailSH->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).LmaskSHcurve = pedited->locallab.spots.at(pp->locallab.selspot).LmaskSHcurve || !LmaskSHshape->isUnChanged(); + pedited->locallab.spots.at(pp->locallab.selspot).shMethod = pedited->locallab.spots.at(pp->locallab.selspot).shMethod || shMethod->get_active_text() != M("GENERAL_UNCHANGED"); + for (int i = 0; i < 5; i++) { + pedited->locallab.spots.at(pp->locallab.selspot).multsh[i] = pedited->locallab.spots.at(pp->locallab.selspot).multsh[i] || multipliersh[i]->getEditedState(); + } // Vibrance pedited->locallab.spots.at(pp->locallab.selspot).expvibrance = pedited->locallab.spots.at(pp->locallab.selspot).expvibrance || !expvibrance->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).saturated = pedited->locallab.spots.at(pp->locallab.selspot).saturated || saturated->getEditedState(); @@ -4914,6 +4971,24 @@ void Locallab::exnoiseMethodChanged() } } +void Locallab::shMethodChanged() +{ + // printf("expMethodChanged\n"); + disableListener(); + + if (shMethod->get_active_row_number() == 0) { + } else if (shMethod->get_active_row_number() == 1) { + } + + enableListener(); + + if (getEnabled() && expshadhigh->getEnabled()) { + if (listener) { + listener->panelChanged(EvlocallabshMethod, shMethod->get_active_text()); + } + } +} + void Locallab::showmaskSHMethodChanged() { @@ -6006,6 +6081,10 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe gammaskSH->setDefault(defSpot->gammaskSH); slomaskSH->setDefault(defSpot->slomaskSH); lapmaskSH->setDefault(defSpot->lapmaskSH); + detailSH->setDefault(defSpot->detailSH); + for (int i = 0; i < 5; i++) { + multipliersh[i]->setDefault(defSpot->multsh[i]); + } // Vibrance saturated->setDefault((double)defSpot->saturated); pastels->setDefault((double)defSpot->pastels); @@ -6187,6 +6266,10 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe gammaskSH->setDefaultEditedState(Irrelevant); slomaskSH->setDefaultEditedState(Irrelevant); lapmaskSH->setDefaultEditedState(Irrelevant); + detailSH->setDefaultEditedState(Irrelevant); + for (int i = 0; i < 5; i++) { + multipliersh[i]->setDefaultEditedState(Irrelevant); + } // Vibrance saturated->setDefaultEditedState(Irrelevant); pastels->setDefaultEditedState(Irrelevant); @@ -6372,6 +6455,10 @@ void Locallab::setDefaults(const ProcParams * defParams, const ParamsEdited * pe gammaskSH->setDefaultEditedState(defSpotState->gammaskSH ? Edited : UnEdited); slomaskSH->setDefaultEditedState(defSpotState->slomaskSH ? Edited : UnEdited); lapmaskSH->setDefaultEditedState(defSpotState->lapmaskSH ? Edited : UnEdited); + detailSH->setDefaultEditedState(defSpotState->detailSH ? Edited : UnEdited); + for (int i = 0; i < 5; i++) { + multipliersh[i]->setDefaultEditedState(defSpotState->multsh[i] ? Edited : UnEdited); + } // Vibrance saturated->setDefaultEditedState(defSpotState->saturated ? Edited : UnEdited); pastels->setDefaultEditedState(defSpotState->pastels ? Edited : UnEdited); @@ -6825,6 +6912,19 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) if (getEnabled() && expshadhigh->getEnabled()) { + if (a == multipliersh[0] || a == multipliersh[1] || a == multipliersh[2] || a == multipliersh[3] || a == multipliersh[4]) { + if (listener) { + listener->panelChanged(EvlocallabEqualizersh, + Glib::ustring::compose("%1, %2, %3, %4, %5", + Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[0]->getIntValue()), + Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[1]->getIntValue()), + Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[2]->getIntValue()), + Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[3]->getIntValue()), + Glib::ustring::format(std::fixed, std::setprecision(2), multipliersh[4]->getIntValue()))); + } + } + + if (a == highlights) { if (listener) { listener->panelChanged(Evlocallabhighlights, highlights->getTextValue()); @@ -6903,6 +7003,12 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == detailSH) { + if (listener) { + listener->panelChanged(EvlocallabdetailSH, detailSH->getTextValue()); + } + } + } // Vibrance @@ -7674,6 +7780,10 @@ void Locallab::setBatchMode(bool batchMode) gammaskSH->showEditedCB(); slomaskSH->showEditedCB(); lapmaskSH->showEditedCB(); + detailSH->showEditedCB(); + for (int i = 0; i < 5; i++) { + multipliersh[i]->showEditedCB(); + } // Vibrance saturated->showEditedCB(); pastels->showEditedCB(); @@ -7800,6 +7910,7 @@ void Locallab::setBatchMode(bool batchMode) expMethod->append(M("GENERAL_UNCHANGED")); exnoiseMethod->append(M("GENERAL_UNCHANGED")); // softlight + shMethod->append(M("GENERAL_UNCHANGED")); softMethod->append(M("GENERAL_UNCHANGED")); // Blur & Noise blMethod->append(M("GENERAL_UNCHANGED")); @@ -7976,6 +8087,7 @@ void Locallab::enableListener() enaExpMaskConn.block(false); enaExpMaskaftConn.block(false); // Shadow highlight + shMethodConn.block(false); enableshadhighConn.block(false); showmaskSHMethodConn.block(false); showmaskSHMethodConninv.block(false); @@ -8055,6 +8167,7 @@ void Locallab::disableListener() enaExpMaskConn.block(true); enaExpMaskaftConn.block(true); // Shadow highlight + shMethodConn.block(true); enableshadhighConn.block(true); showmaskSHMethodConn.block(true); showmaskSHMethodConninv.block(true); @@ -8256,7 +8369,16 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gammaskSH->setValue(pp->locallab.spots.at(index).gammaskSH); slomaskSH->setValue(pp->locallab.spots.at(index).slomaskSH); lapmaskSH->setValue(pp->locallab.spots.at(index).lapmaskSH); + detailSH->setValue(pp->locallab.spots.at(index).detailSH); LmaskSHshape->setCurve(pp->locallab.spots.at(index).LmaskSHcurve); + if (pp->locallab.spots.at(index).shMethod == "std") { + shMethod->set_active(0); + } else if (pp->locallab.spots.at(index).shMethod == "tone") { + shMethod->set_active(1); + } + for (int i = 0; i < 5; i++) { + multipliersh[i]->setValue(pp->locallab.spots.at(index).multsh[i]); + } // Vibrance expvibrance->setEnabled(pp->locallab.spots.at(index).expvibrance); @@ -8632,7 +8754,14 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gammaskSH->setEditedState(spotState->gammaskSH ? Edited : UnEdited); slomaskSH->setEditedState(spotState->slomaskSH ? Edited : UnEdited); lapmaskSH->setEditedState(spotState->lapmaskSH ? Edited : UnEdited); + detailSH->setEditedState(spotState->detailSH ? Edited : UnEdited); LmaskSHshape->setUnChanged(!spotState->LmaskSHcurve); + if (!spotState->shMethod) { + shMethod->set_active_text(M("GENERAL_UNCHANGED")); + } + for (int i = 0; i < 5; i++) { + multipliersh[i]->setEditedState(spotState->multsh[i] ? Edited : UnEdited); + } // Vibrance expvibrance->set_inconsistent(!spotState->expvibrance); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 5d4f0d329..87b8936e8 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -188,6 +188,7 @@ private: Adjuster* const fatanchor; Adjuster* const fatlevel; //Shadow highlight + Adjuster* multipliersh[5]; Adjuster* const highlights; Adjuster* const h_tonalwidth; Adjuster* const shadows; @@ -201,6 +202,7 @@ private: Adjuster* const gammaskSH; Adjuster* const slomaskSH; Adjuster* const lapmaskSH; + Adjuster* const detailSH; // Vibrance Adjuster* const saturated; Adjuster* const pastels; @@ -400,6 +402,8 @@ private: MyComboBoxText* const exnoiseMethod; sigc::connection exnoiseMethodConn; //Shadows Highlight + MyComboBoxText* const shMethod; + sigc::connection shMethodConn; MyComboBoxText* const showmaskSHMethod; sigc::connection showmaskSHMethodConn; MyComboBoxText* const showmaskSHMethodinv; @@ -541,6 +545,7 @@ private: void expMethodChanged(); void exnoiseMethodChanged(); //Shadows Highlight + void shMethodChanged(); void showmaskSHMethodChanged(); void showmaskSHMethodChangedinv(); // Blur & Noise diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index a17dd9db7..00a49cdaf 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1051,6 +1051,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).fatanchor = locallab.spots.at(j).fatanchor && pSpot.fatanchor == otherSpot.fatanchor; locallab.spots.at(j).fatlevel = locallab.spots.at(j).fatlevel && pSpot.fatlevel == otherSpot.fatlevel; // Shadow highlight + locallab.spots.at(j).shMethod = locallab.spots.at(j).shMethod && pSpot.shMethod == otherSpot.shMethod; locallab.spots.at(j).expshadhigh = locallab.spots.at(j).expshadhigh && pSpot.expshadhigh == otherSpot.expshadhigh; locallab.spots.at(j).highlights = locallab.spots.at(j).highlights && pSpot.highlights == otherSpot.highlights; locallab.spots.at(j).h_tonalwidth = locallab.spots.at(j).h_tonalwidth && pSpot.h_tonalwidth == otherSpot.h_tonalwidth; @@ -1070,7 +1071,11 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).gammaskSH = locallab.spots.at(j).gammaskSH && pSpot.gammaskSH == otherSpot.gammaskSH; locallab.spots.at(j).slomaskSH = locallab.spots.at(j).slomaskSH && pSpot.slomaskSH == otherSpot.slomaskSH; locallab.spots.at(j).lapmaskSH = locallab.spots.at(j).lapmaskSH && pSpot.lapmaskSH == otherSpot.lapmaskSH; + locallab.spots.at(j).detailSH = locallab.spots.at(j).detailSH && pSpot.detailSH == otherSpot.detailSH; locallab.spots.at(j).LmaskSHcurve = locallab.spots.at(j).LmaskSHcurve && pSpot.LmaskSHcurve == otherSpot.LmaskSHcurve; + for (int k = 0; k < 5; k++) { + locallab.spots.at(j).multsh[k] = locallab.spots.at(j).multsh[k] && pSpot.multsh[k] == otherSpot.multsh[k]; + } // Vibrance locallab.spots.at(j).expvibrance = locallab.spots.at(j).expvibrance && pSpot.expvibrance == otherSpot.expvibrance; locallab.spots.at(j).saturated = locallab.spots.at(j).saturated && pSpot.saturated == otherSpot.saturated; @@ -3098,6 +3103,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Shadow highlight + if (locallab.spots.at(i).shMethod) { + toEdit.locallab.spots.at(i).shMethod = mods.locallab.spots.at(i).shMethod; + } + if (locallab.spots.at(i).expshadhigh) { toEdit.locallab.spots.at(i).expshadhigh = mods.locallab.spots.at(i).expshadhigh; } @@ -3174,10 +3183,20 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).lapmaskSH = mods.locallab.spots.at(i).lapmaskSH; } + if (locallab.spots.at(i).detailSH) { + toEdit.locallab.spots.at(i).detailSH = mods.locallab.spots.at(i).detailSH; + } + if (locallab.spots.at(i).LmaskSHcurve) { toEdit.locallab.spots.at(i).LmaskSHcurve = mods.locallab.spots.at(i).LmaskSHcurve; } + for (int j = 0; j < 5; j++) { + if (locallab.spots.at(i).multsh[j]) { + toEdit.locallab.spots.at(i).multsh[j] = mods.locallab.spots.at(i).multsh[j]; + } + } + // Vibrance if (locallab.spots.at(i).expvibrance) { toEdit.locallab.spots.at(i).expvibrance = mods.locallab.spots.at(i).expvibrance; @@ -4898,6 +4917,8 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : fatanchor(v), fatlevel(v), // Shadow highlight + shMethod(v), + multsh{v, v, v, v, v, v}, expshadhigh(v), highlights(v), h_tonalwidth(v), @@ -4917,6 +4938,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gammaskSH(v), slomaskSH(v), lapmaskSH(v), + detailSH(v), LmaskSHcurve(v), // Vibrance expvibrance(v), @@ -5193,6 +5215,10 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) fatanchor = v; fatlevel = v; // Shadow highlight + shMethod = v; + for (int i = 0; i < 5; i++) { + multsh[i] = v; + } expshadhigh = v; highlights = v; h_tonalwidth = v; @@ -5212,6 +5238,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gammaskSH = v; slomaskSH = v; lapmaskSH = v; + detailSH = v; LmaskSHcurve = v; // Vibrance expvibrance = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 23954b6e3..5ac7aef4a 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -469,6 +469,8 @@ public: bool fatanchor; bool fatlevel; // Shadow highlight + bool shMethod; + bool multsh[6]; bool expshadhigh; bool highlights; bool h_tonalwidth; @@ -488,6 +490,7 @@ public: bool gammaskSH; bool slomaskSH; bool lapmaskSH; + bool detailSH; bool LmaskSHcurve; // Vibrance bool expvibrance;