diff --git a/rtdata/languages/default b/rtdata/languages/default index c99921f57..d3d93a4bf 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1162,6 +1162,7 @@ HISTORY_MSG_921;Local - Wavelet Graduated sigma LC2 HISTORY_MSG_922;Local - changes In Black and White HISTORY_MSG_923;Local - Tool complexity mode HISTORY_MSG_924;Local - Tool complexity mode +HISTORY_MSG_925;Local - Scope color tools HISTORY_MSG_CAT02PRESET;Cat02 automatic preset HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction @@ -2354,7 +2355,9 @@ TP_LOCALLAB_COFR;Color & Light - Small defects TP_LOCALLAB_COL_NAME;Name TP_LOCALLAB_COL_VIS;Status TP_LOCALLAB_COLORDE;Color preview selection ΔE - Strength -TP_LOCALLAB_COLORDE_TOOLTIP;Show preview selection ΔE in blue if negative and in green if positive.\nShow real modifications if positive, show enhanced modifications with blue and yellow if negative.\nThe intensity is function of the level.\nFor 'Denoise' the appearance is different. +TP_LOCALLAB_COLORDE_TOOLTIP;Show preview selection ΔE in blue if negative and in green if positive.\nShow real modifications if positive, show enhanced modifications with blue and yellow if negative.\nThe intensity is function of the level.\nFor 'Denoise' the appearance is different.\nButton Preview needs at least one tool is enabled (expander + one slider...) +TP_LOCALLAB_COLORSCOPE;Scope Color Tools +TP_LOCALLAB_COLORSCOPE_TOOLTIP;Use a common Scope for Color and light, Exposure, Shadows highlight, Vibrance.\nOthers tools have their specific scope. TP_LOCALLAB_COMPFRA;Levels Directional Contrast TP_LOCALLAB_COMPREFRA;Levels Dynamic Wavelet Range (un)Compression TP_LOCALLAB_COMPRESS_TOOLTIP;Use if necessary the module 'Clarity & Sharp mask and Blend & Soft Images' by adjusting 'Soft radius' to reduce artifacts. diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 5420525f8..87e15be4e 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -191,7 +191,7 @@ struct local_params { int cir; float thr; float stru; - int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs; + int chro, cont, sens, sensh, senscb, sensbn, senstm, sensex, sensexclu, sensden, senslc, senssf, senshs, senscolor; float clarityml; float contresid; float blurcbdl; @@ -1238,6 +1238,12 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.residhi = locallab.spots.at(sp).residhi; lp.residhithr = locallab.spots.at(sp).residhithr; lp.blwh = locallab.spots.at(sp).blwh; + lp.senscolor = (int) locallab.spots.at(sp).colorscope; + //replace scope color exposure vibrance shadows + lp.sens = lp.senscolor; + lp.sensv = lp.senscolor; + lp.senshs = lp.senscolor; + lp.sensex = lp.senscolor; } static void calcTransitionrect(const float lox, const float loy, const float ach, const local_params& lp, int &zone, float &localFactor) diff --git a/rtengine/procevents.h b/rtengine/procevents.h index d5becbf08..572487810 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -947,6 +947,7 @@ enum ProcEventCode { Evlocallabblwh = 921, EvlocallabcomplexityWithRefresh = 922, EvlocallabcomplexityWithoutRefresh = 923, + EvLocallabSpotcolorscope = 924, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 3bd8403cc..859787c0e 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2572,6 +2572,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : balan(1.0), balanh(1.0), colorde(5.0), + colorscope(15.0), transitweak(1.0), transitgrad(0.0), avoid(false), @@ -3696,6 +3697,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && balan == other.balan && balanh == other.balanh && colorde == other.colorde + && colorscope == other.colorscope && transitweak == other.transitweak && transitgrad == other.transitgrad && avoid == other.avoid @@ -5169,6 +5171,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || spot_edited->balan, "Locallab", "Balan_" + index_str, spot.balan, keyFile); saveToKeyfile(!pedited || spot_edited->balanh, "Locallab", "Balanh_" + index_str, spot.balanh, keyFile); saveToKeyfile(!pedited || spot_edited->colorde, "Locallab", "Colorde_" + index_str, spot.colorde, keyFile); + saveToKeyfile(!pedited || spot_edited->colorscope, "Locallab", "Colorscope_" + index_str, spot.colorscope, keyFile); saveToKeyfile(!pedited || spot_edited->transitweak, "Locallab", "Transitweak_" + index_str, spot.transitweak, keyFile); saveToKeyfile(!pedited || spot_edited->transitgrad, "Locallab", "Transitgrad_" + index_str, spot.transitgrad, keyFile); saveToKeyfile(!pedited || spot_edited->avoid, "Locallab", "Avoid_" + index_str, spot.avoid, keyFile); @@ -6787,6 +6790,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Balan_" + index_str, pedited, spot.balan, spotEdited.balan); assignFromKeyfile(keyFile, "Locallab", "Balanh_" + index_str, pedited, spot.balanh, spotEdited.balanh); assignFromKeyfile(keyFile, "Locallab", "Colorde_" + index_str, pedited, spot.colorde, spotEdited.colorde); + assignFromKeyfile(keyFile, "Locallab", "Colorscope_" + index_str, pedited, spot.colorscope, spotEdited.colorscope); assignFromKeyfile(keyFile, "Locallab", "Transitweak_" + index_str, pedited, spot.transitweak, spotEdited.transitweak); assignFromKeyfile(keyFile, "Locallab", "Transitgrad_" + index_str, pedited, spot.transitgrad, spotEdited.transitgrad); assignFromKeyfile(keyFile, "Locallab", "Avoid_" + index_str, pedited, spot.avoid, spotEdited.avoid); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index df965e0bb..8eda6e160 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -983,6 +983,7 @@ struct LocallabParams { double balan; double balanh; double colorde; + double colorscope; double transitweak; double transitgrad; bool avoid; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index f408d6628..79f5f0e7d 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -950,7 +950,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabsigmalc2 LUMINANCECURVE, // Evlocallabblwh LUMINANCECURVE, // EvlocallabcomplexityWithRefresh - M_VOID // EvlocallabcomplexityWithoutRefresh + M_VOID, // EvlocallabcomplexityWithoutRefresh + LUMINANCECURVE // EvLocallabSpotcolorscope }; diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 41876cc05..3472db683 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -74,6 +74,7 @@ ControlSpotPanel::ControlSpotPanel(): 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"))))), balanh_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BALANH"), 0.2, 2.5, 0.1, 1.0, Gtk::manage(new RTImage("rawtherapee-logo-16.png")), Gtk::manage(new RTImage("circle-red-green-small.png"))))), colorde_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORDE"), -15, 15, 2, 5, Gtk::manage(new RTImage("circle-blue-yellow-small.png")), Gtk::manage(new RTImage("circle-gray-green-small.png"))))), + colorscope_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_COLORSCOPE"), 0., 100.0, 1., 15.))), scopemask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SCOPEMASK"), 0, 100, 1, 60))), lumask_(Gtk::manage(new Adjuster(M("TP_LOCALLAB_LUMASK"), 0, 30, 1, 10))), @@ -335,6 +336,7 @@ ControlSpotPanel::ControlSpotPanel(): balan_->setAdjusterListener(this); balanh_->setAdjusterListener(this); colorde_->setAdjusterListener(this); + colorscope_->setAdjusterListener(this); preview_->set_active(false); previewConn_ = preview_->signal_clicked().connect( @@ -345,6 +347,7 @@ ControlSpotPanel::ControlSpotPanel(): balan_->set_tooltip_text(M("TP_LOCALLAB_BALAN_TOOLTIP")); balanh_->set_tooltip_text(M("TP_LOCALLAB_BALAN_TOOLTIP")); colorde_->set_tooltip_text(M("TP_LOCALLAB_COLORDE_TOOLTIP")); + colorscope_->set_tooltip_text(M("TP_LOCALLAB_COLORSCOPE_TOOLTIP")); } artifBox->pack_start(*struc_); @@ -356,6 +359,7 @@ ControlSpotPanel::ControlSpotPanel(): prevBox->pack_start(*colorde_); prevBox->pack_start(*preview_, Gtk::PACK_SHRINK, 4); artifBox->pack_start(*prevBox); + artifBox->pack_start(*colorscope_); artifFrame->add(*artifBox); pack_start(*artifFrame); @@ -768,6 +772,7 @@ void ControlSpotPanel::load_ControlSpot_param() balan_->setValue((double)row[spots_.balan]); balanh_->setValue((double)row[spots_.balanh]); colorde_->setValue((double)row[spots_.colorde]); + colorscope_->setValue((double)row[spots_.colorscope]); avoid_->set_active(row[spots_.avoid]); blwh_->set_active(row[spots_.blwh]); recurs_->set_active(row[spots_.recurs]); @@ -1278,6 +1283,14 @@ void ControlSpotPanel::adjusterChanged(Adjuster* a, double newval) } } + if (a == colorscope_) { + row[spots_.colorscope] = colorscope_->getValue(); + + if (listener) { + listener->panelChanged(EvLocallabSpotcolorscope, colorscope_->getTextValue()); + } + } + if (a == scopemask_) { row[spots_.scopemask] = scopemask_->getIntValue(); @@ -1509,6 +1522,7 @@ void ControlSpotPanel::disableParamlistener(bool cond) balan_->block(cond); balanh_->block(cond); colorde_->block(cond); + colorscope_->block(cond); avoidConn_.block(cond); blwhConn_.block(cond); recursConn_.block(cond); @@ -1549,6 +1563,7 @@ void ControlSpotPanel::setParamEditable(bool cond) balan_->set_sensitive(cond); balanh_->set_sensitive(cond); colorde_->set_sensitive(cond); + colorscope_->set_sensitive(cond); avoid_->set_sensitive(cond); blwh_->set_sensitive(cond); recurs_->set_sensitive(cond); @@ -2196,6 +2211,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int index) r->balan = row[spots_.balan]; r->balanh = row[spots_.balanh]; r->colorde = row[spots_.colorde]; + r->colorscope = row[spots_.colorscope]; r->transitweak = row[spots_.transitweak]; r->transitgrad = row[spots_.transitgrad]; r->scopemask = row[spots_.scopemask]; @@ -2327,6 +2343,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot) row[spots_.balan] = newSpot->balan; row[spots_.balanh] = newSpot->balanh; row[spots_.colorde] = newSpot->colorde; + row[spots_.colorscope] = newSpot->colorscope; row[spots_.avoid] = newSpot->avoid; row[spots_.blwh] = newSpot->blwh; row[spots_.recurs] = newSpot->recurs; @@ -2397,6 +2414,7 @@ void ControlSpotPanel::setDefaults(const rtengine::procparams::ProcParams * defP balan_->setDefault(defSpot.balan); balanh_->setDefault(defSpot.balanh); colorde_->setDefault(defSpot.colorde); + colorscope_->setDefault(defSpot.colorscope); scopemask_->setDefault((double)defSpot.scopemask); lumask_->setDefault((double)defSpot.lumask); } @@ -2437,6 +2455,7 @@ ControlSpotPanel::ControlSpots::ControlSpots() add(balan); add(balanh); add(colorde); + add(colorscope); add(avoid); add(blwh); add(recurs); diff --git a/rtgui/controlspotpanel.h b/rtgui/controlspotpanel.h index 3bffcc540..17253e76e 100644 --- a/rtgui/controlspotpanel.h +++ b/rtgui/controlspotpanel.h @@ -73,6 +73,7 @@ public: double balan; double balanh; double colorde; + double colorscope; bool avoid; bool blwh; bool recurs; @@ -294,6 +295,7 @@ private: Gtk::TreeModelColumn balan; Gtk::TreeModelColumn balanh; Gtk::TreeModelColumn colorde; + Gtk::TreeModelColumn colorscope; Gtk::TreeModelColumn avoid; Gtk::TreeModelColumn blwh; Gtk::TreeModelColumn recurs; @@ -375,6 +377,7 @@ private: Adjuster* const balan_; Adjuster* const balanh_; Adjuster* const colorde_; + Adjuster* const colorscope_; Adjuster* const scopemask_; Adjuster* const lumask_; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 44868c199..4d533b471 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -302,6 +302,7 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit r->balan = pp->locallab.spots.at(i).balan; r->balanh = pp->locallab.spots.at(i).balanh; r->colorde = pp->locallab.spots.at(i).colorde; + r->colorscope = pp->locallab.spots.at(i).colorscope; r->avoid = pp->locallab.spots.at(i).avoid; r->blwh = pp->locallab.spots.at(i).blwh; r->recurs = pp->locallab.spots.at(i).recurs; @@ -468,6 +469,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->balan = newSpot->balan; r->balanh = newSpot->balanh; r->colorde = newSpot->colorde; + r->colorscope = newSpot->colorscope; r->avoid = newSpot->avoid; r->blwh = newSpot->blwh; r->recurs = newSpot->recurs; @@ -744,6 +746,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited r->balan = newSpot->balan; r->balanh = newSpot->balanh; r->colorde = newSpot->colorde; + r->colorscope = newSpot->colorscope; r->avoid = newSpot->avoid; r->blwh = newSpot->blwh; r->recurs = newSpot->recurs; @@ -883,6 +886,7 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited pp->locallab.spots.at(pp->locallab.selspot).balan = r->balan; pp->locallab.spots.at(pp->locallab.selspot).balanh = r->balanh; pp->locallab.spots.at(pp->locallab.selspot).colorde = r->colorde; + pp->locallab.spots.at(pp->locallab.selspot).colorscope = r->colorscope; pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid; pp->locallab.spots.at(pp->locallab.selspot).blwh = r->blwh; pp->locallab.spots.at(pp->locallab.selspot).recurs = r->recurs; diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 6f045ff70..c7c01f969 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -737,7 +737,7 @@ LocallabColor::LocallabColor(): superBox->pack_start(*gridFrame); superFrame->add(*superBox); pack_start(*superFrame); - pack_start(*sensi); +// pack_start(*sensi); pack_start(*structcol); pack_start(*blurcolde); pack_start(*softradiuscol); @@ -2359,7 +2359,7 @@ LocallabExposure::LocallabExposure(): fatFrame->add(*fatBox); pack_start(*fatFrame); pack_start(*expcomp); - pack_start(*sensiex); +// pack_start(*sensiex); pack_start(*structexp); pack_start(*blurexpde); ToolParamBlock* const toolBox = Gtk::manage(new ToolParamBlock()); @@ -3373,7 +3373,7 @@ LocallabShadow::LocallabShadow(): pack_start(*shadows); pack_start(*s_tonalwidth); pack_start(*sh_radius); - pack_start(*sensihs); +// pack_start(*sensihs); pack_start(*blurSHde); Gtk::Frame* const gamFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_GAMFRA"))); gamFrame->set_label_align(0.025, 0.5); @@ -4194,7 +4194,7 @@ LocallabVibrance::LocallabVibrance(): pack_start(*protectSkins, Gtk::PACK_SHRINK, 0); pack_start(*avoidColorShift, Gtk::PACK_SHRINK, 0); pack_start(*pastSatTog, Gtk::PACK_SHRINK, 0); - pack_start(*sensiv, Gtk::PACK_SHRINK, 0); +// pack_start(*sensiv, Gtk::PACK_SHRINK, 0); pack_start(*curveEditorGG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor ToolParamBlock* const gradvibBox = Gtk::manage(new ToolParamBlock()); gradvibBox->pack_start(*strvib); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index 954dd68ad..a9b4b69b7 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1018,6 +1018,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).balan = locallab.spots.at(j).balan && pSpot.balan == otherSpot.balan; locallab.spots.at(j).balanh = locallab.spots.at(j).balanh && pSpot.balanh == otherSpot.balanh; locallab.spots.at(j).colorde = locallab.spots.at(j).colorde && pSpot.colorde == otherSpot.colorde; + locallab.spots.at(j).colorscope = locallab.spots.at(j).colorscope && pSpot.colorscope == otherSpot.colorscope; 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; @@ -3032,6 +3033,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).colorde = mods.locallab.spots.at(i).colorde; } + if (locallab.spots.at(i).colorscope) { + toEdit.locallab.spots.at(i).colorscope = mods.locallab.spots.at(i).colorscope; + } + if (locallab.spots.at(i).transitweak) { toEdit.locallab.spots.at(i).transitweak = mods.locallab.spots.at(i).transitweak; } @@ -5832,6 +5837,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : balan(v), balanh(v), colorde(v), + colorscope(v), transitweak(v), transitgrad(v), avoid(v), @@ -6281,6 +6287,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) balan = v; balanh = v; colorde = v; + colorscope = v; transitweak = v; transitgrad = v; avoid = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 33613e7a8..60a495bfc 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -410,6 +410,7 @@ public: bool balan; bool balanh; bool colorde; + bool colorscope; bool transitweak; bool transitgrad; bool avoid;