diff --git a/rtdata/languages/default b/rtdata/languages/default index 6199d176f..9ff1e119c 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -882,6 +882,7 @@ HISTORY_MSG_632;Local - SH radius HISTORY_MSG_633;Local - SH Scope HISTORY_MSG_634;Local - radius color HISTORY_MSG_635;Local - radius Exp +HISTORY_MSG_636;Local - Tool added HISTORY_MSG_637;Local - SH Mask C HISTORY_MSG_638;Local - SH Mask L HISTORY_MSG_639;Local - SH Mask H @@ -919,6 +920,7 @@ HISTORY_MSG_670;Local - cbdl mask C HISTORY_MSG_671;Local - cbdl mask L HISTORY_MSG_672;Local - cbdl mask CL HISTORY_MSG_673;Local - Use cbdl mask +HISTORY_MSG_674;Local - Tool removed HISTORY_MSG_675;Local - TM soft radius HISTORY_MSG_676;Local Spot transition-differentiation HISTORY_MSG_677;Local - TM amount @@ -932,6 +934,7 @@ HISTORY_MSG_684;Local - Retinex mask radius HISTORY_MSG_685;Local - Retinex mask chroma HISTORY_MSG_686;Local - Retinex mask gamma HISTORY_MSG_687;Local - Retinex mask slope +HISTORY_MSG_688;Local - Tool removed HISTORY_MSG_689;Local - Retinex mask transmission map HISTORY_MSG_690;Local - Retinex scale HISTORY_MSG_691;Local - Retinex darkness @@ -2230,6 +2233,19 @@ TP_LOCALLAB_REN_DIALOG_LAB;Enter the new Control Spot name TP_LOCALLAB_EV_DUPL;Copy of TP_LOCALLAB_DUPLSPOTNAME;Copy TP_LOCALLAB_VIS_TOOLTIP;Click to show/hide selected Control Spot.\nCtrl+click to show/hide all Control Spot. +TP_LOCALLAB_LIST_NAME;Add tool to current spot... +TP_LOCALLAB_COLOR_TOOLNAME;Locallab Color&Light +TP_LOCALLAB_EXP_TOOLNAME;Locallab Exposure +TP_LOCALLAB_SH_TOOLNAME;Locallab Shadows Highlight +TP_LOCALLAB_VIB_TOOLNAME;Locallab Vibrance +TP_LOCALLAB_SOFT_TOOLNAME;Locallab Soft Light +TP_LOCALLAB_BLUR_TOOLNAME;Locallab Blur & Noise +TP_LOCALLAB_TONE_TOOLNAME;Locallab Tone Mapping +TP_LOCALLAB_RET_TOOLNAME;Locallab Retinex +TP_LOCALLAB_SHARP_TOOLNAME;Locallab Sharpening +TP_LOCALLAB_LC_TOOLNAME;Locallab Local Constrast +TP_LOCALLAB_CBDL_TOOLNAME;Locallab CBDL +TP_LOCALLAB_DEN_TOOLNAME;Locallab Denoise TP_LOCAL_HEIGHT;Bottom TP_LOCAL_HEIGHT_T;Top TP_LOCAL_WIDTH;Right diff --git a/rtdata/themes/RawTherapee-GTK3-20_.css b/rtdata/themes/RawTherapee-GTK3-20_.css index 45dec6e39..eb3a89295 100644 --- a/rtdata/themes/RawTherapee-GTK3-20_.css +++ b/rtdata/themes/RawTherapee-GTK3-20_.css @@ -745,6 +745,7 @@ flowboxchild:selected { background-color: #363636; } +#LocallabToolPanel frame, #ExpanderBox frame, #ExpanderBox2 frame, #ExpanderBox3 frame { @@ -761,18 +762,22 @@ flowboxchild:selected { padding: 0.25em; } +#LocallabToolPanel frame > label, #LocallabToolPanel frame frame > label, #ExpanderBox frame > label, #ExpanderBox frame frame > label, #ExpanderBox2 frame > label, #ExpanderBox2 frame frame > label, #ExpanderBox3 frame > label, #ExpanderBox3 frame frame > label { margin-left: 7pt; margin-top: 0; } + +#LocallabToolPanel frame > box, #LocallabToolPanel frame frame > box, #LocallabToolPanel frame > grid, #LocallabToolPanel frame frame > grid, #ExpanderBox frame > box, #ExpanderBox frame frame > box, #ExpanderBox frame > grid, #ExpanderBox frame frame > grid, #ExpanderBox2 frame > box, #ExpanderBox2 frame frame > box, #ExpanderBox2 frame > grid, #ExpanderBox2 frame frame > grid, #ExpanderBox3 frame > box, #ExpanderBox3 frame frame > box, #ExpanderBox3 frame > grid, #ExpanderBox3 frame frame > grid { margin: 0.1666666666666666em; } +#LocallabToolPanel > box > checkbutton, #LocallabToolPanel > box > box, #LocallabToolPanel > grid > checkbutton, #LocallabToolPanel > box > grid, #LocallabToolPanel > grid > grid, #LocallabToolPanel frame > box > grid, #LocallabToolPanel frame > grid > grid, #LocallabToolPanel frame > grid > box, #ExpanderBox > box > checkbutton, #ExpanderBox > box > box, #ExpanderBox > grid > checkbutton, #ExpanderBox > box > grid, #ExpanderBox > grid > grid, #ExpanderBox frame > box > grid, #ExpanderBox frame > grid > grid, #ExpanderBox frame > grid > box, #ExpanderBox2 > box > checkbutton, #ExpanderBox2 > box > box, #ExpanderBox2 > grid > checkbutton, #ExpanderBox2 > box > grid, #ExpanderBox2 > grid > grid, #ExpanderBox2 frame > box > grid, #ExpanderBox2 frame > grid > grid, #ExpanderBox2 frame > grid > box, #ExpanderBox3 > box > checkbutton, #ExpanderBox3 > box > box, #ExpanderBox3 > grid > checkbutton, #ExpanderBox3 > box > grid, #ExpanderBox3 > grid > grid, #ExpanderBox3 frame > box > grid, #ExpanderBox3 frame > grid > grid, #ExpanderBox3 frame > grid > box { @@ -796,6 +801,7 @@ flowboxchild:selected { } /* Sub-tool (MyExpander) background */ +#LocallabToolPanel > box, #LocallabToolPanel > grid, #ExpanderBox2 > box, #ExpanderBox2 > grid { background-color: #3B3B3B; border: 0.0833333333333333em solid #2A2A2A; @@ -804,10 +810,12 @@ flowboxchild:selected { padding: 0.25em; } +#LocallabToolPanel drawingarea, #ExpanderBox2 drawingarea { background-color: #3B3B3B; } +#LocallabToolPanel frame > border, #ExpanderBox2 frame > border { background-color: #414141; border: 0.0833333333333333em solid #373737; @@ -816,10 +824,12 @@ flowboxchild:selected { padding: 0.25em; } +#LocallabToolPanel frame drawingarea, #ExpanderBox2 frame drawingarea { background-color: #414141; } +#LocallabToolPanel frame frame > border, #ExpanderBox2 frame frame > border { background-color: #474747; border: 0.0833333333333333em solid #3D3D3D; @@ -828,6 +838,7 @@ flowboxchild:selected { padding: 0.25em; } +#LocallabToolPanel frame frame drawingarea, #ExpanderBox2 frame frame drawingarea { background-color: #474747; } @@ -854,7 +865,7 @@ flowboxchild:selected { color: #D8D8D8; } -#ExpanderBox2 separator, #ExpanderBox3 separator { +#LocallabToolPanel separator, #ExpanderBox2 separator, #ExpanderBox3 separator { color: #292929; } diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 1d54ed3f0..6abf34d6d 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -662,7 +662,7 @@ enum ProcEventCode { Evlocallabsensihs = 632, Evlocallabradmaskcol = 633, Evlocallabradmaskexp = 634, -// EvlocallabshowmaskSHMethod = 635, + EvlocallabToolAdded = 635, EvlocallabCCmaskSHshape = 636, EvlocallabLLmaskSHshape = 637, EvlocallabHHmaskSHshape = 638, @@ -700,7 +700,7 @@ enum ProcEventCode { EvlocallabLLmaskcbshape = 670, EvlocallabHHmaskcbshape = 671, EvLocallabEnacbMask = 672, -// EvlocallabshowmaskcbMethod = 673, + EvlocallabToolRemovedWithoutRefresh = 673, Evlocallabsoftradiustm = 674, EvLocallabSpotTransitgrad = 675, Evlocallabamount = 676, @@ -714,7 +714,7 @@ enum ProcEventCode { Evlocallabchromaskreti = 684, Evlocallabgammaskreti = 685, Evlocallabslomaskreti = 686, -// EvlocallabshowmaskretiMethod = 687, + EvlocallabToolRemovedWithRefresh = 687, EvLocallabEnaretiMasktmap = 688, Evlocallabscalereti = 689, Evlocallabdarkness = 690, diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index e58853346..2fbbe67f5 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2361,6 +2361,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : transitgrad(0.0), avoid(false), // Color & Light + visicolor(false), expcolor(false), curvactiv(false), lightness(0), @@ -2392,6 +2393,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : HHmaskcurve(DEF_MASK_CURVE), softradiuscol(0.0), // Exposure + visiexpose(false), expexpose(false), expcomp(0.0), hlcompr(0), @@ -2421,6 +2423,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : balanexp(0.8), linear(0.0), // Shadow highlight + visishadhigh(false), expshadhigh(false), highlights(0), h_tonalwidth(70), @@ -2440,6 +2443,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : gammaskSH(1.0), slomaskSH(0.0), // Vibrance + visivibrance(false), expvibrance(false), saturated(0), pastels(0), @@ -2450,12 +2454,14 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensiv(15), skintonescurve{(double)DCT_Linear}, // Soft Light + visisoft(false), expsoft(false), streng(0), sensisf(15), laplace(25.), softMethod("soft"), // Blur & Noise + visiblur(false), expblur(false), radius(1.0), strength(0), @@ -2463,6 +2469,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : blurMethod("norm"), activlum(false), // Tone Mapping + visitonemap(false), exptonemap(false), stren(0.5), gamma(1.0), @@ -2484,6 +2491,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : gammasktm(1.0), slomasktm(0.0), // Retinex + visireti(false), expreti(false), retinexMethod("high"), str(0.0), @@ -2512,6 +2520,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : limd(8.0), fftwreti(false), // Sharpening + visisharp(false), expsharp(false), sharcontrast(20), sharradius(0.75), @@ -2522,6 +2531,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : sensisha(19), inverssha(false), // Local Contrast + visicontrast(false), expcontrast(false), lcradius(80), lcamount(0.0), @@ -2534,6 +2544,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : localcontMethod("loc"), locwavcurve(DEF_LC_CURVE), // Contrast by detail levels + visicbdl(false), expcbdl(false), mult{1.0, 1.0, 1.0, 1.0, 1.0, 1.0}, chromacbdl(0.), @@ -2553,6 +2564,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : gammaskcb(1.0), slomaskcb(0.0), // Denoise + visidenoi(false), expdenoi(false), noiselumf(0), noiselumf0(0), @@ -2598,6 +2610,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && transitgrad == other.transitgrad && avoid == other.avoid // Color & Light + && visicolor == other.visicolor && expcolor == other.expcolor && curvactiv == other.curvactiv && lightness == other.lightness @@ -2629,6 +2642,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && blurcolde == other.blurcolde && softradiuscol == other.softradiuscol // Exposure + && visiexpose == other.visiexpose && expexpose == other.expexpose && expcomp == other.expcomp && hlcompr == other.hlcompr @@ -2658,6 +2672,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && balanexp == other.balanexp && linear == other.linear // Shadow highlight + && visishadhigh == other.visishadhigh && expshadhigh == other.expshadhigh && highlights == other.highlights && h_tonalwidth == other.h_tonalwidth @@ -2677,6 +2692,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gammaskSH == other.gammaskSH && slomaskSH == other.slomaskSH // Vibrance + && visivibrance == other.visivibrance && expvibrance == other.expvibrance && saturated == other.saturated && pastels == other.pastels @@ -2687,12 +2703,14 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && sensiv == other.sensiv && skintonescurve == other.skintonescurve // Soft Light + && visisoft == other.visisoft && expsoft == other.expsoft && streng == other.streng && sensisf == other.sensisf && laplace == other.laplace && softMethod == other.softMethod // Blur & Noise + && visiblur == other.visiblur && expblur == other.expblur && radius == other.radius && strength == other.strength @@ -2700,6 +2718,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && blurMethod == other.blurMethod && activlum == other.activlum // Tone Mapping + && visitonemap == other.visitonemap && exptonemap == other.exptonemap && stren == other.stren && gamma == other.gamma @@ -2721,6 +2740,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gammasktm == other.gammasktm && slomasktm == other.slomasktm // Retinex + && visireti == other.visireti && expreti == other.expreti && retinexMethod == other.retinexMethod && str == other.str @@ -2749,6 +2769,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && limd == other.limd && fftwreti == other.fftwreti // Sharpening + && visisharp == other.visisharp && expsharp == other.expsharp && sharcontrast == other.sharcontrast && sharradius == other.sharradius @@ -2759,6 +2780,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && sensisha == other.sensisha && inverssha == other.inverssha // Local contrast + && visicontrast == other.visicontrast && expcontrast == other.expcontrast && lcradius == other.lcradius && lcamount == other.lcamount @@ -2771,6 +2793,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && localcontMethod == other.localcontMethod && locwavcurve == other.locwavcurve // Constrast by detail levels + && visicbdl == other.visicbdl && expcbdl == other.expcbdl && [this, &other]()->bool { for (int i = 0; i < 6; i++) @@ -2799,6 +2822,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const && gammaskcb == other.gammaskcb && slomaskcb == other.slomaskcb // Denoise + && visidenoi == other.visidenoi && expdenoi == other.expdenoi && noiselumf == other.noiselumf && noiselumf0 == other.noiselumf0 @@ -5150,7 +5174,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) 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); + spot.visicolor = assignFromKeyfile(keyFile, "Locallab", "Expcolor_" + std::to_string(i), pedited, spot.expcolor, spotEdited.expcolor); + + if (spot.visicolor) { + spotEdited.visicolor = true; + } + assignFromKeyfile(keyFile, "Locallab", "Curvactiv_" + std::to_string(i), pedited, spot.curvactiv, spotEdited.curvactiv); assignFromKeyfile(keyFile, "Locallab", "Lightness_" + std::to_string(i), pedited, spot.lightness, spotEdited.lightness); assignFromKeyfile(keyFile, "Locallab", "Contrast_" + std::to_string(i), pedited, spot.contrast, spotEdited.contrast); @@ -5181,7 +5210,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "HHmaskCurve_" + std::to_string(i), pedited, spot.HHmaskcurve, spotEdited.HHmaskcurve); assignFromKeyfile(keyFile, "Locallab", "Softradiuscol_" + std::to_string(i), pedited, spot.softradiuscol, spotEdited.softradiuscol); // Exposure - assignFromKeyfile(keyFile, "Locallab", "Expexpose_" + std::to_string(i), pedited, spot.expexpose, spotEdited.expexpose); + spot.visiexpose = assignFromKeyfile(keyFile, "Locallab", "Expexpose_" + std::to_string(i), pedited, spot.expexpose, spotEdited.expexpose); + + if (spot.visiexpose) { + spotEdited.visiexpose = true; + } + assignFromKeyfile(keyFile, "Locallab", "Expcomp_" + std::to_string(i), pedited, spot.expcomp, spotEdited.expcomp); assignFromKeyfile(keyFile, "Locallab", "Hlcompr_" + std::to_string(i), pedited, spot.hlcompr, spotEdited.hlcompr); assignFromKeyfile(keyFile, "Locallab", "Hlcomprthresh_" + std::to_string(i), pedited, spot.hlcomprthresh, spotEdited.hlcomprthresh); @@ -5210,7 +5244,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Balanexp_" + std::to_string(i), pedited, spot.balanexp, spotEdited.balanexp); assignFromKeyfile(keyFile, "Locallab", "Linearexp_" + std::to_string(i), pedited, spot.linear, spotEdited.linear); // Shadow highlight - assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + std::to_string(i), pedited, spot.expshadhigh, spotEdited.expshadhigh); + spot.visishadhigh = assignFromKeyfile(keyFile, "Locallab", "Expshadhigh_" + std::to_string(i), pedited, spot.expshadhigh, spotEdited.expshadhigh); + + if (spot.visishadhigh) { + spotEdited.visishadhigh = true; + } + 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); assignFromKeyfile(keyFile, "Locallab", "shadows_" + std::to_string(i), pedited, spot.shadows, spotEdited.shadows); @@ -5229,7 +5268,12 @@ 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); // Vibrance - assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + std::to_string(i), pedited, spot.expvibrance, spotEdited.expvibrance); + spot.visivibrance = assignFromKeyfile(keyFile, "Locallab", "Expvibrance_" + std::to_string(i), pedited, spot.expvibrance, spotEdited.expvibrance); + + if (spot.visivibrance) { + spotEdited.visivibrance = true; + } + assignFromKeyfile(keyFile, "Locallab", "Saturated_" + std::to_string(i), pedited, spot.saturated, spotEdited.saturated); assignFromKeyfile(keyFile, "Locallab", "Pastels_" + std::to_string(i), pedited, spot.pastels, spotEdited.pastels); @@ -5251,20 +5295,35 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sensiv_" + std::to_string(i), pedited, spot.sensiv, spotEdited.sensiv); assignFromKeyfile(keyFile, "Locallab", "SkinTonesCurve_" + std::to_string(i), pedited, spot.skintonescurve, spotEdited.skintonescurve); // Soft Light - assignFromKeyfile(keyFile, "Locallab", "Expsoft_" + std::to_string(i), pedited, spot.expsoft, spotEdited.expsoft); + spot.visisoft = assignFromKeyfile(keyFile, "Locallab", "Expsoft_" + std::to_string(i), pedited, spot.expsoft, spotEdited.expsoft); + + if (spot.visisoft) { + spotEdited.visisoft = true; + } + assignFromKeyfile(keyFile, "Locallab", "Streng_" + std::to_string(i), pedited, spot.streng, spotEdited.streng); assignFromKeyfile(keyFile, "Locallab", "Sensisf_" + std::to_string(i), pedited, spot.sensisf, spotEdited.sensisf); assignFromKeyfile(keyFile, "Locallab", "Laplace_" + std::to_string(i), pedited, spot.laplace, spotEdited.laplace); assignFromKeyfile(keyFile, "Locallab", "SoftMethod_" + std::to_string(i), pedited, spot.softMethod, spotEdited.softMethod); // Blur & Noise - assignFromKeyfile(keyFile, "Locallab", "Expblur_" + std::to_string(i), pedited, spot.expblur, spotEdited.expblur); + spot.visiblur = assignFromKeyfile(keyFile, "Locallab", "Expblur_" + std::to_string(i), pedited, spot.expblur, spotEdited.expblur); + + if (spot.visiblur) { + spotEdited.visiblur = true; + } + assignFromKeyfile(keyFile, "Locallab", "Radius_" + std::to_string(i), pedited, spot.radius, spotEdited.radius); assignFromKeyfile(keyFile, "Locallab", "Strength_" + std::to_string(i), pedited, spot.strength, spotEdited.strength); assignFromKeyfile(keyFile, "Locallab", "Sensibn_" + std::to_string(i), pedited, spot.sensibn, spotEdited.sensibn); assignFromKeyfile(keyFile, "Locallab", "BlurMethod_" + std::to_string(i), pedited, spot.blurMethod, spotEdited.blurMethod); assignFromKeyfile(keyFile, "Locallab", "activlum_" + std::to_string(i), pedited, spot.activlum, spotEdited.activlum); // Tone Mapping - assignFromKeyfile(keyFile, "Locallab", "Exptonemap_" + std::to_string(i), pedited, spot.exptonemap, spotEdited.exptonemap); + spot.visitonemap = assignFromKeyfile(keyFile, "Locallab", "Exptonemap_" + std::to_string(i), pedited, spot.exptonemap, spotEdited.exptonemap); + + if (spot.visitonemap) { + spotEdited.visitonemap = true; + } + assignFromKeyfile(keyFile, "Locallab", "Stren_" + std::to_string(i), pedited, spot.stren, spotEdited.stren); assignFromKeyfile(keyFile, "Locallab", "Gamma_" + std::to_string(i), pedited, spot.gamma, spotEdited.gamma); assignFromKeyfile(keyFile, "Locallab", "Estop_" + std::to_string(i), pedited, spot.estop, spotEdited.estop); @@ -5285,7 +5344,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Gammasktm_" + std::to_string(i), pedited, spot.gammasktm, spotEdited.gammasktm); assignFromKeyfile(keyFile, "Locallab", "Slomasktm_" + std::to_string(i), pedited, spot.slomasktm, spotEdited.slomasktm); // Retinex - assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti); + spot.visireti = assignFromKeyfile(keyFile, "Locallab", "Expreti_" + std::to_string(i), pedited, spot.expreti, spotEdited.expreti); + + if (spot.visireti) { + spotEdited.visireti = true; + } + assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + std::to_string(i), pedited, spot.retinexMethod, spotEdited.retinexMethod); assignFromKeyfile(keyFile, "Locallab", "Str_" + std::to_string(i), pedited, spot.str, spotEdited.str); assignFromKeyfile(keyFile, "Locallab", "Chrrt_" + std::to_string(i), pedited, spot.chrrt, spotEdited.chrrt); @@ -5313,7 +5377,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Limd_" + std::to_string(i), pedited, spot.limd, spotEdited.limd); assignFromKeyfile(keyFile, "Locallab", "Fftwreti_" + std::to_string(i), pedited, spot.fftwreti, spotEdited.fftwreti); // Sharpening - assignFromKeyfile(keyFile, "Locallab", "Expsharp_" + std::to_string(i), pedited, spot.expsharp, spotEdited.expsharp); + spot.visisharp = assignFromKeyfile(keyFile, "Locallab", "Expsharp_" + std::to_string(i), pedited, spot.expsharp, spotEdited.expsharp); + + if (spot.visisharp) { + spotEdited.visisharp = true; + } + assignFromKeyfile(keyFile, "Locallab", "Sharcontrast_" + std::to_string(i), pedited, spot.sharcontrast, spotEdited.sharcontrast); assignFromKeyfile(keyFile, "Locallab", "Sharradius_" + std::to_string(i), pedited, spot.sharradius, spotEdited.sharradius); assignFromKeyfile(keyFile, "Locallab", "Sharamount_" + std::to_string(i), pedited, spot.sharamount, spotEdited.sharamount); @@ -5323,7 +5392,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sensisha_" + std::to_string(i), pedited, spot.sensisha, spotEdited.sensisha); assignFromKeyfile(keyFile, "Locallab", "Inverssha_" + std::to_string(i), pedited, spot.inverssha, spotEdited.inverssha); // Local Contrast - assignFromKeyfile(keyFile, "Locallab", "Expcontrast_" + std::to_string(i), pedited, spot.expcontrast, spotEdited.expcontrast); + spot.visicontrast = assignFromKeyfile(keyFile, "Locallab", "Expcontrast_" + std::to_string(i), pedited, spot.expcontrast, spotEdited.expcontrast); + + if (spot.visicontrast) { + spotEdited.visicontrast = true; + } + assignFromKeyfile(keyFile, "Locallab", "Lcradius_" + std::to_string(i), pedited, spot.lcradius, spotEdited.lcradius); assignFromKeyfile(keyFile, "Locallab", "Lcamount_" + std::to_string(i), pedited, spot.lcamount, spotEdited.lcamount); assignFromKeyfile(keyFile, "Locallab", "Lcdarkness_" + std::to_string(i), pedited, spot.lcdarkness, spotEdited.lcdarkness); @@ -5335,7 +5409,11 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "localcontMethod_" + std::to_string(i), pedited, spot.localcontMethod, spotEdited.localcontMethod); assignFromKeyfile(keyFile, "Locallab", "LocwavCurve_" + std::to_string(i), pedited, spot.locwavcurve, spotEdited.locwavcurve); // Contrast by detail levels - assignFromKeyfile(keyFile, "Locallab", "Expcbdl_" + std::to_string(i), pedited, spot.expcbdl, spotEdited.expcbdl); + spot.visicbdl = assignFromKeyfile(keyFile, "Locallab", "Expcbdl_" + std::to_string(i), pedited, spot.expcbdl, spotEdited.expcbdl); + + if (spot.visicbdl) { + spotEdited.visicbdl = true; + } for (int j = 0; j < 6; j ++) { assignFromKeyfile(keyFile, "Locallab", "Mult" + std::to_string(j) + "_" + std::to_string(i), pedited, spot.mult[j], spotEdited.mult[j]); @@ -5358,7 +5436,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Gammaskcb_" + std::to_string(i), pedited, spot.gammaskcb, spotEdited.gammaskcb); assignFromKeyfile(keyFile, "Locallab", "Slomaskcb_" + std::to_string(i), pedited, spot.slomaskcb, spotEdited.slomaskcb); // Denoise - assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); + spot.visidenoi = assignFromKeyfile(keyFile, "Locallab", "Expdenoi_" + std::to_string(i), pedited, spot.expdenoi, spotEdited.expdenoi); + + if (spot.visidenoi) { + spotEdited.visidenoi = true; + } + assignFromKeyfile(keyFile, "Locallab", "noiselumf_" + std::to_string(i), pedited, spot.noiselumf, spotEdited.noiselumf); assignFromKeyfile(keyFile, "Locallab", "noiselumf0_" + std::to_string(i), pedited, spot.noiselumf0, spotEdited.noiselumf0); assignFromKeyfile(keyFile, "Locallab", "noiselumf2_" + std::to_string(i), pedited, spot.noiselumf2, spotEdited.noiselumf2); diff --git a/rtengine/procparams.h b/rtengine/procparams.h index ebc3055b1..5b23b12a8 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -960,6 +960,7 @@ struct LocallabParams { double transitgrad; bool avoid; // Color & Light + bool visicolor; bool expcolor; bool curvactiv; int lightness; @@ -991,13 +992,13 @@ struct LocallabParams { std::vector HHmaskcurve; double softradiuscol; // Exposure + bool visiexpose; bool expexpose; // int expcomp; double expcomp; int hlcompr; int hlcomprthresh; int black; - int shadex; int shcompr; int expchroma; @@ -1022,6 +1023,7 @@ struct LocallabParams { double balanexp; double linear; // Shadow highlight + bool visishadhigh; bool expshadhigh; int highlights; int h_tonalwidth; @@ -1041,6 +1043,7 @@ struct LocallabParams { double gammaskSH; double slomaskSH; // Vibrance + bool visivibrance; bool expvibrance; int saturated; int pastels; @@ -1051,12 +1054,14 @@ struct LocallabParams { int sensiv; std::vector skintonescurve; // Soft Light + bool visisoft; bool expsoft; int streng; int sensisf; double laplace; Glib::ustring softMethod; // Blur & Noise + bool visiblur; bool expblur; double radius; int strength; @@ -1064,6 +1069,7 @@ struct LocallabParams { Glib::ustring blurMethod; bool activlum; // Tone Mapping + bool visitonemap; bool exptonemap; double stren; double gamma; @@ -1085,6 +1091,7 @@ struct LocallabParams { double gammasktm; double slomasktm; // Retinex + bool visireti; bool expreti; Glib::ustring retinexMethod; double str; @@ -1113,6 +1120,7 @@ struct LocallabParams { double limd; bool fftwreti; // Sharpening + bool visisharp; bool expsharp; int sharcontrast; double sharradius; @@ -1123,6 +1131,7 @@ struct LocallabParams { int sensisha; bool inverssha; // Local Contrast + bool visicontrast; bool expcontrast; int lcradius; double lcamount; @@ -1135,6 +1144,7 @@ struct LocallabParams { Glib::ustring localcontMethod; std::vector locwavcurve; // Contrast by detail levels + bool visicbdl; bool expcbdl; double mult[6]; double chromacbdl; @@ -1154,6 +1164,7 @@ struct LocallabParams { double gammaskcb; double slomaskcb; // Denoise + bool visidenoi; bool expdenoi; int noiselumf; int noiselumf0; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index cc8f67cc6..ab699f7e5 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -645,107 +645,107 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabblendmaskexp LUMINANCECURVE, // Evlocallabblurexpde LUMINANCECURVE, // EvLocallabEnaColorMask - LUMINANCECURVE, // EvLocallabEnaExpMask + LUMINANCECURVE, // EvLocallabEnaExpMask LUMINANCECURVE, // Evlocallabblurcolde LUMINANCECURVE, // Evlocallabinversex LUMINANCECURVE, // Evlocallabstructexclu LUMINANCECURVE, // Evlocallabexpchroma - LUMINANCECURVE, //EvLocallabLabGridValue - LUMINANCECURVE, //EvLocallabLabstrengthgrid - LUMINANCECURVE, //EvLocallabgridMethod - LUMINANCECURVE, //EvLocenashadhigh - LUMINANCECURVE, //EvLocallabhighlights - LUMINANCECURVE, //EvLocallabh_tonalwidth - LUMINANCECURVE, //EvLocallabshadows - LUMINANCECURVE, //EvLocallabs_tonalwidth - LUMINANCECURVE, //EvLocallabsh_radius - LUMINANCECURVE, //EvLocallabsensihs - LUMINANCECURVE, //Evlocallabradmaskcol - LUMINANCECURVE, //Evlocallabradmaskexp - LUMINANCECURVE, //EvlocallabshowmaskSHMethod - LUMINANCECURVE, //EvlocallabCCmaskSHshape - LUMINANCECURVE, //EvlocallabLLmaskSHshape - LUMINANCECURVE, //EvlocallabHHmaskSHshape - LUMINANCECURVE, //EvlocallabblendmaskSH - LUMINANCECURVE, //EvLocallabEnaSHMask - LUMINANCECURVE, //EvlocallabradmaskSH - LUMINANCECURVE, //EvlocallabblurSHde - LUMINANCECURVE, //Evlocallabinverssh - LUMINANCECURVE, //EvLocallabSpotbalan - LUMINANCECURVE, //EvLocallabchromaskexp - LUMINANCECURVE, //EvLocallabgammaskexp - LUMINANCECURVE, //EvLocallabslomaskexp - LUMINANCECURVE, //EvLocallabsoftradiusexp - LUMINANCECURVE, //EvLocallabchromaskcol - LUMINANCECURVE, //EvLocallabgammaskcol - LUMINANCECURVE, //EvLocallabslomaskcol - LUMINANCECURVE, //EvLocallabchromaskSH - LUMINANCECURVE, //EvLocallabgammaskSH - LUMINANCECURVE, //EvLocallabslomaskSH - LUMINANCECURVE, //EvLocallabsoftradiuscol - LUMINANCECURVE, //EvLocallabsoftradiusret - LUMINANCECURVE, //EvLocallabsoftradiuscb - LUMINANCECURVE, // EvLocallabSpotTransitweak - LUMINANCECURVE, // EvLocallabclarityml - LUMINANCECURVE, // EvLocallabcontresid - LUMINANCECURVE, //Evlocallabnoiselumf0 - LUMINANCECURVE, //Evlocallabnoiselumf2 - LUMINANCECURVE, //Evlocallabblurcbdl - LUMINANCECURVE, //Evlocallabblendmaskcb - LUMINANCECURVE, // Evlocallabradmaskcb - LUMINANCECURVE, //Evlocallabchromaskcb - LUMINANCECURVE, //Evlocallabgammaskcb - LUMINANCECURVE, //Evlocallabslomaskcb - LUMINANCECURVE, //EvlocallabCCmaskcbshape - LUMINANCECURVE, //EvlocallabLLmaskcbshape - LUMINANCECURVE, //EvlocallabHHmaskcbshape - LUMINANCECURVE, //EvLocallabEnacbMask - LUMINANCECURVE, //EvlocallabshowmaskcbMethod - LUMINANCECURVE, //Evlocallabsoftradiustm - LUMINANCECURVE, // EvLocallabSpotTransitgrad - LUMINANCECURVE, // Evlocallabamount - LUMINANCECURVE, // Evlocallabsatur - LUMINANCECURVE, //EvlocallabCCmaskretishape - LUMINANCECURVE, //EvlocallabLLmaskretishape - LUMINANCECURVE, //EvlocallabHHmaskretishape - LUMINANCECURVE, //EvLocallabEnaretiMask - LUMINANCECURVE, //Evlocallabblendmaskreti - LUMINANCECURVE, // Evlocallabradmaskreti - LUMINANCECURVE, //Evlocallabchromaskreti - LUMINANCECURVE, //Evlocallabgammaskreti - LUMINANCECURVE, //Evlocallabslomaskreti - LUMINANCECURVE, //EvlocallabshowmaskretiMethod - LUMINANCECURVE, //EvLocallabEnaretiMasktmap - LUMINANCECURVE, //Evlocallabscalereti - LUMINANCECURVE, //Evlocallabdarkness - LUMINANCECURVE, //Evlocallablightnessreti - LUMINANCECURVE, //Evlocallablimd - LUMINANCECURVE, //Evlocallablaplace - LUMINANCECURVE, //EvlocallabsoftMethod - LUMINANCECURVE, // Evlocallabequilret - LUMINANCECURVE, // Evlocallabequiltm - LUMINANCECURVE, // Evlocallabfftwlc - LUMINANCECURVE, // Evlocallabfftwreti - LUMINANCECURVE, //EvlocallabshowmasksoftMethod - LUMINANCECURVE, //Evlocallabshadex - LUMINANCECURVE, // EvlocallabexpMethod - LUMINANCECURVE, //EvLocallablaplacexp - LUMINANCECURVE, //EvLocallabbalanexp - LUMINANCECURVE, //EvLocallablinear - LUMINANCECURVE, // EvlocallabCCmasktmshape - LUMINANCECURVE, //EvlocallabLLmasktmshape - LUMINANCECURVE, //EvlocallabHHmasktmshape - LUMINANCECURVE, //EvLocallabEnatmMask - LUMINANCECURVE, //Evlocallabblendmasktm - LUMINANCECURVE, //Evlocallabradmasktm - LUMINANCECURVE, //Evlocallabchromasktm - LUMINANCECURVE, //Evlocallabgammasktm - LUMINANCECURVE, //Evlocallabslomasktm - LUMINANCECURVE, //EvlocallabshowmasktmMethod - LUMINANCECURVE, //EvlocallablocalcontMethod - LUMINANCECURVE, //Evlocallabwavcurve - LUMINANCECURVE, //Evlocallablevelwav - LUMINANCECURVE //Evlocallabresidcont + LUMINANCECURVE, // EvLocallabLabGridValue + LUMINANCECURVE, // EvLocallabLabstrengthgrid + LUMINANCECURVE, // EvLocallabgridMethod + LUMINANCECURVE, // EvLocenashadhigh + LUMINANCECURVE, // EvLocallabhighlights + LUMINANCECURVE, // EvLocallabh_tonalwidth + LUMINANCECURVE, // EvLocallabshadows + LUMINANCECURVE, // EvLocallabs_tonalwidth + LUMINANCECURVE, // EvLocallabsh_radius + LUMINANCECURVE, // EvLocallabsensihs + LUMINANCECURVE, // Evlocallabradmaskcol + LUMINANCECURVE, // Evlocallabradmaskexp + M_VOID, // EvlocallabToolAdded + LUMINANCECURVE, // EvlocallabCCmaskSHshape + LUMINANCECURVE, // EvlocallabLLmaskSHshape + LUMINANCECURVE, // EvlocallabHHmaskSHshape + LUMINANCECURVE, // EvlocallabblendmaskSH + LUMINANCECURVE, // EvLocallabEnaSHMask + LUMINANCECURVE, // EvlocallabradmaskSH + LUMINANCECURVE, // EvlocallabblurSHde + LUMINANCECURVE, // Evlocallabinverssh + LUMINANCECURVE, // EvLocallabSpotbalan + LUMINANCECURVE, // EvLocallabchromaskexp + LUMINANCECURVE, // EvLocallabgammaskexp + LUMINANCECURVE, // EvLocallabslomaskexp + LUMINANCECURVE, // EvLocallabsoftradiusexp + LUMINANCECURVE, // EvLocallabchromaskcol + LUMINANCECURVE, // EvLocallabgammaskcol + LUMINANCECURVE, // EvLocallabslomaskcol + LUMINANCECURVE, // EvLocallabchromaskSH + LUMINANCECURVE, // EvLocallabgammaskSH + LUMINANCECURVE, // EvLocallabslomaskSH + LUMINANCECURVE, // EvLocallabsoftradiuscol + LUMINANCECURVE, // EvLocallabsoftradiusret + LUMINANCECURVE, // EvLocallabsoftradiuscb + LUMINANCECURVE, // EvLocallabSpotTransitweak + LUMINANCECURVE, // EvLocallabclarityml + LUMINANCECURVE, // EvLocallabcontresid + LUMINANCECURVE, // Evlocallabnoiselumf0 + LUMINANCECURVE, // Evlocallabnoiselumf2 + LUMINANCECURVE, // Evlocallabblurcbdl + LUMINANCECURVE, // Evlocallabblendmaskcb + LUMINANCECURVE, // Evlocallabradmaskcb + LUMINANCECURVE, // Evlocallabchromaskcb + LUMINANCECURVE, // Evlocallabgammaskcb + LUMINANCECURVE, // Evlocallabslomaskcb + LUMINANCECURVE, // EvlocallabCCmaskcbshape + LUMINANCECURVE, // EvlocallabLLmaskcbshape + LUMINANCECURVE, // EvlocallabHHmaskcbshape + LUMINANCECURVE, // EvLocallabEnacbMask + M_VOID, // EvlocallabToolRemovedWithoutRefresh + LUMINANCECURVE, // Evlocallabsoftradiustm + LUMINANCECURVE, // EvLocallabSpotTransitgrad + LUMINANCECURVE, // Evlocallabamount + LUMINANCECURVE, // Evlocallabsatur + LUMINANCECURVE, // EvlocallabCCmaskretishape + LUMINANCECURVE, // EvlocallabLLmaskretishape + LUMINANCECURVE, // EvlocallabHHmaskretishape + LUMINANCECURVE, // EvLocallabEnaretiMask + LUMINANCECURVE, // Evlocallabblendmaskreti + LUMINANCECURVE, // Evlocallabradmaskreti + LUMINANCECURVE, // Evlocallabchromaskreti + LUMINANCECURVE, // Evlocallabgammaskreti + LUMINANCECURVE, // Evlocallabslomaskreti + LUMINANCECURVE, // EvlocallabToolRemovedWithRefresh + LUMINANCECURVE, // EvLocallabEnaretiMasktmap + LUMINANCECURVE, // Evlocallabscalereti + LUMINANCECURVE, // Evlocallabdarkness + LUMINANCECURVE, // Evlocallablightnessreti + LUMINANCECURVE, // Evlocallablimd + LUMINANCECURVE, // Evlocallablaplace + LUMINANCECURVE, // EvlocallabsoftMethod + LUMINANCECURVE, // Evlocallabequilret + LUMINANCECURVE, // Evlocallabequiltm + LUMINANCECURVE, // Evlocallabfftwlc + LUMINANCECURVE, // Evlocallabfftwreti + LUMINANCECURVE, // EvlocallabshowmasksoftMethod + LUMINANCECURVE, // Evlocallabshadex + LUMINANCECURVE, // EvlocallabexpMethod + LUMINANCECURVE, // EvLocallablaplacexp + LUMINANCECURVE, // EvLocallabbalanexp + LUMINANCECURVE, // EvLocallablinear + LUMINANCECURVE, // EvlocallabCCmasktmshape + LUMINANCECURVE, // EvlocallabLLmasktmshape + LUMINANCECURVE, // EvlocallabHHmasktmshape + LUMINANCECURVE, // EvLocallabEnatmMask + LUMINANCECURVE, // Evlocallabblendmasktm + LUMINANCECURVE, // Evlocallabradmasktm + LUMINANCECURVE, // Evlocallabchromasktm + LUMINANCECURVE, // Evlocallabgammasktm + LUMINANCECURVE, // Evlocallabslomasktm + LUMINANCECURVE, // EvlocallabshowmasktmMethod + LUMINANCECURVE, // EvlocallablocalcontMethod + LUMINANCECURVE, // Evlocallabwavcurve + LUMINANCECURVE, // Evlocallablevelwav + LUMINANCECURVE // Evlocallabresidcont }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 210e90b9d..95f515891 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -29,48 +29,174 @@ using namespace procparams; extern Options options; +/* ==== LocallabToolList ==== */ +LocallabToolList::LocallabToolList(): + // Tool list GUI elements + list(Gtk::manage(new MyComboBox())), + listTreeModel(Gtk::ListStore::create(toolRow)), + + // Tool list listener + listListener(nullptr) +{ + list->set_model(listTreeModel); + list->pack_start(toolRow.name); + listConn = list->signal_changed().connect(sigc::mem_fun(*this, &LocallabToolList::toolRowSelected)); + + // Append title row to list + // Important: Title row shall always be the first one + const auto titleRow = *(listTreeModel->append()); + titleRow[toolRow.id] = 0; + titleRow[toolRow.name] = M("TP_LOCALLAB_LIST_NAME"); + listConn.block(true); + list->set_active(titleRow); + listConn.block(false); + + // Add ComboBox to LocallabToolList widget + add(*list); +} + +void LocallabToolList::addToolRow(const Glib::ustring &toolname, const int id) +{ + // Disable event management + listConn.block(true); + + // Add tool name according to id + Gtk::TreeIter insertAfter; + + for (auto &r : listTreeModel->children()) { + if (r[toolRow.id] < id) { + insertAfter = *r; // Tool name shall be added at least after this row + } else { + break; // Tool name shall be added before this row + } + } + + // Note: There is always at list one row (i.e. title one) + + const auto newRow = *(listTreeModel->insert_after(insertAfter)); + newRow[toolRow.id] = id; + newRow[toolRow.name] = toolname; + + // Select title row (i.e. always first row) + list->set_active(0); + + // Enable event management + listConn.block(false); +} + +void LocallabToolList::removeToolRow(const Glib::ustring &toolname) +{ + // Disable event management + listConn.block(true); + + // Remove tool name row + for (auto &r : listTreeModel->children()) { + if (r[toolRow.name] == toolname) { + listTreeModel->erase(*r); + break; + } + } + + // Select title row (i.e. always first row) + list->set_active(0); + + // Enable event management + listConn.block(false); +} + +void LocallabToolList::removeAllTool() +{ + // Disable event management + listConn.block(true); + + // Remove all tools + listTreeModel->clear(); + + // Add title row again + const auto titleRow = *(listTreeModel->append()); + titleRow[toolRow.id] = 0; + titleRow[toolRow.name] = M("TP_LOCALLAB_LIST_NAME"); + + // Select title row (i.e. always first row) + list->set_active(0); + + // Enable event management + listConn.block(false); +} + +void LocallabToolList::toolRowSelected() +{ + // Get selected tool name + const auto selRow = *(list->get_active()); + const Glib::ustring toolname = selRow[toolRow.name]; + + // Remove selected tool name for ComboBox + removeToolRow(toolname); + + // Warm tool list listener + if (listListener) { + listListener->locallabToolToAdd(toolname); + } +} + +/* ==== Locallab ==== */ Locallab::Locallab(): FoldableToolPanel(this, "locallab", M("TP_LOCALLAB_LABEL"), false, true), // Spot control panel widget - expsettings(Gtk::manage(new ControlSpotPanel())) + expsettings(Gtk::manage(new ControlSpotPanel())), + + // Tool list widget + toollist(Gtk::manage(new LocallabToolList())), + + // Create Locallab tools + expcolor(Gtk::manage(new LocallabColor())), + expexpose(Gtk::manage(new LocallabExposure())), + expshadhigh(Gtk::manage(new LocallabShadow())), + expvibrance(Gtk::manage(new LocallabVibrance())), + expsoft(Gtk::manage(new LocallabSoft())), + expblur(Gtk::manage(new LocallabBlur())), + exptonemap(Gtk::manage(new LocallabTone())), + expreti(Gtk::manage(new LocallabRetinex())), + expsharp(Gtk::manage(new LocallabSharp())), + expcontrast(Gtk::manage(new LocallabContrast())), + expcbdl(Gtk::manage(new LocallabCBDL())), + expdenoi(Gtk::manage(new LocallabDenoise())) { const bool showtooltip = options.showtooltip; // Create panel widget to receive Locallab GUI elements ToolVBox* const panel = Gtk::manage(new ToolVBox()); + panel->set_spacing(2); // Add spot control panel to panel widget - expsettings->setLevel(2); // TODO Move this to controlspotpanel.cc + expsettings->setLevel(2); panel->pack_start(*expsettings->getExpander(), false, false); - // Create Locallab tools - expcolor = Gtk::manage(new LocallabColor()); - expexpose = Gtk::manage(new LocallabExposure()); - expshadhigh = Gtk::manage(new LocallabShadow()); - expvibrance = Gtk::manage(new LocallabVibrance()); - expsoft = Gtk::manage(new LocallabSoft()); - expblur = Gtk::manage(new LocallabBlur()); - exptonemap = Gtk::manage(new LocallabTone()); - expreti = Gtk::manage(new LocallabRetinex()); - expsharp = Gtk::manage(new LocallabSharp()); - expcontrast = Gtk::manage(new LocallabContrast()); - expcbdl = Gtk::manage(new LocallabCBDL()); - expdenoi = Gtk::manage(new LocallabDenoise()); + // Add separator + Gtk::HSeparator* const separator = Gtk::manage(new Gtk::HSeparator()); + panel->pack_start(*separator, false, false); + + // Add tool list widget + toollist->setLocallabToolListListener(this); + panel->pack_start(*toollist, false, false); // Add Locallab tools to panel widget - addTool(panel, expcolor); - addTool(panel, expexpose); - addTool(panel, expshadhigh); - addTool(panel, expvibrance); - addTool(panel, expsoft); - addTool(panel, expblur); - addTool(panel, exptonemap); - addTool(panel, expreti); - addTool(panel, expsharp); - addTool(panel, expcontrast); - addTool(panel, expcbdl); - addTool(panel, expdenoi); + ToolVBox* const toolpanel = Gtk::manage(new ToolVBox()); + toolpanel->set_name("LocallabToolPanel"); + addTool(toolpanel, expcolor); + addTool(toolpanel, expexpose); + addTool(toolpanel, expshadhigh); + addTool(toolpanel, expvibrance); + addTool(toolpanel, expsoft); + addTool(toolpanel, expblur); + addTool(toolpanel, exptonemap); + addTool(toolpanel, expreti); + addTool(toolpanel, expsharp); + addTool(toolpanel, expcontrast); + addTool(toolpanel, expcbdl); + addTool(toolpanel, expdenoi); + panel->pack_start(*toolpanel, false, false); // Add panel widget to Locallab GUI pack_start(*panel); @@ -176,6 +302,18 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit tool->read(pp, pedited); } + // Update tool list widget + int toolNb = 0; + toollist->removeAllTool(); // Reset Locallab list firstly + + for (auto tool : locallabTools) { + toolNb++; + + if (!tool->isLocallabToolAdded()) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } + // Specific case: if there is no spot, GUI isn't anymore editable (i.e. Locallab tool cannot be managed) if (pp->locallab.nbspot > 0) { setParamEditable(true); @@ -212,6 +350,8 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited int prX, prY; // Coord of preview area center EditDataProvider* const provider = expsettings->getEditProvider(); + int toolNb; + switch (spotPanelEvent) { case (ControlSpotPanel::SpotCreation): // Spot creation event // Spot creation (default initialization) @@ -307,6 +447,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited enableListener(); + // Update tool list widget + toolNb = 0; + toollist->removeAllTool(); // Reset Locallab list firstly + + for (auto tool : locallabTools) { + toolNb++; + + if (!tool->isLocallabToolAdded()) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } + if (pp->locallab.nbspot == 1) { setParamEditable(true); } @@ -355,6 +507,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited enableListener(); + // Update tool list widget + int toolNb = 0; + toollist->removeAllTool(); // Reset Locallab list firstly + + for (auto tool : locallabTools) { + toolNb++; + + if (!tool->isLocallabToolAdded()) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } + if (pp->locallab.nbspot == 0) { setParamEditable(false); } @@ -393,6 +557,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited enableListener(); + // Update tool list widget + toolNb = 0; + toollist->removeAllTool(); // Reset Locallab list firstly + + for (auto tool : locallabTools) { + toolNb++; + + if (!tool->isLocallabToolAdded()) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } + // Update locallab tools mask background if (pp->locallab.selspot < (int)maskBackRef.size()) { const double huer = maskBackRef.at(pp->locallab.selspot).huer; @@ -521,6 +697,18 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited enableListener(); + // Update tool list widget + toolNb = 0; + toollist->removeAllTool(); // Reset Locallab list firstly + + for (auto tool : locallabTools) { + toolNb++; + + if (!tool->isLocallabToolAdded()) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } + // Update default values according to selected spot setDefaults(pp, pedited); @@ -739,6 +927,7 @@ void Locallab::foldAllButOne(LocallabTool* except) void Locallab::addTool(Gtk::Box* where, LocallabTool* tool) { + tool->getExpander()->setLevel(3); where->pack_start(*tool->getExpander(), false, false); locallabTools.push_back(tool); tool->setLocallabToolListener(this); @@ -757,17 +946,14 @@ void Locallab::setParamEditable(bool cond) expsettings->setParamEditable(cond); // TODO Move this code to controlspotpanel.cc when there is zero spot // Enable/disable possibility to add Locallab tool - // TODO To implement + toollist->set_sensitive(cond); - // Remove all Locallab tool only if cond is false - // TODO To be managed in locallabtools first - /* + // Remove all Locallab tool (without raising event) only if cond is false if (!cond) { for (auto tool : locallabTools) { - tool->addLocallabTool(false); + tool->removeLocallabTool(false); } } - */ } void Locallab::resetOtherMaskView(LocallabTool* current) @@ -779,3 +965,26 @@ void Locallab::resetOtherMaskView(LocallabTool* current) } } } + +void Locallab::toolRemoved(LocallabTool* current) +{ + // Update tool list widget according to removed tool + int toolNb = 0; + + for (auto tool : locallabTools) { + toolNb++; + + if (tool == current) { + toollist->addToolRow(tool->getToolName(), toolNb); + } + } +} + +void Locallab::locallabToolToAdd(const Glib::ustring &toolname) +{ + for (auto tool : locallabTools) { + if (tool->getToolName() == toolname) { + tool->addLocallabTool(true); + } + } +} diff --git a/rtgui/locallab.h b/rtgui/locallab.h index eedb15d9e..a23d9b3a9 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -25,29 +25,93 @@ #include "controlspotpanel.h" #include "locallabtools.h" +/* ==== LocallabToolListListener ==== */ +class LocallabToolList; +class LocallabToolListListener +{ +public: + LocallabToolListListener() {}; + virtual ~LocallabToolListListener() {}; + + virtual void locallabToolToAdd(const Glib::ustring &toolname) = 0; +}; + +/* ==== LocallabToolList ==== */ +class LocallabToolList: + public Gtk::VBox +{ +private: + // Tree model to manage ComboBox rows + class ToolRow: + public Gtk::TreeModel::ColumnRecord + { + public: + Gtk::TreeModelColumn id; + Gtk::TreeModelColumn name; + + ToolRow() + { + add(id); + add(name); + } + }; + + // Tool list GUI widgets + MyComboBox* const list; + sigc::connection listConn; + ToolRow toolRow; + Glib::RefPtr listTreeModel; + + // Tool list listener + LocallabToolListListener* listListener; + +public: + LocallabToolList(); + + // Setter for tool list listener + void setLocallabToolListListener(LocallabToolListListener* ltll) + { + listListener = ltll; + } + + // Tool list management function + void addToolRow(const Glib::ustring &toolname, const int id); + void removeToolRow(const Glib::ustring &toolname); + void removeAllTool(); + +private: + // Tool list event management function + void toolRowSelected(); +}; + +/* ==== Locallab ==== */ class Locallab : public ToolParamBlock, public FoldableToolPanel, public rtengine::LocallabListener, - public LocallabToolListener + public LocallabToolListener, + public LocallabToolListListener { private: // Spot control panel widget ControlSpotPanel* const expsettings; + // Tool list widget + LocallabToolList* const toollist; + // Locallab tool widgets - LocallabColor* expcolor; - LocallabExposure* expexpose; - LocallabShadow* expshadhigh; - LocallabVibrance* expvibrance; - LocallabSoft* expsoft; - LocallabBlur* expblur; - LocallabTone* exptonemap; - LocallabRetinex* expreti; - LocallabSharp* expsharp; - LocallabContrast* expcontrast; - LocallabCBDL* expcbdl; - LocallabDenoise* expdenoi; + LocallabColor* const expcolor; + LocallabExposure* const expexpose; + LocallabShadow* const expshadhigh; + LocallabVibrance* const expvibrance; + LocallabSoft* const expsoft; + LocallabBlur* const expblur; + LocallabTone* const exptonemap; + LocallabRetinex* const expreti; + LocallabSharp* const expsharp; + LocallabContrast* const expcontrast; + LocallabCBDL* const expcbdl; + LocallabDenoise* const expdenoi; std::vector locallabTools; @@ -106,6 +170,10 @@ private: // LocallabToolListener function void resetOtherMaskView(LocallabTool* current); + void toolRemoved(LocallabTool* current); + + // LocallabToolListListener function + void locallabToolToAdd(const Glib::ustring &toolname); }; #endif diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index aed72dee3..ff0719ddb 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -175,7 +175,6 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr } exp->add(*totalBox, false); - exp->setLevel(2); } LocallabTool::~LocallabTool() @@ -187,9 +186,46 @@ LocallabTool::~LocallabTool() } } -void LocallabTool::addLocallabTool(bool cond) +void LocallabTool::addLocallabTool(bool raiseEvent) { - exp->set_visible(cond); + exp->set_visible(true); + + // Raise event if required + if (raiseEvent) { + if (listener) { + listener->panelChanged(EvlocallabToolAdded, + toolName + " (" + escapeHtmlChars(spotName) + ")"); + } + } +} + +void LocallabTool::removeLocallabTool(bool raiseEvent) +{ + exp->set_visible(false); + + // Inform LocallabToolListener to update Locallab tools list + if (locToolListener) { + locToolListener->toolRemoved(this); + } + + if (exp->getEnabled()) { + // Disable tool while removing it + disableListener(); + exp->setEnabled(false); + enableListener(); + + // Raise event if required refreshing image + if (raiseEvent && listener) { + listener->panelChanged(EvlocallabToolRemovedWithRefresh, + toolName + " (" + escapeHtmlChars(spotName) + ")"); + } + } else { + // Raise event if required without refreshing image + if (raiseEvent && listener) { + listener->panelChanged(EvlocallabToolRemovedWithoutRefresh, + toolName + " (" + escapeHtmlChars(spotName) + ")"); + } + } } bool LocallabTool::isLocallabToolAdded() @@ -313,8 +349,8 @@ void LocallabTool::enableListener() bool LocallabTool::on_remove_change(GdkEventButton* event) { if (event->button == GDK_BUTTON_PRIMARY) { - printf("Remove icon pressed\n"); - // exp->set_visible(false); + // Remove Locallab tool raising an event + removeLocallabTool(true); } return true; // No event propagation further (to avoid closing expander when mouse clicking on remove image) @@ -331,7 +367,7 @@ void LocallabTool::foldThemAll(GdkEventButton* event) /* ==== LocallabColor ==== */ LocallabColor::LocallabColor(): - LocallabTool(this, "Locallab Color&Light", M("TP_LOCALLAB_COFR"), false, MaskNormal), + LocallabTool(this, M("TP_LOCALLAB_COLOR_TOOLNAME"), M("TP_LOCALLAB_COFR"), false, MaskNormal), // Color & Light specific widgets curvactiv(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_CURV")))), @@ -570,6 +606,8 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visicolor); + exp->setEnabled(pp->locallab.spots.at(index).expcolor); curvactiv->set_active(pp->locallab.spots.at(index).curvactiv); lightness->setValue(pp->locallab.spots.at(index).lightness); @@ -630,6 +668,9 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expcolor = exp->getEnabled(); + + pp->locallab.spots.at(index).visicolor = exp->get_visible(); + pp->locallab.spots.at(index).curvactiv = curvactiv->get_active(); pp->locallab.spots.at(index).lightness = lightness->getIntValue(); pp->locallab.spots.at(index).contrast = contrast->getIntValue(); @@ -988,7 +1029,7 @@ void LocallabColor::updateColorGUI() /* ==== LocallabExposure ==== */ LocallabExposure::LocallabExposure(): - LocallabTool(this, "Locallab Exposure", M("TP_LOCALLAB_EXPOSE"), false, MaskNormal), + LocallabTool(this, M("TP_LOCALLAB_EXP_TOOLNAME"), M("TP_LOCALLAB_EXPOSE"), false, MaskNormal), // Exposure specific widgets expMethod(Gtk::manage(new MyComboBoxText())), @@ -1145,6 +1186,8 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visiexpose); + exp->setEnabled(pp->locallab.spots.at(index).expexpose); if (pp->locallab.spots.at(index).expMethod == "std") { @@ -1203,6 +1246,8 @@ void LocallabExposure::write(rtengine::procparams::ProcParams* pp, ParamsEdited* if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expexpose = exp->getEnabled(); + pp->locallab.spots.at(index).visiexpose = exp->get_visible(); + if (expMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).expMethod = "std"; } else if (expMethod->get_active_row_number() == 1) { @@ -1577,7 +1622,7 @@ void LocallabExposure::updateExposureGUI3() /* ==== LocallabShadow ==== */ LocallabShadow::LocallabShadow(): - LocallabTool(this, "Locallab Shadows Highlight", M("TP_LOCALLAB_SHADHIGH"), false, MaskNormal), + LocallabTool(this, M("TP_LOCALLAB_SH_TOOLNAME"), M("TP_LOCALLAB_SHADHIGH"), false, MaskNormal), // Shadow highlight specific widgets highlights(Gtk::manage(new Adjuster(M("TP_SHADOWSHLIGHTS_HIGHLIGHTS"), 0, 100, 1, 0))), @@ -1651,6 +1696,8 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visishadhigh); + exp->setEnabled(pp->locallab.spots.at(index).expshadhigh); highlights->setValue(pp->locallab.spots.at(index).highlights); h_tonalwidth->setValue(pp->locallab.spots.at(index).h_tonalwidth); @@ -1686,6 +1733,9 @@ void LocallabShadow::write(rtengine::procparams::ProcParams* pp, ParamsEdited* p if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expshadhigh = exp->getEnabled(); + + pp->locallab.spots.at(index).visishadhigh = exp->get_visible(); + pp->locallab.spots.at(index).highlights = highlights->getIntValue(); pp->locallab.spots.at(index).h_tonalwidth = h_tonalwidth->getIntValue(); pp->locallab.spots.at(index).shadows = shadows->getIntValue(); @@ -1920,7 +1970,7 @@ void LocallabShadow::updateShadowGUI() /* ==== LocallabVibrance ==== */ LocallabVibrance::LocallabVibrance(): - LocallabTool(this, "Locallab Vibrance", M("TP_LOCALLAB_VIBRANCE"), false, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_VIB_TOOLNAME"), M("TP_LOCALLAB_VIBRANCE"), false, MaskNone), // Vibrance specific widgets saturated(Gtk::manage(new Adjuster(M("TP_VIBRANCE_SATURATED"), -100., 100., 1., 0.))), @@ -2022,6 +2072,8 @@ void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const Pa if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visivibrance); + exp->setEnabled(pp->locallab.spots.at(index).expvibrance); saturated->setValue(pp->locallab.spots.at(index).saturated); pastels->setValue(pp->locallab.spots.at(index).pastels); @@ -2048,6 +2100,9 @@ void LocallabVibrance::write(rtengine::procparams::ProcParams* pp, ParamsEdited* if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expvibrance = exp->getEnabled(); + + pp->locallab.spots.at(index).visivibrance = exp->get_visible(); + pp->locallab.spots.at(index).saturated = saturated->getIntValue(); pp->locallab.spots.at(index).pastels = pastels->getIntValue(); pp->locallab.spots.at(index).psthreshold = psThreshold->getValue(); @@ -2259,7 +2314,7 @@ void LocallabVibrance::updateVibranceGUI() /* ==== LocallabSoft ==== */ LocallabSoft::LocallabSoft(): - LocallabTool(this, "Locallab Soft Light", M("TP_LOCALLAB_SOFT"), false, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_SOFT_TOOLNAME"), M("TP_LOCALLAB_SOFT"), false, MaskNone), // Soft light specific widgets softMethod(Gtk::manage(new MyComboBoxText())), @@ -2342,6 +2397,8 @@ void LocallabSoft::read(const rtengine::procparams::ProcParams* pp, const Params if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visisoft); + exp->setEnabled(pp->locallab.spots.at(index).expsoft); if (pp->locallab.spots.at(index).softMethod == "soft") { @@ -2371,6 +2428,8 @@ void LocallabSoft::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expsoft = exp->getEnabled(); + pp->locallab.spots.at(index).visisoft = exp->get_visible(); + if (softMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).softMethod = "soft"; } else if (softMethod->get_active_row_number() == 1) { @@ -2488,7 +2547,7 @@ void LocallabSoft::updateSoftGUI() /* ==== LocallabBlur ==== */ LocallabBlur::LocallabBlur(): - LocallabTool(this, "Locallab Blur & Noise", M("TP_LOCALLAB_BLUFR"), false, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_BLUR_TOOLNAME"), M("TP_LOCALLAB_BLUFR"), false, MaskNone), // Blur & Noise specific widgets radius(Gtk::manage(new Adjuster(M("TP_LOCALLAB_RADIUS"), 1.0, 100.0, 0.1, 1.0))), @@ -2555,6 +2614,8 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visiblur); + exp->setEnabled(pp->locallab.spots.at(index).expblur); radius->setValue(pp->locallab.spots.at(index).radius); strength->setValue(pp->locallab.spots.at(index).strength); @@ -2582,6 +2643,8 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expsoft = exp->getEnabled(); + pp->locallab.spots.at(index).visisoft = exp->get_visible(); + pp->locallab.spots.at(index).expblur = exp->getEnabled(); pp->locallab.spots.at(index).radius = radius->getValue(); pp->locallab.spots.at(index).strength = strength->getIntValue(); diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 36dedb590..49edc4321 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -34,7 +34,8 @@ public: LocallabToolListener() {}; virtual ~LocallabToolListener() {}; - virtual void resetOtherMaskView(LocallabTool* current) {}; + virtual void resetOtherMaskView(LocallabTool* current) = 0; + virtual void toolRemoved(LocallabTool* current) = 0; }; @@ -122,7 +123,8 @@ public: } // Management functions to add/remove Locallab tool - void addLocallabTool(bool cond); + void addLocallabTool(bool raiseEvent); + void removeLocallabTool(bool raiseEvent); bool isLocallabToolAdded(); // Mask background management function diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index a73789623..00c73947b 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -116,7 +116,7 @@ static double retiNeigh2Slider(double neigh) /* ==== LocallabTone ==== */ LocallabTone::LocallabTone(): - LocallabTool(this, "Locallab Tone Mapping", M("TP_LOCALLAB_TM"), true, MaskNormal), + LocallabTool(this, M("TP_LOCALLAB_TONE_TOOLNAME"), M("TP_LOCALLAB_TM"), true, MaskNormal), // Tone mapping specific widgets amount(Gtk::manage(new Adjuster(M("TP_LOCALLAB_AMOUNT"), 50., 100.0, 0.5, 95.))), @@ -210,6 +210,8 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visitonemap); + exp->setEnabled(pp->locallab.spots.at(index).exptonemap); amount->setValue(pp->locallab.spots.at(index).amount); stren->setValue(pp->locallab.spots.at(index).stren); @@ -244,6 +246,9 @@ void LocallabTone::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).exptonemap = exp->getEnabled(); + + pp->locallab.spots.at(index).visitonemap = exp->get_visible(); + pp->locallab.spots.at(index).amount = amount->getValue(); pp->locallab.spots.at(index).stren = stren->getValue(); pp->locallab.spots.at(index).equiltm = equiltm->get_active(); @@ -483,7 +488,7 @@ void LocallabTone::equiltmChanged() /* ==== LocallabRetinex ==== */ LocallabRetinex::LocallabRetinex(): - LocallabTool(this, "Locallab Retinex", M("TP_LOCALLAB_RETI"), true, MaskWithTrMap), + LocallabTool(this, M("TP_LOCALLAB_RET_TOOLNAME"), M("TP_LOCALLAB_RETI"), true, MaskWithTrMap), // Retinex specific widgets retinexMethod(Gtk::manage(new MyComboBoxText())), @@ -635,6 +640,8 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visireti); + exp->setEnabled(pp->locallab.spots.at(index).expreti); if (pp->locallab.spots.at(index).retinexMethod == "low") { @@ -689,10 +696,10 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited* const int index = pp->locallab.selspot; if (index < (int)pp->locallab.spots.size()) { - pp->locallab.spots.at(index).expsoft = exp->getEnabled(); - pp->locallab.spots.at(index).expreti = exp->getEnabled(); + pp->locallab.spots.at(index).visireti = exp->get_visible(); + if (retinexMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).retinexMethod = "low"; } else if (retinexMethod->get_active_row_number() == 1) { @@ -1056,7 +1063,7 @@ void LocallabRetinex::updateRetinexGUI2() /* ==== LocallabSharp ==== */ LocallabSharp::LocallabSharp(): - LocallabTool(this, "Locallab Sharpening", M("TP_LOCALLAB_SHARP"), true, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_SHARP_TOOLNAME"), M("TP_LOCALLAB_SHARP"), true, MaskNone), // Sharpening specific widgets sharcontrast(Gtk::manage(new Adjuster(M("TP_SHARPENING_CONTRAST"), 0, 200, 1, 20))), @@ -1125,6 +1132,8 @@ void LocallabSharp::read(const rtengine::procparams::ProcParams* pp, const Param if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visisharp); + exp->setEnabled(pp->locallab.spots.at(index).expsharp); sharcontrast->setValue(pp->locallab.spots.at(index).sharcontrast); sharradius->setValue(pp->locallab.spots.at(index).sharradius); @@ -1148,6 +1157,9 @@ void LocallabSharp::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expsharp = exp->getEnabled(); + + pp->locallab.spots.at(index).visisharp = exp->get_visible(); + pp->locallab.spots.at(index).sharcontrast = sharcontrast->getIntValue(); pp->locallab.spots.at(index).sharradius = sharradius->getValue(); pp->locallab.spots.at(index).sharamount = sharamount->getIntValue(); @@ -1267,7 +1279,7 @@ void LocallabSharp::inversshaChanged() /* ==== LocallabContrast ==== */ LocallabContrast::LocallabContrast(): - LocallabTool(this, "Locallab Local Constrast", M("TP_LOCALLAB_LOC_CONTRAST"), false, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_LC_TOOLNAME"), M("TP_LOCALLAB_LOC_CONTRAST"), false, MaskNone), // Local constrast specific widgets localcontMethod(Gtk::manage(new MyComboBoxText())), @@ -1373,6 +1385,8 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visicontrast); + exp->setEnabled(pp->locallab.spots.at(index).expcontrast); if (pp->locallab.spots.at(index).localcontMethod == "loc") { @@ -1408,6 +1422,8 @@ void LocallabContrast::write(rtengine::procparams::ProcParams* pp, ParamsEdited* if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expcontrast = exp->getEnabled(); + pp->locallab.spots.at(index).visicontrast = exp->get_visible(); + if (localcontMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).localcontMethod = "loc"; } else if (localcontMethod->get_active_row_number() == 1) { @@ -1583,7 +1599,7 @@ void LocallabContrast::updateContrastGUI() /* ==== LocallabCBDL ==== */ LocallabCBDL::LocallabCBDL(): - LocallabTool(this, "Locallab CBDL", M("TP_LOCALLAB_CBDL"), true, MaskNormal), + LocallabTool(this, M("TP_LOCALLAB_CBDL_TOOLNAME"), M("TP_LOCALLAB_CBDL"), true, MaskNormal), // CBDL specific widgets chromacbdl(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CHROMACBDL"), 0., 1.5, 0.01, 0.))), @@ -1706,6 +1722,8 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visicbdl); + exp->setEnabled(pp->locallab.spots.at(index).expcbdl); for (int i = 0; i < 6; i++) { @@ -1743,6 +1761,8 @@ void LocallabCBDL::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expcbdl = exp->getEnabled(); + pp->locallab.spots.at(index).visicbdl = exp->get_visible(); + for (int i = 0; i < 6; i++) { pp->locallab.spots.at(index).mult[i] = multiplier[i]->getValue(); } @@ -2002,7 +2022,7 @@ void LocallabCBDL::lumacontrastPlusPressed() /* ==== LocallabDenoise ==== */ LocallabDenoise::LocallabDenoise(): - LocallabTool(this, "Locallab Denoise", M("TP_LOCALLAB_DENOIS"), true, MaskNone), + LocallabTool(this, M("TP_LOCALLAB_DEN_TOOLNAME"), M("TP_LOCALLAB_DENOIS"), true, MaskNone), // Denoise specific widgets noiselumf0(Gtk::manage(new Adjuster(M("TP_LOCALLAB_NOISELUMFINEZERO"), MINCHRO, MAXCHRO, 1, 0))), @@ -2081,6 +2101,8 @@ void LocallabDenoise::read(const rtengine::procparams::ProcParams* pp, const Par if (index < (int)pp->locallab.spots.size()) { spotName = pp->locallab.spots.at(index).name; // Update spot name according to selected spot + exp->set_visible(pp->locallab.spots.at(index).visidenoi); + exp->setEnabled(pp->locallab.spots.at(index).expdenoi); noiselumf0->setValue(pp->locallab.spots.at(index).noiselumf0); noiselumf->setValue(pp->locallab.spots.at(index).noiselumf); @@ -2108,6 +2130,9 @@ void LocallabDenoise::write(rtengine::procparams::ProcParams* pp, ParamsEdited* if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expdenoi = exp->getEnabled(); + + pp->locallab.spots.at(index).visidenoi = exp->get_visible(); + pp->locallab.spots.at(index).noiselumf0 = noiselumf0->getIntValue(); pp->locallab.spots.at(index).noiselumf = noiselumf->getIntValue(); pp->locallab.spots.at(index).noiselumf2 = noiselumf2->getIntValue(); diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index ada34b8ad..7d7f3a5a8 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -955,6 +955,7 @@ void ParamsEdited::initFrom(const std::vector& 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).visicolor = locallab.spots.at(j).visicolor && pSpot.visicolor == otherSpot.visicolor; locallab.spots.at(j).expcolor = locallab.spots.at(j).expcolor && pSpot.expcolor == otherSpot.expcolor; locallab.spots.at(j).curvactiv = locallab.spots.at(j).curvactiv && pSpot.curvactiv == otherSpot.curvactiv; locallab.spots.at(j).lightness = locallab.spots.at(j).lightness && pSpot.lightness == otherSpot.lightness; @@ -986,6 +987,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).HHmaskcurve = locallab.spots.at(j).HHmaskcurve && pSpot.HHmaskcurve == otherSpot.HHmaskcurve; locallab.spots.at(j).softradiuscol = locallab.spots.at(j).softradiuscol && pSpot.softradiuscol == otherSpot.softradiuscol; // Exposure + locallab.spots.at(j).visiexpose = locallab.spots.at(j).visiexpose && pSpot.visiexpose == otherSpot.visiexpose; locallab.spots.at(j).expexpose = locallab.spots.at(j).expexpose && pSpot.expexpose == otherSpot.expexpose; locallab.spots.at(j).expcomp = locallab.spots.at(j).expcomp && pSpot.expcomp == otherSpot.expcomp; locallab.spots.at(j).hlcompr = locallab.spots.at(j).hlcompr && pSpot.hlcompr == otherSpot.hlcompr; @@ -1015,6 +1017,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).balanexp = locallab.spots.at(j).balanexp && pSpot.balanexp == otherSpot.balanexp; locallab.spots.at(j).linear = locallab.spots.at(j).linear && pSpot.linear == otherSpot.linear; // Shadow highlight + locallab.spots.at(j).visishadhigh = locallab.spots.at(j).visishadhigh && pSpot.visishadhigh == otherSpot.visishadhigh; 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; @@ -1034,6 +1037,7 @@ 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; // Vibrance + locallab.spots.at(j).visivibrance = locallab.spots.at(j).visivibrance && pSpot.visivibrance == otherSpot.visivibrance; 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; locallab.spots.at(j).pastels = locallab.spots.at(j).pastels && pSpot.pastels == otherSpot.pastels; @@ -1044,12 +1048,14 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).sensiv = locallab.spots.at(j).sensiv && pSpot.sensiv == otherSpot.sensiv; locallab.spots.at(j).skintonescurve = locallab.spots.at(j).skintonescurve && pSpot.skintonescurve == otherSpot.skintonescurve; // Soft Light + locallab.spots.at(j).visisoft = locallab.spots.at(j).visisoft && pSpot.visisoft == otherSpot.visisoft; 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; locallab.spots.at(j).sensisf = locallab.spots.at(j).sensisf && pSpot.sensisf == otherSpot.sensisf; locallab.spots.at(j).laplace = locallab.spots.at(j).laplace && pSpot.laplace == otherSpot.laplace; locallab.spots.at(j).softMethod = locallab.spots.at(j).softMethod && pSpot.softMethod == otherSpot.softMethod; // Blur & Noise + locallab.spots.at(j).visiblur = locallab.spots.at(j).visiblur && pSpot.visiblur == otherSpot.visiblur; locallab.spots.at(j).expblur = locallab.spots.at(j).expblur && pSpot.expblur == otherSpot.expblur; locallab.spots.at(j).radius = locallab.spots.at(j).radius && pSpot.radius == otherSpot.radius; locallab.spots.at(j).strength = locallab.spots.at(j).strength && pSpot.strength == otherSpot.strength; @@ -1057,6 +1063,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).blurMethod = locallab.spots.at(j).blurMethod && pSpot.blurMethod == otherSpot.blurMethod; locallab.spots.at(j).activlum = locallab.spots.at(j).activlum && pSpot.activlum == otherSpot.activlum; // Tone Mapping + locallab.spots.at(j).visitonemap = locallab.spots.at(j).visitonemap && pSpot.visitonemap == otherSpot.visitonemap; locallab.spots.at(j).exptonemap = locallab.spots.at(j).exptonemap && pSpot.exptonemap == otherSpot.exptonemap; locallab.spots.at(j).stren = locallab.spots.at(j).stren && pSpot.stren == otherSpot.stren; locallab.spots.at(j).gamma = locallab.spots.at(j).gamma && pSpot.gamma == otherSpot.gamma; @@ -1078,6 +1085,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).gammasktm = locallab.spots.at(j).gammasktm && pSpot.gammasktm == otherSpot.gammasktm; locallab.spots.at(j).slomasktm = locallab.spots.at(j).slomasktm && pSpot.slomasktm == otherSpot.slomasktm; // Retinex + locallab.spots.at(j).visireti = locallab.spots.at(j).visireti && pSpot.visireti == otherSpot.visireti; locallab.spots.at(j).expreti = locallab.spots.at(j).expreti && pSpot.expreti == otherSpot.expreti; locallab.spots.at(j).retinexMethod = locallab.spots.at(j).retinexMethod && pSpot.retinexMethod == otherSpot.retinexMethod; locallab.spots.at(j).str = locallab.spots.at(j).str && pSpot.str == otherSpot.str; @@ -1106,6 +1114,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).limd = locallab.spots.at(j).limd && pSpot.limd == otherSpot.limd; locallab.spots.at(j).fftwreti = locallab.spots.at(j).fftwreti && pSpot.fftwreti == otherSpot.fftwreti; // Sharpening + locallab.spots.at(j).visisharp = locallab.spots.at(j).visisharp && pSpot.visisharp == otherSpot.visisharp; locallab.spots.at(j).expsharp = locallab.spots.at(j).expsharp && pSpot.expsharp == otherSpot.expsharp; locallab.spots.at(j).sharcontrast = locallab.spots.at(j).sharcontrast && pSpot.sharcontrast == otherSpot.sharcontrast; locallab.spots.at(j).sharradius = locallab.spots.at(j).sharradius && pSpot.sharradius == otherSpot.sharradius; @@ -1116,6 +1125,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).sensisha = locallab.spots.at(j).sensisha && pSpot.sensisha == otherSpot.sensisha; locallab.spots.at(j).inverssha = locallab.spots.at(j).inverssha && pSpot.inverssha == otherSpot.inverssha; // Local Contrast + locallab.spots.at(j).visicontrast = locallab.spots.at(j).visicontrast && pSpot.visicontrast == otherSpot.visicontrast; locallab.spots.at(j).expcontrast = locallab.spots.at(j).expcontrast && pSpot.expcontrast == otherSpot.expcontrast; locallab.spots.at(j).lcradius = locallab.spots.at(j).lcradius && pSpot.lcradius == otherSpot.lcradius; locallab.spots.at(j).lcamount = locallab.spots.at(j).lcamount && pSpot.lcamount == otherSpot.lcamount; @@ -1128,6 +1138,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).localcontMethod = locallab.spots.at(j).localcontMethod && pSpot.localcontMethod == otherSpot.localcontMethod; locallab.spots.at(j).locwavcurve = locallab.spots.at(j).locwavcurve && pSpot.locwavcurve == otherSpot.locwavcurve; // Contrast by detail levels + locallab.spots.at(j).visicbdl = locallab.spots.at(j).visicbdl && pSpot.visicbdl == otherSpot.visicbdl; locallab.spots.at(j).expcbdl = locallab.spots.at(j).expcbdl && pSpot.expcbdl == otherSpot.expcbdl; for (int k = 0; k < 6; k++) { @@ -1151,6 +1162,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.spots.at(j).LLmaskcbcurve = locallab.spots.at(j).LLmaskcbcurve && pSpot.LLmaskcbcurve == otherSpot.LLmaskcbcurve; locallab.spots.at(j).HHmaskcbcurve = locallab.spots.at(j).HHmaskcbcurve && pSpot.HHmaskcbcurve == otherSpot.HHmaskcbcurve; // Denoise + locallab.spots.at(j).visidenoi = locallab.spots.at(j).visidenoi && pSpot.visidenoi == otherSpot.visidenoi; locallab.spots.at(j).expdenoi = locallab.spots.at(j).expdenoi && pSpot.expdenoi == otherSpot.expdenoi; locallab.spots.at(j).noiselumf = locallab.spots.at(j).noiselumf && pSpot.noiselumf == otherSpot.noiselumf; locallab.spots.at(j).noiselumf0 = locallab.spots.at(j).noiselumf0 && pSpot.noiselumf0 == otherSpot.noiselumf0; @@ -2687,6 +2699,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Color & Light + if (locallab.spots.at(i).visicolor) { + toEdit.locallab.spots.at(i).visicolor = mods.locallab.spots.at(i).visicolor; + } + if (locallab.spots.at(i).expcolor) { toEdit.locallab.spots.at(i).expcolor = mods.locallab.spots.at(i).expcolor; } @@ -2808,6 +2824,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Exposure + if (locallab.spots.at(i).visiexpose) { + toEdit.locallab.spots.at(i).visiexpose = mods.locallab.spots.at(i).visiexpose; + } + if (locallab.spots.at(i).expexpose) { toEdit.locallab.spots.at(i).expexpose = mods.locallab.spots.at(i).expexpose; } @@ -2917,6 +2937,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Shadow highlight + if (locallab.spots.at(i).visishadhigh) { + toEdit.locallab.spots.at(i).visishadhigh = mods.locallab.spots.at(i).visishadhigh; + } + if (locallab.spots.at(i).expshadhigh) { toEdit.locallab.spots.at(i).expshadhigh = mods.locallab.spots.at(i).expshadhigh; } @@ -2990,6 +3014,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Vibrance + if (locallab.spots.at(i).visivibrance) { + toEdit.locallab.spots.at(i).visivibrance = mods.locallab.spots.at(i).visivibrance; + } + if (locallab.spots.at(i).expvibrance) { toEdit.locallab.spots.at(i).expvibrance = mods.locallab.spots.at(i).expvibrance; } @@ -3027,6 +3055,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Soft Light + if (locallab.spots.at(i).visisoft) { + toEdit.locallab.spots.at(i).visisoft = mods.locallab.spots.at(i).visisoft; + } + if (locallab.spots.at(i).expsoft) { toEdit.locallab.spots.at(i).expsoft = mods.locallab.spots.at(i).expsoft; } @@ -3048,6 +3080,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Blur & Noise + if (locallab.spots.at(i).visiblur) { + toEdit.locallab.spots.at(i).visiblur = mods.locallab.spots.at(i).visiblur; + } + if (locallab.spots.at(i).expblur) { toEdit.locallab.spots.at(i).expblur = mods.locallab.spots.at(i).expblur; } @@ -3073,6 +3109,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Tone Mapping + if (locallab.spots.at(i).visitonemap) { + toEdit.locallab.spots.at(i).visitonemap = mods.locallab.spots.at(i).visitonemap; + } + if (locallab.spots.at(i).exptonemap) { toEdit.locallab.spots.at(i).exptonemap = mods.locallab.spots.at(i).exptonemap; } @@ -3154,6 +3194,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Retinex + if (locallab.spots.at(i).visireti) { + toEdit.locallab.spots.at(i).visireti = mods.locallab.spots.at(i).visireti; + } + if (locallab.spots.at(i).expreti) { toEdit.locallab.spots.at(i).expreti = mods.locallab.spots.at(i).expreti; } @@ -3263,6 +3307,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Sharpening + if (locallab.spots.at(i).visisharp) { + toEdit.locallab.spots.at(i).visisharp = mods.locallab.spots.at(i).visisharp; + } + if (locallab.spots.at(i).expsharp) { toEdit.locallab.spots.at(i).expsharp = mods.locallab.spots.at(i).expsharp; } @@ -3300,6 +3348,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Local Contrast + if (locallab.spots.at(i).visicontrast) { + toEdit.locallab.spots.at(i).visicontrast = mods.locallab.spots.at(i).visicontrast; + } + if (locallab.spots.at(i).expcontrast) { toEdit.locallab.spots.at(i).expcontrast = mods.locallab.spots.at(i).expcontrast; } @@ -3345,6 +3397,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Contrast by detail levels + if (locallab.spots.at(i).visicbdl) { + toEdit.locallab.spots.at(i).visicbdl = mods.locallab.spots.at(i).visicbdl; + } + if (locallab.spots.at(i).expcbdl) { toEdit.locallab.spots.at(i).expcbdl = mods.locallab.spots.at(i).expcbdl; } @@ -3420,6 +3476,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng } // Denoise + if (locallab.spots.at(i).visidenoi) { + toEdit.locallab.spots.at(i).visidenoi = mods.locallab.spots.at(i).visidenoi; + } + if (locallab.spots.at(i).expdenoi) { toEdit.locallab.spots.at(i).expdenoi = mods.locallab.spots.at(i).expdenoi; } @@ -4460,6 +4520,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : transitgrad(v), avoid(v), // Color & Light + visicolor(v), expcolor(v), curvactiv(v), lightness(v), @@ -4491,6 +4552,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : HHmaskcurve(v), softradiuscol(v), // Exposure + visiexpose(v), expexpose(v), expcomp(v), hlcompr(v), @@ -4520,6 +4582,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : balanexp(v), linear(v), // Shadow highlight + visishadhigh(v), expshadhigh(v), highlights(v), h_tonalwidth(v), @@ -4539,6 +4602,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gammaskSH(v), slomaskSH(v), // Vibrance + visivibrance(v), expvibrance(v), saturated(v), pastels(v), @@ -4549,12 +4613,14 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : sensiv(v), skintonescurve(v), // Soft Light + visisoft(v), expsoft(v), streng(v), sensisf(v), laplace(v), softMethod(v), // Blur & Noise + visiblur(v), expblur(v), radius(v), strength(v), @@ -4562,6 +4628,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : blurMethod(v), activlum(v), // Tone Mapping + visitonemap(v), exptonemap(v), stren(v), gamma(v), @@ -4583,6 +4650,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : gammasktm(v), slomasktm(v), // Retinex + visireti(v), expreti(v), retinexMethod(v), str(v), @@ -4611,6 +4679,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : limd(v), fftwreti(v), // Sharpening + visisharp(v), expsharp(v), sharcontrast(v), sharradius(v), @@ -4621,6 +4690,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : sensisha(v), inverssha(v), // Local Contrast + visicontrast(v), expcontrast(v), lcradius(v), lcamount(v), @@ -4632,6 +4702,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : fftwlc(v), localcontMethod(v), // Contrast by detail levels + visicbdl(v), expcbdl(v), mult{v, v, v, v, v, v}, chromacbdl(v), @@ -4651,6 +4722,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : LLmaskcbcurve(v), HHmaskcbcurve(v), // Denoise + visidenoi(v), expdenoi(v), noiselumf(v), noiselumf0(v), @@ -4693,6 +4765,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) transitgrad = v; avoid = v; // Color & Light + visicolor = v; expcolor = v; curvactiv = v; lightness = v; @@ -4724,6 +4797,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) HHmaskcurve = v; softradiuscol = v; // Exposure + visiexpose = v; expexpose = v; expcomp = v; hlcompr = v; @@ -4753,6 +4827,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) balanexp = v; linear = v; // Shadow highlight + visishadhigh = v; expshadhigh = v; highlights = v; h_tonalwidth = v; @@ -4772,6 +4847,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gammaskSH = v; slomaskSH = v; // Vibrance + visivibrance = v; expvibrance = v; saturated = v; pastels = v; @@ -4782,12 +4858,14 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) sensiv = v; skintonescurve = v; // Soft Light + visisoft = v; expsoft = v; streng = v; sensisf = v; laplace = v; softMethod = v; // Blur & Noise + visiblur = v; expblur = v; radius = v; strength = v; @@ -4795,6 +4873,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) blurMethod = v; activlum = v; // Tone Mapping + visitonemap = v; exptonemap = v; stren = v; gamma = v; @@ -4816,6 +4895,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) gammasktm = v; slomasktm = v; // Retinex + visireti = v; expreti = v; retinexMethod = v; str = v; @@ -4844,6 +4924,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) limd = v; fftwreti = v; // Sharpening + visisharp = v; expsharp = v; sharcontrast = v; sharradius = v; @@ -4854,6 +4935,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) sensisha = v; inverssha = v; // Local Contrast + visicontrast = v; expcontrast = v; lcradius = v; lcamount = v; @@ -4867,6 +4949,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) locwavcurve = v; locwavcurve = v; // Contrast by detail levels + visicbdl = v; expcbdl = v; for (int i = 0; i < 6; i++) { @@ -4890,6 +4973,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) LLmaskcbcurve = v; HHmaskcbcurve = v; // Denoise + visidenoi = v; expdenoi = v; noiselumf = v; noiselumf0 = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4f9595006..4a9d1fbf0 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -378,6 +378,7 @@ public: bool transitgrad; bool avoid; // Color & Light + bool visicolor; bool expcolor; bool curvactiv; bool lightness; @@ -409,6 +410,7 @@ public: bool HHmaskcurve; bool softradiuscol; // Exposure + bool visiexpose; bool expexpose; bool expcomp; bool hlcompr; @@ -438,6 +440,7 @@ public: bool balanexp; bool linear; // Shadow highlight + bool visishadhigh; bool expshadhigh; bool highlights; bool h_tonalwidth; @@ -457,6 +460,7 @@ public: bool gammaskSH; bool slomaskSH; // Vibrance + bool visivibrance; bool expvibrance; bool saturated; bool pastels; @@ -467,12 +471,14 @@ public: bool sensiv; bool skintonescurve; // Soft Light + bool visisoft; bool expsoft; bool streng; bool sensisf; bool laplace; bool softMethod; // Blur & Noise + bool visiblur; bool expblur; bool radius; bool strength; @@ -480,6 +486,7 @@ public: bool blurMethod; bool activlum; // Tone Mapping + bool visitonemap; bool exptonemap; bool stren; bool gamma; @@ -501,6 +508,7 @@ public: bool gammasktm; bool slomasktm; // Retinex + bool visireti; bool expreti; bool retinexMethod; bool str; @@ -529,6 +537,7 @@ public: bool limd; bool fftwreti; // Sharpening + bool visisharp; bool expsharp; bool sharcontrast; bool sharradius; @@ -539,6 +548,7 @@ public: bool sensisha; bool inverssha; // Local Contrast + bool visicontrast; bool expcontrast; bool lcradius; bool lcamount; @@ -551,6 +561,7 @@ public: bool localcontMethod; bool locwavcurve; // Contrast by detail levels + bool visicbdl; bool expcbdl; bool mult[6]; bool chromacbdl; @@ -569,8 +580,8 @@ public: bool CCmaskcbcurve; bool LLmaskcbcurve; bool HHmaskcbcurve; - // Denoise + bool visidenoi; bool expdenoi; bool noiselumf; bool noiselumf0;