diff --git a/rtdata/languages/default b/rtdata/languages/default index 41933093b..7c2ee6324 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -919,6 +919,7 @@ HISTORY_MSG_671;Local - cbdl mask L HISTORY_MSG_672;Local - cbdl mask CL HISTORY_MSG_673;Local - Use cbdl mask HISTORY_MSG_675;Local - TM soft radius +HISTORY_MSG_676;Local Spot transition-differentiation HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction @@ -2111,9 +2112,11 @@ TP_LOCALLAB_STYPE_TOOLTIP;You can choose between:\nSymmetrical - left handle lin TP_LOCALLAB_SYMSL;Symmetrical (mouse + sliders) TP_LOCALLAB_SYM;Symmetrical (mouse) TP_LOCALLAB_CURVEEDITOR_TONES_LABEL;Tone curve -TP_LOCALLAB_TRANSIT;Transition +TP_LOCALLAB_TRANSIT;Transition Gradient TP_LOCALLAB_TRANSIT_TOOLTIP;Adjust smoothness of transition between affected and unaffected areas. TP_LOCALLAB_TRANSITVALUE;Transition value +TP_LOCALLAB_TRANSITGRAD;Transition differentiation XY +TP_LOCALLAB_TRANSITGRAD_TOOLTIP;Changes the transition of the abscissa to that of the ordinate TP_LOCALLAB_TRANSITWEAK;Transition weakening TP_LOCALLAB_TRANSITWEAK_TOOLTIP;Adjust weakening : change smoothness process - 1 linear - 2 parabolic - 3 cubic TP_LOCALLAB_VIBRANCE;Vibrance diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 12f38d9b8..e8aeaedbf 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -101,44 +101,60 @@ void calcGammaLut(double gamma, double ts, LUTf &gammaLut) { } } -float calcLocalFactor(const float lox, const float loy, const float lcx, const float dx, const float lcy, const float dy, const float ach) +float calcLocalFactor(const float lox, const float loy, const float lcx, const float dx, const float lcy, const float dy, const float ach, const float gradient) { //elipse x2/a2 + y2/b2=1 //transition elipsoidal //x==>lox y==>loy // a==> dx b==>dy - +//printf("grad=%f", gradient); + float eps = 0.0001f; float kelip = dx / dy; float belip = sqrt((rtengine::SQR((lox - lcx) / kelip) + rtengine::SQR(loy - lcy))); //determine position ellipse ==> a and b + if(belip == 0.f) { + belip = eps; + } + //gradient allows differenciation between transition x and y + float rapy = fabs((loy - lcy) / belip); float aelip = belip * kelip; float degrad = aelip / dx; + float gradreal = gradient * rapy + 1.f; float ap = rtengine::RT_PI_F / (1.f - ach); float bp = rtengine::RT_PI_F - ap; - return 0.5f * (1.f + xcosf(degrad * ap + bp)); //trigo cos transition - + float retreal = pow(0.5f * (1.f + xcosf(degrad * ap + bp)), rtengine::SQR(gradreal)); + return retreal; //trigo cos transition } -float calcLocalFactorrect(const float lox, const float loy, const float lcx, const float dx, const float lcy, const float dy, const float ach) + +float calcLocalFactorrect(const float lox, const float loy, const float lcx, const float dx, const float lcy, const float dy, const float ach, const float gradient) { float eps = 0.0001f; float krap = fabs(dx / dy); float kx = (lox - lcx); float ky = (loy - lcy); float ref = 0.f; + //gradient allows differenciation between transition x and y if (fabs(kx / (ky + eps)) < krap) { ref = sqrt(rtengine::SQR(dy) * (1.f + rtengine::SQR(kx / (ky + eps)))); } else { ref = sqrt(rtengine::SQR(dx) * (1.f + rtengine::SQR(ky / (kx + eps)))); } - + float rad = sqrt(rtengine::SQR(kx) + rtengine::SQR(ky)); + if(rad == 0.f) { + rad = eps; + } + float rapy = fabs((loy - lcy) / rad); + float gradreal = gradient * rapy + 1.f; + float coef = rad / ref; float ac = 1.f / (ach - 1.f); float fact = ac * (coef - 1.f); - return fact; + return pow(fact, rtengine::SQR(gradreal)); } + } namespace rtengine @@ -210,6 +226,7 @@ struct local_params { double stren; int trans; float transweak; + float transgrad; int dehaze; bool inv; bool invex; @@ -519,6 +536,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall float blurSH = (float) locallab.spots.at(sp).blurSHde; int local_transit = locallab.spots.at(sp).transit; float local_transitweak = (float)locallab.spots.at(sp).transitweak; + float local_transitgrad = (float)locallab.spots.at(sp).transitgrad; float radius = (float) locallab.spots.at(sp).radius; double sharradius = ((double) locallab.spots.at(sp).sharradius); sharradius = CLIP42_35(sharradius); @@ -625,6 +643,7 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.trans = local_transit; lp.transweak = local_transitweak; + lp.transgrad = local_transitgrad; lp.rad = radius; lp.stren = strength; lp.sensbn = local_sensibn; @@ -710,8 +729,6 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.senshs = local_sensihs; } - - static void calcTransitionrect(const float lox, const float loy, const float ach, const local_params& lp, int &zone, float &localFactor) { zone = 0; @@ -721,7 +738,7 @@ static void calcTransitionrect(const float lox, const float loy, const float ach zone = 2; } else { zone = 1; - localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lx, lp.yc, lp.ly, ach); + localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lx, lp.yc, lp.ly, ach, lp.transgrad); localFactor = pow(localFactor, lp.transweak); } @@ -730,7 +747,7 @@ static void calcTransitionrect(const float lox, const float loy, const float ach zone = 2; } else { zone = 1; - localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lx, lp.yc, lp.lyT, ach); + localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lx, lp.yc, lp.lyT, ach, lp.transgrad); localFactor = pow(localFactor, lp.transweak); } @@ -740,7 +757,7 @@ static void calcTransitionrect(const float lox, const float loy, const float ach zone = 2; } else { zone = 1; - localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lxL, lp.yc, lp.lyT, ach); + localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lxL, lp.yc, lp.lyT, ach, lp.transgrad); localFactor = pow(localFactor, lp.transweak); } @@ -749,7 +766,7 @@ static void calcTransitionrect(const float lox, const float loy, const float ach zone = 2; } else { zone = 1; - localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lxL, lp.yc, lp.ly, ach); + localFactor = calcLocalFactorrect(lox, loy, lp.xc, lp.lxL, lp.yc, lp.ly, ach, lp.transgrad); localFactor = pow(localFactor, lp.transweak); } @@ -758,7 +775,6 @@ static void calcTransitionrect(const float lox, const float loy, const float ach } - static void calcTransition(const float lox, const float loy, const float ach, const local_params& lp, int &zone, float &localFactor) { // returns the zone (0 = outside selection, 1 = transition zone between outside and inside selection, 2 = inside selection) @@ -774,7 +790,7 @@ static void calcTransition(const float lox, const float loy, const float ach, co zone = (zoneVal > 1.f && ((SQR((lox - lp.xc) / (lp.lx)) + SQR((loy - lp.yc) / (lp.ly))) < 1.f)) ? 1 : 0; if (zone == 1) { - localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lx, lp.yc, lp.ly, ach), lp.transweak); + localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lx, lp.yc, lp.ly, ach, lp.transgrad), lp.transweak); } } } else if (lox >= lp.xc && lox < lp.xc + lp.lx && loy < lp.yc && loy > lp.yc - lp.lyT) { @@ -785,7 +801,7 @@ static void calcTransition(const float lox, const float loy, const float ach, co zone = (zoneVal > 1.f && ((SQR((lox - lp.xc) / (lp.lx)) + SQR((loy - lp.yc) / (lp.lyT))) < 1.f)) ? 1 : 0; if (zone == 1) { - localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lx, lp.yc, lp.lyT, ach), lp.transweak); + localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lx, lp.yc, lp.lyT, ach, lp.transgrad), lp.transweak); } } } else if (lox < lp.xc && lox > lp.xc - lp.lxL && loy <= lp.yc && loy > lp.yc - lp.lyT) { @@ -796,7 +812,7 @@ static void calcTransition(const float lox, const float loy, const float ach, co zone = (zoneVal > 1.f && ((SQR((lox - lp.xc) / (lp.lxL)) + SQR((loy - lp.yc) / (lp.lyT))) < 1.f)) ? 1 : 0; if (zone == 1) { - localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lxL, lp.yc, lp.lyT, ach), lp.transweak); + localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lxL, lp.yc, lp.lyT, ach, lp.transgrad), lp.transweak); } } } else if (lox < lp.xc && lox > lp.xc - lp.lxL && loy > lp.yc && loy < lp.yc + lp.ly) { @@ -807,7 +823,7 @@ static void calcTransition(const float lox, const float loy, const float ach, co zone = (zoneVal > 1.f && ((SQR((lox - lp.xc) / (lp.lxL)) + SQR((loy - lp.yc) / (lp.ly))) < 1.f)) ? 1 : 0; if (zone == 1) { - localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lxL, lp.yc, lp.ly, ach), lp.transweak); + localFactor = pow(calcLocalFactor(lox, loy, lp.xc, lp.lxL, lp.yc, lp.ly, ach, lp.transgrad), lp.transweak); } } } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 621585a6a..ed848ce39 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -702,6 +702,7 @@ enum ProcEventCode { EvLocallabEnacbMask = 672, EvlocallabshowmaskcbMethod = 673, Evlocallabsoftradiustm = 674, + EvLocallabSpotTransitgrad = 675, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e97b30777..2f0b39f0c 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2358,6 +2358,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : iter(2.0), balan(1.0), transitweak(1.0), + transitgrad(0.0), avoid(false), // Color & Light expcolor(false), @@ -2554,6 +2555,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && iter == other.iter && balan == other.balan && transitweak == other.transitweak + && transitgrad == other.transitgrad && avoid == other.avoid // Color & Light && expcolor == other.expcolor @@ -3706,6 +3708,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.spots.at(i).iter, "Locallab", "Iter_" + std::to_string(i), spot.iter, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).balan, "Locallab", "Balan_" + std::to_string(i), spot.balan, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).transitweak, "Locallab", "Transitweak_" + std::to_string(i), spot.transitweak, keyFile); + saveToKeyfile(!pedited || pedited->locallab.spots.at(i).transitgrad, "Locallab", "Transitgrad_" + std::to_string(i), spot.transitgrad, keyFile); saveToKeyfile(!pedited || pedited->locallab.spots.at(i).avoid, "Locallab", "Avoid_" + std::to_string(i), spot.avoid, keyFile); // Color & Light saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expcolor, "Locallab", "Expcolor_" + std::to_string(i), spot.expcolor, keyFile); @@ -4987,6 +4990,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Iter_" + std::to_string(i), pedited, spot.iter, spotEdited.iter); assignFromKeyfile(keyFile, "Locallab", "Balan_" + std::to_string(i), pedited, spot.balan, spotEdited.balan); assignFromKeyfile(keyFile, "Locallab", "Transitweak_" + std::to_string(i), pedited, spot.transitweak, spotEdited.transitweak); + assignFromKeyfile(keyFile, "Locallab", "Transitgrad_" + std::to_string(i), pedited, spot.transitgrad, spotEdited.transitgrad); assignFromKeyfile(keyFile, "Locallab", "Avoid_" + std::to_string(i), pedited, spot.avoid, spotEdited.avoid); // Color & Light assignFromKeyfile(keyFile, "Locallab", "Expcolor_" + std::to_string(i), pedited, spot.expcolor, spotEdited.expcolor); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 6fb35ac71..e35dda5e6 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -958,6 +958,7 @@ struct LocallabParams { double iter; double balan; double transitweak; + double transitgrad; bool avoid; // Color & Light bool expcolor; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 9760f0aa8..6861649ec 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -701,7 +701,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, //EvlocallabHHmaskcbshape LUMINANCECURVE, //EvLocallabEnacbMask LUMINANCECURVE, //EvlocallabshowmaskcbMethod - LUMINANCECURVE //Evlocallabsoftradiustm + LUMINANCECURVE, //Evlocallabsoftradiustm + LUMINANCECURVE // EvLocallabSpotTransitgrad }; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 10a301e52..d55252be2 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -67,6 +67,7 @@ ControlSpotPanel::ControlSpotPanel(): iter_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_PROXI"), 0.2, 10.0, 0.1, 2.0))), balan_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALAN"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-white-small.png"))))), transitweak_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITWEAK"), 0.5, 8.0, 0.1, 1.0))), + transitgrad_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_TRANSITGRAD"), -1.0, 1.0, 0.01, 0.0))), avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))), @@ -241,11 +242,14 @@ ControlSpotPanel::ControlSpotPanel(): ToolParamBlock* const transitBox = Gtk::manage(new ToolParamBlock()); if(showtooltip) transit_->set_tooltip_text(M("TP_LOCALLAB_TRANSIT_TOOLTIP")); if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP")); + if(showtooltip) transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP")); transit_->setAdjusterListener(this); transitweak_->setAdjusterListener(this); + transitgrad_->setAdjusterListener(this); transitBox->pack_start(*transit_); transitBox->pack_start(*transitweak_); + transitBox->pack_start(*transitgrad_); transitFrame->add(*transitBox); pack_start(*transitFrame); @@ -563,6 +567,7 @@ void ControlSpotPanel::load_ControlSpot_param() iter_->setValue((double)row[spots_.iter]); balan_->setValue((double)row[spots_.balan]); transitweak_->setValue((double)row[spots_.transitweak]); + transitgrad_->setValue((double)row[spots_.transitgrad]); avoid_->set_active(row[spots_.avoid]); } @@ -984,6 +989,14 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) } } + if (a == transitgrad_) { + row[spots_.transitgrad] = transitgrad_->getValue(); + + if (listener) { + listener->panelChanged(EvLocallabSpotTransitgrad, transitgrad_->getTextValue()); + } + } + } void ControlSpotPanel::avoidChanged() @@ -1050,6 +1063,7 @@ void ControlSpotPanel::disableParamlistener(bool cond) iter_->block(cond); balan_->block(cond); transitweak_->block(cond); + transitgrad_->block(cond); avoidConn_.block(cond); } @@ -1076,6 +1090,7 @@ void ControlSpotPanel::setParamEditable(bool cond) iter_->set_sensitive(cond); balan_->set_sensitive(cond); transitweak_->set_sensitive(cond); + transitgrad_->set_sensitive(cond); avoid_->set_sensitive(cond); } @@ -1708,6 +1723,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id) r->iter = row[spots_.iter]; r->balan = row[spots_.balan]; r->transitweak = row[spots_.transitweak]; + r->transitgrad = row[spots_.transitgrad]; r->avoid = row[spots_.avoid]; return r; @@ -1833,6 +1849,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.iter] = newSpot->iter; row[spots_.balan] = newSpot->balan; row[spots_.transitweak] = newSpot->transitweak; + row[spots_.transitgrad] = newSpot->transitgrad; row[spots_.avoid] = newSpot->avoid; updateParamVisibility(); disableParamlistener(false); @@ -1877,6 +1894,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot) row[spots_.iter] = spot->iter; row[spots_.balan] = spot->balan; row[spots_.transitweak] = spot->transitweak; + row[spots_.transitgrad] = spot->transitgrad; row[spots_.avoid] = spot->avoid; updateControlSpotCurve(row); @@ -1967,6 +1985,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates() se->iter = iter_->getEditedState(); se->balan = balan_->getEditedState(); se->transitweak = transitweak_->getEditedState(); + se->transitgrad = transitgrad_->getEditedState(); se->avoid = !avoid_->get_inconsistent(); return se; @@ -2035,6 +2054,7 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se) iter_->setEditedState(se->iter ? Edited : UnEdited); balan_->setEditedState(se->balan ? Edited : UnEdited); transitweak_->setEditedState(se->transitweak ? Edited : UnEdited); + transitgrad_->setEditedState(se->transitgrad ? Edited : UnEdited); avoid_->set_inconsistent(multiImage && !se->avoid); // Update Control Spot GUI according to widgets edited states @@ -2079,6 +2099,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP iter_->setDefault(defSpot->iter); balan_->setDefault(defSpot->balan); transitweak_->setDefault(defSpot->transitweak); + transitgrad_->setDefault(defSpot->transitgrad); // Set default edited states for adjusters if (!pedited) { @@ -2097,6 +2118,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP iter_->setDefaultEditedState(Irrelevant); balan_->setDefaultEditedState(Irrelevant); transitweak_->setDefaultEditedState(Irrelevant); + transitgrad_->setDefaultEditedState(Irrelevant); } else { const LocallabParamsEdited::LocallabSpotEdited* defSpotState = new LocallabParamsEdited::LocallabSpotEdited(true); @@ -2119,6 +2141,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP iter_->setDefaultEditedState(defSpotState->iter ? Edited : UnEdited); balan_->setDefaultEditedState(defSpotState->balan ? Edited : UnEdited); transitweak_->setDefaultEditedState(defSpotState->transitweak ? Edited : UnEdited); + transitgrad_->setDefaultEditedState(defSpotState->transitgrad ? Edited : UnEdited); } } @@ -2142,6 +2165,7 @@ void ControlSpotPanel::setBatchMode(bool batchMode) iter_->showEditedCB(); balan_->showEditedCB(); transitweak_->showEditedCB(); + transitgrad_->showEditedCB(); // Set batch mode for comboBoxText shape_->append(M("GENERAL_UNCHANGED")); @@ -2180,6 +2204,7 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(iter); add(balan); add(transitweak); + add(transitgrad); add(avoid); } diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 3abda6d1f..d892be6ee 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -64,6 +64,7 @@ public: double iter; double balan; double transitweak; + double transitgrad; bool avoid; }; @@ -94,6 +95,7 @@ public: bool iter; bool balan; bool transitweak; + bool transitgrad; bool avoid; }; @@ -306,6 +308,7 @@ private: Gtk::TreeModelColumn iter; Gtk::TreeModelColumn balan; Gtk::TreeModelColumn transitweak; + Gtk::TreeModelColumn transitgrad; Gtk::TreeModelColumn avoid; }; @@ -369,6 +372,7 @@ private: Adjuster* const iter_; Adjuster* const balan_; Adjuster* const transitweak_; + Adjuster* const transitgrad_; Gtk::CheckButton* const avoid_; sigc::connection avoidConn_; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 7cec443b5..e670259d7 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -1420,6 +1420,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) r->iter = pp->locallab.spots.at(i).iter; r->balan = pp->locallab.spots.at(i).balan; r->transitweak = pp->locallab.spots.at(i).transitweak; + r->transitgrad = pp->locallab.spots.at(i).transitgrad; r->avoid = pp->locallab.spots.at(i).avoid; expsettings->addControlSpot(r); @@ -1545,6 +1546,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) r->iter = newSpot->iter; r->balan = newSpot->balan; r->transitweak = newSpot->transitweak; + r->transitgrad = newSpot->transitgrad; r->avoid = newSpot->avoid; expsettings->addControlSpot(r); @@ -1759,6 +1761,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) r->iter = newSpot->iter; r->balan = newSpot->balan; r->transitweak = newSpot->transitweak; + r->transitgrad = newSpot->transitgrad; r->avoid = newSpot->avoid; expsettings->addControlSpot(r); @@ -1872,6 +1875,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.spots.at(pp->locallab.selspot).iter = r->iter; pp->locallab.spots.at(pp->locallab.selspot).balan = r->balan; pp->locallab.spots.at(pp->locallab.selspot).transitweak = r->transitweak; + pp->locallab.spots.at(pp->locallab.selspot).transitgrad = r->transitgrad; pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid; // Color & Light pp->locallab.spots.at(pp->locallab.selspot).expcolor = expcolor->getEnabled(); @@ -2098,6 +2102,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pe->locallab.spots.at(pp->locallab.selspot).thresh = pe->locallab.spots.at(pp->locallab.selspot).thresh || se->thresh; pe->locallab.spots.at(pp->locallab.selspot).iter = pe->locallab.spots.at(pp->locallab.selspot).iter || se->iter; pe->locallab.spots.at(pp->locallab.selspot).transitweak = pe->locallab.spots.at(pp->locallab.selspot).transitweak || se->transitweak; + pe->locallab.spots.at(pp->locallab.selspot).transitgrad = pe->locallab.spots.at(pp->locallab.selspot).transitgrad || se->transitgrad; pe->locallab.spots.at(pp->locallab.selspot).balan = pe->locallab.spots.at(pp->locallab.selspot).balan || se->balan; pe->locallab.spots.at(pp->locallab.selspot).avoid = pe->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid; // Color & Light @@ -2300,6 +2305,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.spots.at(pp->locallab.selspot).iter = pedited->locallab.spots.at(pp->locallab.selspot).iter || se->iter; pedited->locallab.spots.at(pp->locallab.selspot).balan = pedited->locallab.spots.at(pp->locallab.selspot).balan || se->balan; pedited->locallab.spots.at(pp->locallab.selspot).transitweak = pedited->locallab.spots.at(pp->locallab.selspot).transitweak || se->transitweak; + pedited->locallab.spots.at(pp->locallab.selspot).transitgrad = pedited->locallab.spots.at(pp->locallab.selspot).transitgrad || se->transitgrad; pedited->locallab.spots.at(pp->locallab.selspot).avoid = pedited->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid; // Color & Light pedited->locallab.spots.at(pp->locallab.selspot).expcolor = pedited->locallab.spots.at(pp->locallab.selspot).expcolor || !expcolor->get_inconsistent(); @@ -5012,6 +5018,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con se->iter = spotState->iter; se->balan = spotState->balan; se->transitweak = spotState->transitweak; + se->transitgrad = spotState->transitgrad; se->avoid = spotState->avoid; expsettings->setEditedStates(se); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 5cf0125e1..48dea544e 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -948,6 +948,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).iter = locallab.spots.at(j).iter && pSpot.iter == otherSpot.iter; locallab.spots.at(j).balan = locallab.spots.at(j).balan && pSpot.balan == otherSpot.balan; locallab.spots.at(j).transitweak = locallab.spots.at(j).transitweak && pSpot.transitweak == otherSpot.transitweak; + locallab.spots.at(j).transitgrad = locallab.spots.at(j).transitgrad && pSpot.transitgrad == otherSpot.transitgrad; locallab.spots.at(j).avoid = locallab.spots.at(j).avoid && pSpot.avoid == otherSpot.avoid; // Color & Light locallab.spots.at(j).expcolor = locallab.spots.at(j).expcolor && pSpot.expcolor == otherSpot.expcolor; @@ -2629,6 +2630,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).transitweak = mods.locallab.spots.at(i).transitweak; } + if (locallab.spots.at(i).transitgrad) { + toEdit.locallab.spots.at(i).transitgrad = mods.locallab.spots.at(i).transitgrad; + } + if (locallab.spots.at(i).avoid) { toEdit.locallab.spots.at(i).avoid = mods.locallab.spots.at(i).avoid; } @@ -4221,6 +4226,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : iter(v), balan(v), transitweak(v), + transitgrad(v), avoid(v), // Color & Light expcolor(v), @@ -4414,6 +4420,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) iter = v; balan = v; transitweak = v; + transitgrad = v; avoid = v; // Color & Light expcolor = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 6636f877c..0536577f1 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -375,6 +375,7 @@ public: bool iter; bool balan; bool transitweak; + bool transitgrad; bool avoid; // Color & Light bool expcolor;