From 7acdcaca6a1805febd1c05a71fff7a1f3653f4cb Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 17 Nov 2019 13:58:19 +0100 Subject: [PATCH] GUI mask vibrance - disabled --- rtdata/languages/default | 7 ++ rtengine/procevents.h | 7 ++ rtengine/procparams.cc | 28 ++++++++ rtengine/procparams.h | 7 ++ rtengine/refreshmap.cc | 10 ++- rtgui/locallab.cc | 149 ++++++++++++++++++++++++++++++++++++--- rtgui/locallab.h | 10 ++- rtgui/paramsedited.cc | 50 +++++++++++++ rtgui/paramsedited.h | 7 ++ 9 files changed, 260 insertions(+), 15 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 60405f63e..ea05c6e70 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1050,6 +1050,13 @@ HISTORY_MSG_809;Local - Vib mask curve C(C) HISTORY_MSG_810;Local - Vib mask curve L(L) HISTORY_MSG_811;Local - Vib mask curve LC(H) HISTORY_MSG_813;Local - Use Vib mask +HISTORY_MSG_814;Local - Vib mask Blend +HISTORY_MSG_815;Local - Vib mask radius +HISTORY_MSG_816;Local - Vib mask chroma +HISTORY_MSG_817;Local - Vib mask gamma +HISTORY_MSG_818;Local - Vib mask slope +HISTORY_MSG_819;Local - Vib mask laplacian +HISTORY_MSG_820;Local - Vib mask contrast curve HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 044d3c2b4..5759288fe 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -837,6 +837,13 @@ enum ProcEventCode { EvlocallabHHmaskvibshape = 810, EvlocallabshowmaskvibMethod = 811, EvLocallabEnavibMask = 812, + Evlocallabblendmaskvi = 813, + Evlocallabradmaskvib = 814, + Evlocallabchromaskvib = 815, + Evlocallabgammaskvib = 816, + Evlocallabslomaskvib = 817, + Evlocallablapmaskvib = 818, + EvlocallabLmaskvibshape = 819, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index aedfc34f7..c9c99857f 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2572,6 +2572,13 @@ LocallabParams::LocallabSpot::LocallabSpot() : LLmaskvibcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, HHmaskvibcurve{(double)FCT_MinMaxCPoints, 0.0, 1.0, 0.35, 0.35, 0.50, 1.0, 0.35, 0.35, 1.0, 1.0, 0.35, 0.35}, enavibMask(false), + blendmaskvib(0), + radmaskvib(0.0), + chromaskvib(0.0), + gammaskvib(1.0), + slomaskvib(0.0), + lapmaskvib(0.0), + Lmaskvibcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, // Soft Light expsoft(false), streng(0), @@ -2907,6 +2914,13 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && LLmaskvibcurve == other.LLmaskvibcurve && HHmaskvibcurve == other.HHmaskvibcurve && enavibMask == other.enavibMask + && blendmaskvib == other.blendmaskvib + && radmaskvib == other.radmaskvib + && chromaskvib == other.chromaskvib + && gammaskvib == other.gammaskvib + && slomaskvib == other.slomaskvib + && lapmaskvib == other.lapmaskvib + && Lmaskvibcurve == other.Lmaskvibcurve // Soft Light && expsoft == other.expsoft && streng == other.streng @@ -4221,6 +4235,13 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).LLmaskvibcurve, "Locallab", "LLmaskvibCurve_" + std::to_string(i), spot.LLmaskvibcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).HHmaskvibcurve, "Locallab", "HHmaskvibCurve_" + std::to_string(i), spot.HHmaskvibcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).enavibMask, "Locallab", "EnavibMask_" + std::to_string(i), spot.enavibMask, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).blendmaskvib, "Locallab", "Blendmaskvib_" + std::to_string(i), spot.blendmaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).radmaskvib, "Locallab", "Radmaskvib_" + std::to_string(i), spot.radmaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).chromaskvib, "Locallab", "Chromaskvib_" + std::to_string(i), spot.chromaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskvib, "Locallab", "Gammaskvib_" + std::to_string(i), spot.gammaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskvib, "Locallab", "Slomaskvib_" + std::to_string(i), spot.slomaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskvib, "Locallab", "Lapmaskvib_" + std::to_string(i), spot.lapmaskvib, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).Lmaskvibcurve, "Locallab", "LmaskvibCurve_" + std::to_string(i), spot.Lmaskvibcurve, keyFile); // Soft Light saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expsoft, "Locallab", "Expsoft_" + std::to_string(i), spot.expsoft, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).streng, "Locallab", "Streng_" + std::to_string(i), spot.streng, keyFile); @@ -5673,6 +5694,13 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "LLmaskvibCurve_" + std::to_string(i), pedited, spot.LLmaskvibcurve, spotEdited.LLmaskvibcurve); assignFromKeyfile(keyFile, "Locallab", "HHmaskvibCurve_" + std::to_string(i), pedited, spot.HHmaskvibcurve, spotEdited.HHmaskvibcurve); assignFromKeyfile(keyFile, "Locallab", "EnavibMask_" + std::to_string(i), pedited, spot.enavibMask, spotEdited.enavibMask); + assignFromKeyfile(keyFile, "Locallab", "Blendmaskvib_" + std::to_string(i), pedited, spot.blendmaskvib, spotEdited.blendmaskvib); + assignFromKeyfile(keyFile, "Locallab", "Radmaskvib_" + std::to_string(i), pedited, spot.radmaskvib, spotEdited.radmaskvib); + assignFromKeyfile(keyFile, "Locallab", "Chromaskvib_" + std::to_string(i), pedited, spot.chromaskvib, spotEdited.chromaskvib); + assignFromKeyfile(keyFile, "Locallab", "Gammaskvib_" + std::to_string(i), pedited, spot.gammaskvib, spotEdited.gammaskvib); + assignFromKeyfile(keyFile, "Locallab", "Slomaskvib_" + std::to_string(i), pedited, spot.slomaskvib, spotEdited.slomaskvib); + assignFromKeyfile(keyFile, "Locallab", "Lapmaskvib_" + std::to_string(i), pedited, spot.lapmaskvib, spotEdited.lapmaskvib); + assignFromKeyfile(keyFile, "Locallab", "LmaskvibCurve_" + std::to_string(i), pedited, spot.Lmaskvibcurve, spotEdited.Lmaskvibcurve); // Soft Light assignFromKeyfile(keyFile, "Locallab", "Expsoft_" + std::to_string(i), pedited, spot.expsoft, spotEdited.expsoft); assignFromKeyfile(keyFile, "Locallab", "Streng_" + std::to_string(i), pedited, spot.streng, spotEdited.streng); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index cb4aceec0..78b1aa5ec 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1115,6 +1115,13 @@ struct LocallabParams { std::vector LLmaskvibcurve; std::vector HHmaskvibcurve; bool enavibMask; + int blendmaskvib; + double radmaskvib; + double chromaskvib; + double gammaskvib; + double slomaskvib; + double lapmaskvib; + std::vector Lmaskvibcurve; // Soft Light bool expsoft; int streng; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index d81485011..de6feefe8 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -840,8 +840,14 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabLLmaskvibshape LUMINANCECURVE, //EvlocallabHHmaskvibshape LUMINANCECURVE, //EvlocallabshowmaskvibMethod - LUMINANCECURVE //EvLocallabEnavibMask - + LUMINANCECURVE, //EvLocallabEnavibMask + LUMINANCECURVE, //Evlocallabblendmaskvi + LUMINANCECURVE, //Evlocallabradmaskvib + LUMINANCECURVE, //Evlocallabchromaskvib + LUMINANCECURVE, //Evlocallabgammaskvib + LUMINANCECURVE, //Evlocallabslomaskvib + LUMINANCECURVE, //Evlocallablapmaskvib + LUMINANCECURVE //EvlocallabLmaskvibshape }; namespace rtengine diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 57e26f881..d9008874f 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -202,6 +202,8 @@ Locallab::Locallab(): curveEditorGG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES_LABEL"))), maskvibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), skinTonesCurve(static_cast(curveEditorGG->addCurve(CT_Diagonal, M("TP_VIBRANCE_CURVEEDITOR_SKINTONES")))), + mask2vibCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK2"))), + Lmaskvibshape(static_cast(mask2vibCurveEditorG->addCurve(CT_Diagonal, "L(L)"))), CCmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), LLmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), HHmaskvibshape(static_cast(maskvibCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), @@ -346,6 +348,12 @@ sloSH(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOSH"), 0.0, 100.0, 0.01, 12.92)) 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.))), sensiv(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 0, 100, 1, 15))), +blendmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLENDMASKCOL"), -100, 100, 1, 0))), +radmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADMASKCOL"), 0.0, 100.0, 0.1, 0.))), +chromaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMASKCOL"), -100.0, 100.0, 0.1, 0.))), +gammaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GAMMASKCOL"), 0.25, 4.0, 0.01, 1.))), +slomaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SLOMASKCOL"), 0.0, 15.0, 0.1, 0.))), +lapmaskvib(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPMASKCOL"), 0.0, 100.0, 0.1, 0.))), //Soft Light streng(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRENG"), 1, 100, 1, 1))), laplace(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LAPLACE"), 0., 100., 0.5, 25.))), @@ -1482,6 +1490,12 @@ pe(nullptr) pastsattogconn = pastSatTog->signal_toggled().connect(sigc::mem_fun(*this, &Locallab::pastsattog_toggled)); sensiv->setAdjusterListener(this); + blendmaskvib->setAdjusterListener(this); + radmaskvib->setAdjusterListener(this); + chromaskvib->setAdjusterListener(this); + gammaskvib->setAdjusterListener(this); + slomaskvib->setAdjusterListener(this); + lapmaskvib->setAdjusterListener(this); curveEditorGG->setCurveListener(this); @@ -1571,22 +1585,33 @@ pe(nullptr) maskvibCurveEditorG->curveListComplete(); + mask2vibCurveEditorG->setCurveListener(this); + Lmaskvibshape->setResetCurve(DiagonalCurveType(defSpot.Lmaskvibcurve.at(0)), defSpot.Lmaskvibcurve); + + if (showtooltip) { + Lmaskvibshape->setTooltip(M("TP_LOCALLAB_LMASK_LL_TOOLTIP")); + } + + const std::vector& mLmaskvibshape = zero_one_shape; + Lmaskvibshape->setBottomBarBgGradient(mLmaskvibshape); + Lmaskvibshape->setLeftBarBgGradient(mLmaskvibshape); + mask2vibCurveEditorG->curveListComplete(); + ToolParamBlock* const maskvibBox = Gtk::manage(new ToolParamBlock()); maskvibBox->pack_start(*showmaskvibMethod, Gtk::PACK_SHRINK, 4); maskvibBox->pack_start(*enavibMask, Gtk::PACK_SHRINK, 0); maskvibBox->pack_start(*maskvibCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor -/* maskSHBox->pack_start(*blendmaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*radmaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*lapmaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*chromaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*mask2SHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - maskSHBox->pack_start(*fatSHFrame); - */ + maskvibBox->pack_start(*blendmaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*radmaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*lapmaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*chromaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*gammaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*slomaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*mask2vibCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + expmaskvib->add(*maskvibBox, false); -// vibranceBox->pack_start(*expmaskvib); + // vibranceBox->pack_start(*expmaskvib); expvibrance->add(*vibranceBox, false); expvibrance->setLevel(2); @@ -3981,6 +4006,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).CCmaskvibcurve = CCmaskvibshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).HHmaskvibcurve = HHmaskvibshape->getCurve(); pp->locallab.spots.at(pp->locallab.selspot).enavibMask = enavibMask->get_active(); + pp->locallab.spots.at(pp->locallab.selspot).blendmaskvib = blendmaskvib->getIntValue(); + pp->locallab.spots.at(pp->locallab.selspot).radmaskvib = radmaskvib->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).chromaskvib = chromaskvib->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).gammaskvib = gammaskvib->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).slomaskvib = slomaskvib->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).lapmaskvib = lapmaskvib->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).Lmaskvibcurve = Lmaskvibshape->getCurve(); // Soft Light pp->locallab.spots.at(pp->locallab.selspot).expsoft = expsoft->getEnabled(); pp->locallab.spots.at(pp->locallab.selspot).streng = streng->getIntValue(); @@ -4358,6 +4390,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).LLmaskvibcurve = pe->locallab.spots.at(pp->locallab.selspot).LLmaskvibcurve || !LLmaskvibshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).HHmaskvibcurve = pe->locallab.spots.at(pp->locallab.selspot).HHmaskvibcurve || !HHmaskvibshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).enavibMask = pe->locallab.spots.at(pp->locallab.selspot).enavibMask || !enavibMask->get_inconsistent(); + pe->locallab.spots.at(pp->locallab.selspot).blendmaskvib = pe->locallab.spots.at(pp->locallab.selspot).blendmaskvib || blendmaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).radmaskvib = pe->locallab.spots.at(pp->locallab.selspot).radmaskvib || radmaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).chromaskvib = pe->locallab.spots.at(pp->locallab.selspot).chromaskvib || chromaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).gammaskvib = pe->locallab.spots.at(pp->locallab.selspot).gammaskvib || gammaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).slomaskvib = pe->locallab.spots.at(pp->locallab.selspot).slomaskvib || slomaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).lapmaskvib = pe->locallab.spots.at(pp->locallab.selspot).lapmaskvib || lapmaskvib->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).Lmaskvibcurve = pe->locallab.spots.at(pp->locallab.selspot).Lmaskvibcurve || !Lmaskvibshape->isUnChanged(); // Soft Light pe->locallab.spots.at(pp->locallab.selspot).expsoft = pe->locallab.spots.at(pp->locallab.selspot).expsoft || !expsoft->get_inconsistent(); pe->locallab.spots.at(pp->locallab.selspot).streng = pe->locallab.spots.at(pp->locallab.selspot).streng || streng->getEditedState(); @@ -4693,6 +4732,13 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).LLmaskvibcurve = pedited->locallab.spots.at(pp->locallab.selspot).LLmaskvibcurve || !LLmaskvibshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).HHmaskvibcurve = pedited->locallab.spots.at(pp->locallab.selspot).HHmaskvibcurve || !HHmaskvibshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).enavibMask = pedited->locallab.spots.at(pp->locallab.selspot).enavibMask || !enavibMask->get_inconsistent(); + pedited->locallab.spots.at(pp->locallab.selspot).blendmaskvib = pedited->locallab.spots.at(pp->locallab.selspot).blendmaskvib || blendmaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).radmaskvib = pedited->locallab.spots.at(pp->locallab.selspot).radmaskvib || radmaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).chromaskvib = pedited->locallab.spots.at(pp->locallab.selspot).chromaskvib || chromaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).gammaskvib = pedited->locallab.spots.at(pp->locallab.selspot).gammaskvib || gammaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).slomaskvib = pedited->locallab.spots.at(pp->locallab.selspot).slomaskvib || slomaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).lapmaskvib = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskvib || lapmaskvib->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).Lmaskvibcurve = pedited->locallab.spots.at(pp->locallab.selspot).Lmaskvibcurve || !Lmaskvibshape->isUnChanged(); // Soft Light pedited->locallab.spots.at(pp->locallab.selspot).expsoft = pedited->locallab.spots.at(pp->locallab.selspot).expsoft || !expsoft->get_inconsistent(); pedited->locallab.spots.at(pp->locallab.selspot).streng = pedited->locallab.spots.at(pp->locallab.selspot).streng || streng->getEditedState(); @@ -5151,7 +5197,13 @@ void Locallab::curveChanged(CurveEditor* ce) listener->panelChanged(EvlocallabHHmaskvibshape, M("HISTORY_CUSTOMCURVE")); } } - + + if (ce == Lmaskvibshape) { + if (listener) { + listener->panelChanged(EvlocallabLmaskvibshape, M("HISTORY_CUSTOMCURVE")); + } + } + } //Blur @@ -6915,6 +6967,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c pastels->setDefault((double)defSpot->pastels); psThreshold->setDefault(defSpot->psthreshold); sensiv->setDefault((double)defSpot->sensiv); + blendmaskvib->setDefault((double)defSpot->blendmaskvib); + radmaskvib->setDefault(defSpot->radmaskvib); + chromaskvib->setDefault(defSpot->chromaskvib); + gammaskvib->setDefault(defSpot->gammaskvib); + slomaskvib->setDefault(defSpot->slomaskvib); + lapmaskvib->setDefault(defSpot->lapmaskvib); // Soft Light streng->setDefault((double)defSpot->streng); sensisf->setDefault((double)defSpot->sensisf); @@ -7111,6 +7169,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c pastels->setDefaultEditedState(Irrelevant); psThreshold->setDefaultEditedState(Irrelevant); sensiv->setDefaultEditedState(Irrelevant); + blendmaskvib->setDefaultEditedState(Irrelevant); + radmaskvib->setDefaultEditedState(Irrelevant); + chromaskvib->setDefaultEditedState(Irrelevant); + gammaskvib->setDefaultEditedState(Irrelevant); + slomaskvib->setDefaultEditedState(Irrelevant); + lapmaskvib->setDefaultEditedState(Irrelevant); // Soft Light streng->setDefaultEditedState(Irrelevant); sensisf->setDefaultEditedState(Irrelevant); @@ -7311,6 +7375,12 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c pastels->setDefaultEditedState(defSpotState->pastels ? Edited : UnEdited); psThreshold->setDefaultEditedState(defSpotState->psthreshold ? Edited : UnEdited); sensiv->setDefaultEditedState(defSpotState->sensiv ? Edited : UnEdited); + blendmaskvib->setDefaultEditedState(defSpotState->blendmaskvib ? Edited : UnEdited); + radmaskvib->setDefaultEditedState(defSpotState->radmaskvib ? Edited : UnEdited); + chromaskvib->setDefaultEditedState(defSpotState->chromaskvib ? Edited : UnEdited); + gammaskvib->setDefaultEditedState(defSpotState->gammaskvib ? Edited : UnEdited); + slomaskvib->setDefaultEditedState(defSpotState->slomaskvib ? Edited : UnEdited); + lapmaskvib->setDefaultEditedState(defSpotState->lapmaskvib ? Edited : UnEdited); // Soft Light streng->setDefaultEditedState(defSpotState->streng ? Edited : UnEdited); sensisf->setDefaultEditedState(defSpotState->sensisf ? Edited : UnEdited); @@ -7925,6 +7995,43 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabsensiv, sensiv->getTextValue()); } } + + if (a == blendmaskvib) { + if (listener) { + listener->panelChanged(Evlocallabblendmaskvi, blendmaskvib->getTextValue()); + } + } + + if (a == radmaskvib) { + if (listener) { + listener->panelChanged(Evlocallabradmaskvib, radmaskvib->getTextValue()); + } + } + + if (a == chromaskvib) { + if (listener) { + listener->panelChanged(Evlocallabchromaskvib, chromaskvib->getTextValue()); + } + } + + if (a == gammaskvib) { + if (listener) { + listener->panelChanged(Evlocallabgammaskvib, gammaskvib->getTextValue()); + } + } + + if (a == slomaskvib) { + if (listener) { + listener->panelChanged(Evlocallabslomaskvib, slomaskvib->getTextValue()); + } + } + + if (a == lapmaskvib) { + if (listener) { + listener->panelChanged(Evlocallablapmaskvib, lapmaskvib->getTextValue()); + } + } + } // Soft Light @@ -8696,6 +8803,12 @@ void Locallab::setBatchMode(bool batchMode) pastels->showEditedCB(); psThreshold->showEditedCB(); sensiv->showEditedCB(); + blendmaskvib->showEditedCB(); + radmaskvib->showEditedCB(); + chromaskvib->showEditedCB(); + gammaskvib->showEditedCB(); + slomaskvib->showEditedCB(); + lapmaskvib->showEditedCB(); // Soft Light streng->showEditedCB(); sensisf->showEditedCB(); @@ -9400,6 +9513,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con LLmaskvibshape->setCurve(pp->locallab.spots.at(index).LLmaskvibcurve); HHmaskvibshape->setCurve(pp->locallab.spots.at(index).HHmaskvibcurve); enavibMask->set_active(pp->locallab.spots.at(index).enavibMask); + blendmaskvib->setValue(pp->locallab.spots.at(index).blendmaskvib); + radmaskvib->setValue(pp->locallab.spots.at(index).radmaskvib); + chromaskvib->setValue(pp->locallab.spots.at(index).chromaskvib); + gammaskvib->setValue(pp->locallab.spots.at(index).gammaskvib); + slomaskvib->setValue(pp->locallab.spots.at(index).slomaskvib); + lapmaskvib->setValue(pp->locallab.spots.at(index).lapmaskvib); + Lmaskvibshape->setCurve(pp->locallab.spots.at(index).Lmaskvibcurve); // Soft Light expsoft->setEnabled(pp->locallab.spots.at(index).expsoft); @@ -9820,6 +9940,13 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con LLmaskvibshape->setUnChanged(!spotState->LLmaskvibcurve); HHmaskvibshape->setUnChanged(!spotState->HHmaskvibcurve); enavibMask->set_inconsistent(multiImage && !spotState->enavibMask); + blendmaskvib->setEditedState(spotState->blendmaskvib ? Edited : UnEdited); + radmaskvib->setEditedState(spotState->radmaskvib ? Edited : UnEdited); + chromaskvib->setEditedState(spotState->chromaskvib ? Edited : UnEdited); + gammaskvib->setEditedState(spotState->gammaskvib ? Edited : UnEdited); + slomaskvib->setEditedState(spotState->slomaskvib ? Edited : UnEdited); + lapmaskvib->setEditedState(spotState->lapmaskvib ? Edited : UnEdited); + Lmaskvibshape->setUnChanged(!spotState->Lmaskvibcurve); // Soft Light expsoft->set_inconsistent(!spotState->expsoft); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 13f6cbd56..63768476d 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -114,8 +114,8 @@ private: CurveEditorGroup* const curveEditorGG; CurveEditorGroup* const maskvibCurveEditorG; DiagonalCurveEditor* const skinTonesCurve; -// CurveEditorGroup* const mask2vibCurveEditorG; -// DiagonalCurveEditor* const Lmaskvibshape; + CurveEditorGroup* const mask2vibCurveEditorG; + DiagonalCurveEditor* const Lmaskvibshape; FlatCurveEditor* const CCmaskvibshape; FlatCurveEditor* const LLmaskvibshape; FlatCurveEditor* const HHmaskvibshape; @@ -230,6 +230,12 @@ private: Adjuster* const saturated; Adjuster* const pastels; Adjuster* const sensiv; + Adjuster* const blendmaskvib; + Adjuster* const radmaskvib; + Adjuster* const chromaskvib; + Adjuster* const gammaskvib; + Adjuster* const slomaskvib; + Adjuster* const lapmaskvib; // Soft Light Adjuster* const streng; Adjuster* const laplace; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index b0e5bc3c2..a65e22005 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1109,6 +1109,13 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).LLmaskvibcurve = locallab.spots.at(j).LLmaskvibcurve && pSpot.LLmaskvibcurve == otherSpot.LLmaskvibcurve; locallab.spots.at(j).HHmaskvibcurve = locallab.spots.at(j).HHmaskvibcurve && pSpot.HHmaskvibcurve == otherSpot.HHmaskvibcurve; locallab.spots.at(j).enavibMask = locallab.spots.at(j).enavibMask && pSpot.enavibMask == otherSpot.enavibMask; + locallab.spots.at(j).blendmaskvib = locallab.spots.at(j).blendmaskvib && pSpot.blendmaskvib == otherSpot.blendmaskvib; + locallab.spots.at(j).radmaskvib = locallab.spots.at(j).radmaskvib && pSpot.radmaskvib == otherSpot.radmaskvib; + locallab.spots.at(j).chromaskvib = locallab.spots.at(j).chromaskvib && pSpot.chromaskvib == otherSpot.chromaskvib; + locallab.spots.at(j).gammaskvib = locallab.spots.at(j).gammaskvib && pSpot.gammaskvib == otherSpot.gammaskvib; + locallab.spots.at(j).slomaskvib = locallab.spots.at(j).slomaskvib && pSpot.slomaskvib == otherSpot.slomaskvib; + locallab.spots.at(j).lapmaskvib = locallab.spots.at(j).lapmaskvib && pSpot.lapmaskvib == otherSpot.lapmaskvib; + locallab.spots.at(j).Lmaskvibcurve = locallab.spots.at(j).Lmaskvibcurve && pSpot.Lmaskvibcurve == otherSpot.Lmaskvibcurve; // Soft Light locallab.spots.at(j).expsoft = locallab.spots.at(j).expsoft && pSpot.expsoft == otherSpot.expsoft; locallab.spots.at(j).streng = locallab.spots.at(j).streng && pSpot.streng == otherSpot.streng; @@ -3352,6 +3359,35 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).enavibMask = mods.locallab.spots.at(i).enavibMask; } + if (locallab.spots.at(i).blendmaskvib) { + toEdit.locallab.spots.at(i).blendmaskvib = mods.locallab.spots.at(i).blendmaskvib; + } + + if (locallab.spots.at(i).radmaskvib) { + toEdit.locallab.spots.at(i).radmaskvib = mods.locallab.spots.at(i).radmaskvib; + } + + if (locallab.spots.at(i).chromaskvib) { + toEdit.locallab.spots.at(i).chromaskvib = mods.locallab.spots.at(i).chromaskvib; + } + + if (locallab.spots.at(i).gammaskvib) { + toEdit.locallab.spots.at(i).gammaskvib = mods.locallab.spots.at(i).gammaskvib; + } + + if (locallab.spots.at(i).slomaskvib) { + toEdit.locallab.spots.at(i).slomaskvib = mods.locallab.spots.at(i).slomaskvib; + } + + if (locallab.spots.at(i).lapmaskvib) { + toEdit.locallab.spots.at(i).lapmaskvib = mods.locallab.spots.at(i).lapmaskvib; + } + + if (locallab.spots.at(i).Lmaskvibcurve) { + toEdit.locallab.spots.at(i).Lmaskvibcurve = mods.locallab.spots.at(i).Lmaskvibcurve; + } + + // Soft Light if (locallab.spots.at(i).expsoft) { toEdit.locallab.spots.at(i).expsoft = mods.locallab.spots.at(i).expsoft; @@ -5099,6 +5135,13 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : LLmaskvibcurve(v), HHmaskvibcurve(v), enavibMask(v), + blendmaskvib(v), + radmaskvib(v), + chromaskvib(v), + gammaskvib(v), + slomaskvib(v), + lapmaskvib(v), + Lmaskvibcurve(v), // Soft Light expsoft(v), streng(v), @@ -5424,6 +5467,13 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) LLmaskvibcurve = v; HHmaskvibcurve = v; enavibMask = v; + blendmaskvib = v; + radmaskvib = v; + chromaskvib = v; + gammaskvib = v; + slomaskvib = v; + lapmaskvib = v; + Lmaskvibcurve = v; // Soft Light expsoft = v; streng = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 96f121101..ae4bb173a 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -537,6 +537,13 @@ public: bool LLmaskvibcurve; bool HHmaskvibcurve; bool enavibMask; + bool blendmaskvib; + bool radmaskvib; + bool chromaskvib; + bool gammaskvib; + bool slomaskvib; + bool lapmaskvib; + bool Lmaskvibcurve; // Soft Light bool expsoft; bool streng;