diff --git a/rtdata/languages/default b/rtdata/languages/default index 9f32fd4de..9a7a22801 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1060,6 +1060,8 @@ HISTORY_MSG_820;Local - Vib mask contrast curve HISTORY_MSG_821;Local - color grid background HISTORY_MSG_822;Local - color background merge HISTORY_MSG_823;Local - color background luminance +HISTORY_MSG_824;Local - Exp gradient strength +HISTORY_MSG_825;Local - Exp gradient angle HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2324,6 +2326,8 @@ TP_LOCALLAB_FATAMOUNT;Amount TP_LOCALLAB_FATDETAIL;Detail TP_LOCALLAB_FATANCHOR;Anchor TP_LOCALLAB_FATLEVEL;Detail levels +TP_LOCALLAB_GRADANG;Gradient angle +TP_LOCALLAB_GRADSTR;Gradient strength TP_LOCALLAB_GAMFRA;Tone response curve (TRC) TP_LOCALLAB_GAMSH;Gamma TP_LOCALLAB_SLOSH;Slope diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index f2b60b2f5..cf1048fe3 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -210,6 +210,8 @@ struct local_params { float chromaexp; float gammaexp; float slomaexp; + float strmaexp; + float angmaexp; float softradiusexp; float softradiuscol; float softradiuscb; @@ -730,6 +732,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float chromaskexpo = ((float) locallab.spots.at(sp).chromaskexp); float gammaskexpo = ((float) locallab.spots.at(sp).gammaskexp); float slomaskexpo = ((float) locallab.spots.at(sp).slomaskexp); + float strmaskexpo = ((float) locallab.spots.at(sp).strmaskexp); + float angmaskexpo = ((float) locallab.spots.at(sp).angmaskexp); float softradiusexpo = ((float) locallab.spots.at(sp).softradiusexp); float softradiuscolor = ((float) locallab.spots.at(sp).softradiuscol); float softradiusreti = ((float) locallab.spots.at(sp).softradiusret); @@ -833,6 +837,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.chromaexp = chromaskexpo; lp.gammaexp = gammaskexpo; lp.slomaexp = slomaskexpo; + lp.strmaexp = strmaskexpo; + lp.angmaexp = angmaskexpo; lp.softradiusexp = softradiusexpo; lp.softradiuscol = softradiuscolor; lp.softradiusret = softradiusreti; @@ -2550,6 +2556,155 @@ static void mean_fab(int xstart, int ystart, int bfw, int bfh, LabImage* bufexpo } } +float pow3 (float x) +{ + return x * x * x; +} + + +struct grad_params { + bool angle_is_zero, transpose, bright_top; + float ta, yc, xc; + float ys, ys_inv; + float scale, botmul, topmul; + float top_edge_0; + int h; +}; + +void calcGradientParams (int oW, int oH, const struct local_params& lp, struct grad_params& gp, float ystart, float xstart, int bfw, int bfh) + +{ + int w = oW; + int h = oH; + double gradient_stops = lp.strmaexp; + double gradient_span = 1.f; //gradient.feather / 100.0 not used because we have transition and others gradients + double gradient_center_x = (lp.xc - xstart) / bfw; + double gradient_center_y = (lp.yc - ystart) / bfh; + double gradient_angle = lp.angmaexp / 180.0 * rtengine::RT_PI; + + // printf("xstart=%f ysta=%f lpxc=%f lpyc=%f aa=%f bb=%f cc=%f dd=%f ee=%f ff=%d gg=%d\n", xstart, ystart, lp.xc, lp.yc, gradient_stops, gradient_span, gradient_center_x, gradient_center_y, gradient_angle, w, h); + + // make 0.0 <= gradient_angle < 2 * rtengine::RT_PI + gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI); + + if (gradient_angle < 0.0) { + gradient_angle += 2.0 * rtengine::RT_PI; + } + + gp.bright_top = false; + gp.transpose = false; + gp.angle_is_zero = false; + gp.h = h; + double cosgrad = cos (gradient_angle); + + if (fabs (cosgrad) < 0.707) { + // we transpose to avoid division by zero at 90 degrees + // (actually we could transpose only for 90 degrees, but this way we avoid + // division with extremely small numbers + gp.transpose = true; + gradient_angle += 0.5 * rtengine::RT_PI; + double gxc = gradient_center_x; + gradient_center_x = 1.0 - gradient_center_y; + gradient_center_y = gxc; + } + + gradient_angle = fmod (gradient_angle, 2 * rtengine::RT_PI); + + if (gradient_angle > 0.5 * rtengine::RT_PI && gradient_angle < rtengine::RT_PI) { + gradient_angle += rtengine::RT_PI; + gp.bright_top = true; + } else if (gradient_angle >= rtengine::RT_PI && gradient_angle < 1.5 * rtengine::RT_PI) { + gradient_angle -= rtengine::RT_PI; + gp.bright_top = true; + } + + if (fabs (gradient_angle) < 0.001 || fabs (gradient_angle - 2 * rtengine::RT_PI) < 0.001) { + gradient_angle = 0; + gp.angle_is_zero = true; + } + + if (gp.transpose) { + gp.bright_top = !gp.bright_top; + std::swap(w, h); + } + + gp.scale = 1.0 / pow (2, gradient_stops); + + if (gp.bright_top) { + gp.topmul = 1.0; + gp.botmul = gp.scale; + } else { + gp.topmul = gp.scale; + gp.botmul = 1.0; + } + + gp.ta = tan (gradient_angle); + gp.xc = w * gradient_center_x; + gp.yc = h * gradient_center_y; + gp.ys = sqrt ((float)h * h + (float)w * w) * (gradient_span / cos (gradient_angle)); + gp.ys_inv = 1.0 / gp.ys; + gp.top_edge_0 = gp.yc - gp.ys / 2.0; + + if (gp.ys < 1.0 / h) { + gp.ys_inv = 0; + gp.ys = 0; + } +} + +static float calcGradientFactor (const struct grad_params& gp, int x, int y) +{ + if (gp.angle_is_zero) { + int gy = gp.transpose ? x : y; + + if (gy < gp.top_edge_0) { + return gp.topmul; + } else if (gy >= gp.top_edge_0 + gp.ys) { + return gp.botmul; + } else { + float val = ((float) (gy - gp.top_edge_0) * gp.ys_inv); + + if (gp.bright_top) { + val = 1.f - val; + } + + val *= rtengine::RT_PI_F_2; + + if (gp.scale < 1.f) { + val = pow3 (xsinf (val)); + } else { + val = 1.f - pow3 (xcosf (val)); + } + + return gp.scale + val * (1.0 - gp.scale); + } + } else { + int gy = gp.transpose ? x : y; + int gx = gp.transpose ? gp.h - y - 1 : x; + float top_edge = gp.top_edge_0 - gp.ta * (gx - gp.xc); + + if (gy < top_edge) { + return gp.topmul; + } else if (gy >= top_edge + gp.ys) { + return gp.botmul; + } else { + float val = ((float) (gy - top_edge) * gp.ys_inv); + + val = gp.bright_top ? 1.f - val : val; + + val *= rtengine::RT_PI_F_2; + + if (gp.scale < 1.f) { + val = pow3 (xsinf (val)); + } else { + val = 1.f - pow3 (xcosf (val)); + } + + return gp.scale + val * (1.0 - gp.scale); + } + } +} + + void ImProcFunctions::blendstruc(int bfw, int bfh, LabImage* bufcolorig, float radius, float stru, array2D & blend2, int sk, bool multiThread) { @@ -3599,6 +3754,19 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int rdEBuffer.reset(); } + + struct grad_params gp; + + if (lp.angmaexp != 0.f) { + calcGradientParams (bfw, bfh, lp, gp, ystart, xstart, bfw, bfh); + for (int ir = 0; ir < bfh; ir++) + for (int jr = 0; jr < bfw; jr++) { + double factor = 1.0; + factor = calcGradientFactor (gp, jr, ir); + bufmaskblurcol->L[ir][jr] *= factor; + } + } + if (lap > 0.f) { float *datain = new float[bfh * bfw]; diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 6121d12cf..12418800a 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -847,6 +847,8 @@ enum ProcEventCode { EvLocallabLabGridmergValue = 820, Evlocallabmercol = 821, Evlocallabmerlucol = 822, + Evlocallabstrmaskexp = 823, + Evlocallabangmaskexp = 824, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index ca4e4e12d..14b3c7427 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2524,6 +2524,8 @@ LocallabParams::LocallabSpot::LocallabSpot() : gammaskexp(1.0), slomaskexp(0.0), lapmaskexp(0.0), + strmaskexp(0.0), + angmaskexp(0.0), softradiusexp(0.0), Lmaskexpcurve{(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}, expMethod("std"), @@ -2863,6 +2865,8 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gammaskexp == other.gammaskexp && slomaskexp == other.slomaskexp && lapmaskexp == other.lapmaskexp + && strmaskexp == other.strmaskexp + && angmaskexp == other.angmaskexp && softradiusexp == other.softradiusexp && Lmaskexpcurve == other.Lmaskexpcurve && expMethod == other.expMethod @@ -4197,6 +4201,8 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).gammaskexp, "Locallab", "Gammaskexp_" + std::to_string(i), spot.gammaskexp, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).slomaskexp, "Locallab", "Slomaskexp_" + std::to_string(i), spot.slomaskexp, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).lapmaskexp, "Locallab", "Lapmaskexp_" + std::to_string(i), spot.lapmaskexp, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).strmaskexp, "Locallab", "Strmaskexp_" + std::to_string(i), spot.strmaskexp, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).angmaskexp, "Locallab", "Angmaskexp_" + std::to_string(i), spot.angmaskexp, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).softradiusexp, "Locallab", "Softradiusexp_" + std::to_string(i), spot.softradiusexp, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).Lmaskexpcurve, "Locallab", "LmaskexpCurve_" + std::to_string(i), spot.Lmaskexpcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expMethod, "Locallab", "ExpMethod_" + std::to_string(i), spot.expMethod, keyFile); @@ -5650,6 +5656,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Gammaskexp_" + std::to_string(i), pedited, spot.gammaskexp, spotEdited.gammaskexp); assignFromKeyfile(keyFile, "Locallab", "Slomaskexp_" + std::to_string(i), pedited, spot.slomaskexp, spotEdited.slomaskexp); assignFromKeyfile(keyFile, "Locallab", "Lapmaskexp_" + std::to_string(i), pedited, spot.lapmaskexp, spotEdited.lapmaskexp); + assignFromKeyfile(keyFile, "Locallab", "Strmaskexp_" + std::to_string(i), pedited, spot.strmaskexp, spotEdited.strmaskexp); + assignFromKeyfile(keyFile, "Locallab", "Angmaskexp_" + std::to_string(i), pedited, spot.angmaskexp, spotEdited.angmaskexp); assignFromKeyfile(keyFile, "Locallab", "Softradiusexp_" + std::to_string(i), pedited, spot.softradiusexp, spotEdited.softradiusexp); assignFromKeyfile(keyFile, "Locallab", "LmaskexpCurve_" + std::to_string(i), pedited, spot.Lmaskexpcurve, spotEdited.Lmaskexpcurve); assignFromKeyfile(keyFile, "Locallab", "ExpMethod_" + std::to_string(i), pedited, spot.expMethod, spotEdited.expMethod); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 5d11fba4a..9ca3dd5b1 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -1067,6 +1067,8 @@ struct LocallabParams { double gammaskexp; double slomaskexp; double lapmaskexp; + double strmaskexp; + double angmaskexp; double softradiusexp; std::vector Lmaskexpcurve; Glib::ustring expMethod; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 23c231e34..677063d13 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -850,7 +850,9 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabLmaskvibshape LUMINANCECURVE, //EvLocallabLabGridmergValue LUMINANCECURVE, //EvLocallabmercol - LUMINANCECURVE //EvLocallabmerlucol + LUMINANCECURVE, //EvLocallabmerlucol + LUMINANCECURVE, //Evlocallabstrmaskexp + LUMINANCECURVE //Evlocallabangmaskexp }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index ea087b10e..077799184 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -305,6 +305,8 @@ Locallab::Locallab(): fatamount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATAMOUNT"), 1., 100., 1., 1.))), fatdetail(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATDETAIL"), -100., 300., 1., 0.))), fatanchor(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATANCHOR"), 1., 100., 1., 50., Gtk::manage(new RTImage("circle-black-small.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), + strmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADSTR"), -2., 2., 0.05, 0.))), + angmaskexp(Gtk::manage(new Adjuster(M("TP_LOCALLAB_GRADANG"), -180., 180., 0.1, 0.))), fatlevel(Gtk::manage(new Adjuster(M("TP_LOCALLAB_FATLEVEL"), 0, 3, 1, 2))), multipliersh( [this]() -> std::array @@ -1125,6 +1127,8 @@ pe(nullptr) gammaskexp->setAdjusterListener(this); slomaskexp->setAdjusterListener(this); lapmaskexp->setAdjusterListener(this); + strmaskexp->setAdjusterListener(this); + angmaskexp->setAdjusterListener(this); softradiusexp->setAdjusterListener(this); laplacexp->setAdjusterListener(this); balanexp->setAdjusterListener(this); @@ -1288,6 +1292,8 @@ pe(nullptr) maskexpBox->pack_start(*chromaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0); + maskexpBox->pack_start(*strmaskexp, Gtk::PACK_SHRINK, 0); + maskexpBox->pack_start(*angmaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*mask2expCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor expmaskexp->add(*maskexpBox, false); exposeBox->pack_start(*expmaskexp); @@ -3953,6 +3959,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).gammaskexp = gammaskexp->getValue(); pp->locallab.spots.at(pp->locallab.selspot).slomaskexp = slomaskexp->getValue(); pp->locallab.spots.at(pp->locallab.selspot).lapmaskexp = lapmaskexp->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).strmaskexp = strmaskexp->getValue(); + pp->locallab.spots.at(pp->locallab.selspot).angmaskexp = angmaskexp->getValue(); pp->locallab.spots.at(pp->locallab.selspot).softradiusexp = softradiusexp->getValue(); pp->locallab.spots.at(pp->locallab.selspot).Lmaskexpcurve = Lmaskexpshape->getCurve(); @@ -4367,6 +4375,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pe->locallab.spots.at(pp->locallab.selspot).gammaskexp = pe->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).slomaskexp = pe->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).lapmaskexp = pe->locallab.spots.at(pp->locallab.selspot).lapmaskexp || lapmaskexp->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).strmaskexp = pe->locallab.spots.at(pp->locallab.selspot).strmaskexp || strmaskexp->getEditedState(); + pe->locallab.spots.at(pp->locallab.selspot).angmaskexp = pe->locallab.spots.at(pp->locallab.selspot).angmaskexp || angmaskexp->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).softradiusexp = pe->locallab.spots.at(pp->locallab.selspot).softradiusexp || softradiusexp->getEditedState(); pe->locallab.spots.at(pp->locallab.selspot).Lmaskexpcurve = pe->locallab.spots.at(pp->locallab.selspot).Lmaskexpcurve || !Lmaskexpshape->isUnChanged(); pe->locallab.spots.at(pp->locallab.selspot).expMethod = pe->locallab.spots.at(pp->locallab.selspot).expMethod || expMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -4711,6 +4721,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp = pedited->locallab.spots.at(pp->locallab.selspot).gammaskexp || gammaskexp->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp = pedited->locallab.spots.at(pp->locallab.selspot).slomaskexp || slomaskexp->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).lapmaskexp = pedited->locallab.spots.at(pp->locallab.selspot).lapmaskexp || lapmaskexp->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).strmaskexp = pedited->locallab.spots.at(pp->locallab.selspot).strmaskexp || strmaskexp->getEditedState(); + pedited->locallab.spots.at(pp->locallab.selspot).angmaskexp = pedited->locallab.spots.at(pp->locallab.selspot).angmaskexp || angmaskexp->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).softradiusexp = pedited->locallab.spots.at(pp->locallab.selspot).softradiusexp || softradiusexp->getEditedState(); pedited->locallab.spots.at(pp->locallab.selspot).Lmaskexpcurve = pedited->locallab.spots.at(pp->locallab.selspot).Lmaskexpcurve || !Lmaskexpshape->isUnChanged(); pedited->locallab.spots.at(pp->locallab.selspot).expMethod = pedited->locallab.spots.at(pp->locallab.selspot).expMethod || expMethod->get_active_text() != M("GENERAL_UNCHANGED"); @@ -7016,6 +7028,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c gammaskexp->setDefault(defSpot->gammaskexp); slomaskexp->setDefault(defSpot->slomaskexp); lapmaskexp->setDefault(defSpot->lapmaskexp); + strmaskexp->setDefault(defSpot->strmaskexp); + angmaskexp->setDefault(defSpot->angmaskexp); softradiusexp->setDefault(defSpot->softradiusexp); laplacexp->setDefault(defSpot->laplacexp); balanexp->setDefault(defSpot->balanexp); @@ -7221,6 +7235,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c gammaskexp->setDefaultEditedState(Irrelevant); slomaskexp->setDefaultEditedState(Irrelevant); lapmaskexp->setDefaultEditedState(Irrelevant); + strmaskexp->setDefaultEditedState(Irrelevant); + angmaskexp->setDefaultEditedState(Irrelevant); softradiusexp->setDefaultEditedState(Irrelevant); laplacexp->setDefaultEditedState(Irrelevant); balanexp->setDefaultEditedState(Irrelevant); @@ -7430,6 +7446,8 @@ void Locallab::setDefaults(const rtengine::procparams::ProcParams * defParams, c gammaskexp->setDefaultEditedState(defSpotState->gammaskexp ? Edited : UnEdited); slomaskexp->setDefaultEditedState(defSpotState->slomaskexp ? Edited : UnEdited); lapmaskexp->setDefaultEditedState(defSpotState->lapmaskexp ? Edited : UnEdited); + strmaskexp->setDefaultEditedState(defSpotState->strmaskexp ? Edited : UnEdited); + angmaskexp->setDefaultEditedState(defSpotState->angmaskexp ? Edited : UnEdited); softradiusexp->setDefaultEditedState(defSpotState->softradiusexp ? Edited : UnEdited); laplacexp->setDefaultEditedState(defSpotState->laplacexp ? Edited : UnEdited); balanexp->setDefaultEditedState(defSpotState->balanexp ? Edited : UnEdited); @@ -7896,6 +7914,18 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } } + if (a == strmaskexp) { + if (listener) { + listener->panelChanged(Evlocallabstrmaskexp, strmaskexp->getTextValue()); + } + } + + if (a == angmaskexp) { + if (listener) { + listener->panelChanged(Evlocallabangmaskexp, angmaskexp->getTextValue()); + } + } + if (a == softradiusexp) { if (listener) { listener->panelChanged(Evlocallabsoftradiusexp, softradiusexp->getTextValue()); @@ -8872,6 +8902,8 @@ void Locallab::setBatchMode(bool batchMode) gammaskexp->showEditedCB(); slomaskexp->showEditedCB(); lapmaskexp->showEditedCB(); + strmaskexp->showEditedCB(); + angmaskexp->showEditedCB(); softradiusexp->showEditedCB(); laplacexp->showEditedCB(); balanexp->showEditedCB(); @@ -9541,6 +9573,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gammaskexp->setValue(pp->locallab.spots.at(index).gammaskexp); slomaskexp->setValue(pp->locallab.spots.at(index).slomaskexp); lapmaskexp->setValue(pp->locallab.spots.at(index).lapmaskexp); + strmaskexp->setValue(pp->locallab.spots.at(index).strmaskexp); + angmaskexp->setValue(pp->locallab.spots.at(index).angmaskexp); softradiusexp->setValue(pp->locallab.spots.at(index).softradiusexp); Lmaskexpshape->setCurve(pp->locallab.spots.at(index).Lmaskexpcurve); @@ -9988,6 +10022,8 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con gammaskexp->setEditedState(spotState->gammaskexp ? Edited : UnEdited); slomaskexp->setEditedState(spotState->slomaskexp ? Edited : UnEdited); lapmaskexp->setEditedState(spotState->lapmaskexp ? Edited : UnEdited); + strmaskexp->setEditedState(spotState->strmaskexp ? Edited : UnEdited); + angmaskexp->setEditedState(spotState->angmaskexp ? Edited : UnEdited); softradiusexp->setEditedState(spotState->softradiusexp ? Edited : UnEdited); Lmaskexpshape->setUnChanged(!spotState->Lmaskexpcurve); diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 8543fe7f6..bb70ce8ba 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -208,6 +208,8 @@ private: Adjuster* const fatamount; Adjuster* const fatdetail; Adjuster* const fatanchor; + Adjuster* const strmaskexp; + Adjuster* const angmaskexp; Adjuster* const fatlevel; //Shadow highlight const std::array multipliersh; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index e0ffdfaae..4dd3fcabf 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1059,6 +1059,8 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).gammaskexp = locallab.spots.at(j).gammaskexp && pSpot.gammaskexp == otherSpot.gammaskexp; locallab.spots.at(j).slomaskexp = locallab.spots.at(j).slomaskexp && pSpot.slomaskexp == otherSpot.slomaskexp; locallab.spots.at(j).lapmaskexp = locallab.spots.at(j).lapmaskexp && pSpot.lapmaskexp == otherSpot.lapmaskexp; + locallab.spots.at(j).strmaskexp = locallab.spots.at(j).strmaskexp && pSpot.strmaskexp == otherSpot.strmaskexp; + locallab.spots.at(j).angmaskexp = locallab.spots.at(j).angmaskexp && pSpot.angmaskexp == otherSpot.angmaskexp; locallab.spots.at(j).softradiusexp = locallab.spots.at(j).softradiusexp && pSpot.softradiusexp == otherSpot.softradiusexp; locallab.spots.at(j).Lmaskexpcurve = locallab.spots.at(j).Lmaskexpcurve && pSpot.Lmaskexpcurve == otherSpot.Lmaskexpcurve; locallab.spots.at(j).expMethod = locallab.spots.at(j).expMethod && pSpot.expMethod == otherSpot.expMethod; @@ -3176,6 +3178,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).lapmaskexp = mods.locallab.spots.at(i).lapmaskexp; } + if (locallab.spots.at(i).strmaskexp) { + toEdit.locallab.spots.at(i).strmaskexp = mods.locallab.spots.at(i).strmaskexp; + } + + if (locallab.spots.at(i).angmaskexp) { + toEdit.locallab.spots.at(i).angmaskexp = mods.locallab.spots.at(i).angmaskexp; + } + if (locallab.spots.at(i).softradiusexp) { toEdit.locallab.spots.at(i).softradiusexp = mods.locallab.spots.at(i).softradiusexp; } @@ -5117,6 +5127,8 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gammaskexp(v), slomaskexp(v), lapmaskexp(v), + strmaskexp(v), + angmaskexp(v), softradiusexp(v), Lmaskexpcurve(v), expMethod(v), @@ -5453,6 +5465,8 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gammaskexp = v; slomaskexp = v; lapmaskexp = v; + strmaskexp = v; + angmaskexp = v; softradiusexp = v; Lmaskexpcurve = v; expMethod = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 0237526c1..9e7f91e3e 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -493,6 +493,8 @@ public: bool gammaskexp; bool slomaskexp; bool lapmaskexp; + bool strmaskexp; + bool angmaskexp; bool softradiusexp; bool Lmaskexpcurve; bool expMethod;