diff --git a/rtdata/languages/default b/rtdata/languages/default index 185a2d993..d9d7557f4 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -1157,6 +1157,8 @@ HISTORY_MSG_916;Local - Residual wavelet shadows HISTORY_MSG_917;Local - Residual wavelet shadows threshold HISTORY_MSG_918;Local - Residual wavelet highlights HISTORY_MSG_919;Local - Residual wavelet highlights threshold +HISTORY_MSG_920;Local - Tool complexity mode +HISTORY_MSG_921;Local - Tool complexity mode HISTORY_MSG_CAT02PRESET;Cat02 automatic preset HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction @@ -2545,6 +2547,8 @@ TP_LOCALLAB_MERTWO;Substract TP_LOCALLAB_METHOD_TOOLTIP;'Enhanced + chroma denoise' significantly increases processing times.\nBut reduce artifacts. TP_LOCALLAB_MLABEL;Restored datas Min=%1 Max=%2 (Clip - Offset) TP_LOCALLAB_MLABEL_TOOLTIP;'Should be' near min=0 max=32768 but others values are possible.\nYou can act on Clip Restored datas and Offset to normalize.\n\nRestored image with no mixture. +TP_LOCALLAB_MODE_EXPERT;Expert +TP_LOCALLAB_MODE_NORMAL;Normal TP_LOCALLAB_MRFIV;Background TP_LOCALLAB_MRFOU;Previous Spot TP_LOCALLAB_MRONE;None diff --git a/rtengine/procevents.h b/rtengine/procevents.h index 5584ac9f8..1971e4ff6 100644 --- a/rtengine/procevents.h +++ b/rtengine/procevents.h @@ -942,6 +942,8 @@ enum ProcEventCode { Evlocallabresidshathr = 916, Evlocallabresidhi = 917, Evlocallabresidhithr = 918, + EvlocallabcomplexityWithRefresh = 919, + EvlocallabcomplexityWithoutRefresh = 920, NUMOFEVENTS }; diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 60333b2f6..cdd76aa60 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2540,6 +2540,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Color & Light visicolor(false), expcolor(false), + complexcolor(0), curvactiv(false), lightness(0), contrast(0), @@ -2756,6 +2757,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Exposure visiexpose(false), expexpose(false), + complexexpose(0), expcomp(0.0), hlcompr(0), hlcomprthresh(0), @@ -2851,6 +2853,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Shadow highlight visishadhigh(false), expshadhigh(false), + complexshadhigh(0), shMethod("std"), multsh{0, 0, 0, 0, 0}, highlights(0), @@ -2930,6 +2933,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Vibrance visivibrance(false), expvibrance(false), + complexvibrance(0), saturated(0), pastels(0), warm(0), @@ -3007,6 +3011,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Soft Light visisoft(false), expsoft(false), + complexsoft(0), streng(0), sensisf(15), laplace(25.), @@ -3014,6 +3019,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Blur & Noise visiblur(false), expblur(false), + complexblur(0), radius(1.5), strength(0), sensibn(40), @@ -3135,6 +3141,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Tone Mapping visitonemap(false), exptonemap(false), + complextonemap(0), stren(0.5), gamma(1.0), estop(1.4), @@ -3208,6 +3215,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Retinex visireti(false), expreti(false), + complexreti(0), retinexMethod("high"), str(0.2), chrrt(0.0), @@ -3321,6 +3329,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Sharpening visisharp(false), expsharp(false), + complexsharp(0), sharcontrast(20), sharradius(0.75), sharamount(100), @@ -3332,6 +3341,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Local Contrast visicontrast(false), expcontrast(false), + complexcontrast(0), lcradius(80), lcamount(0.0), lcdarkness(1.0), @@ -3526,6 +3536,7 @@ LocallabParams::LocallabSpot::LocallabSpot() : // Contrast by detail levels visicbdl(false), expcbdl(false), + complexcbdl(0), mult{1.0, 1.0, 1.0, 1.0, 1.0, 1.0}, chromacbdl(0.), threshold(0.2), @@ -3650,6 +3661,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Color & Light && visicolor == other.visicolor && expcolor == other.expcolor + && complexcolor == other.complexcolor && curvactiv == other.curvactiv && lightness == other.lightness && contrast == other.contrast @@ -3712,6 +3724,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Exposure && visiexpose == other.visiexpose && expexpose == other.expexpose + && complexexpose == other.complexexpose && expcomp == other.expcomp && hlcompr == other.hlcompr && hlcomprthresh == other.hlcomprthresh @@ -3754,6 +3767,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Shadow highlight && visishadhigh == other.visishadhigh && expshadhigh == other.expshadhigh + && complexshadhigh == other.complexshadhigh && shMethod == other.shMethod && [this, &other]() -> bool { @@ -3793,6 +3807,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Vibrance && visivibrance == other.visivibrance && expvibrance == other.expvibrance + && complexvibrance == other.complexvibrance && saturated == other.saturated && pastels == other.pastels && warm == other.warm @@ -3820,6 +3835,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Soft Light && visisoft == other.visisoft && expsoft == other.expsoft + && complexsoft == other.complexsoft && streng == other.streng && sensisf == other.sensisf && laplace == other.laplace @@ -3827,6 +3843,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Blur & Noise && visiblur == other.visiblur && expblur == other.expblur + && complexblur == other.complexblur && radius == other.radius && strength == other.strength && sensibn == other.sensibn @@ -3876,6 +3893,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Tone Mapping && visitonemap == other.visitonemap && exptonemap == other.exptonemap + && complextonemap == other.complextonemap && stren == other.stren && gamma == other.gamma && estop == other.estop @@ -3901,6 +3919,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Retinex && visireti == other.visireti && expreti == other.expreti + && complexreti == other.complexreti && retinexMethod == other.retinexMethod && str == other.str && chrrt == other.chrrt @@ -3938,6 +3957,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Sharpening && visisharp == other.visisharp && expsharp == other.expsharp + && complexsharp == other.complexsharp && sharcontrast == other.sharcontrast && sharradius == other.sharradius && sharamount == other.sharamount @@ -3949,6 +3969,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Local contrast && visicontrast == other.visicontrast && expcontrast == other.expcontrast + && complexcontrast == other.complexcontrast && lcradius == other.lcradius && lcamount == other.lcamount && lcdarkness == other.lcdarkness @@ -4019,6 +4040,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const // Constrast by detail levels && visicbdl == other.visicbdl && expcbdl == other.expcbdl + && complexcbdl == other.complexcbdl && [this, &other]() -> bool { for (int i = 0; i < 6; ++i) { @@ -5091,6 +5113,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Color & Light if ((!pedited || spot_edited->visicolor) && spot.visicolor) { saveToKeyfile(!pedited || spot_edited->expcolor, "Locallab", "Expcolor_" + index_str, spot.expcolor, keyFile); + saveToKeyfile(!pedited || spot_edited->complexcolor, "Locallab", "Complexcolor_" + index_str, spot.complexcolor, keyFile); saveToKeyfile(!pedited || spot_edited->curvactiv, "Locallab", "Curvactiv_" + index_str, spot.curvactiv, keyFile); saveToKeyfile(!pedited || spot_edited->lightness, "Locallab", "Lightness_" + index_str, spot.lightness, keyFile); saveToKeyfile(!pedited || spot_edited->contrast, "Locallab", "Contrast_" + index_str, spot.contrast, keyFile); @@ -5153,6 +5176,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Exposure if ((!pedited || spot_edited->visiexpose) && spot.visiexpose) { saveToKeyfile(!pedited || spot_edited->expexpose, "Locallab", "Expexpose_" + index_str, spot.expexpose, keyFile); + saveToKeyfile(!pedited || spot_edited->complexexpose, "Locallab", "Complexexpose_" + index_str, spot.complexexpose, keyFile); saveToKeyfile(!pedited || spot_edited->expcomp, "Locallab", "Expcomp_" + index_str, spot.expcomp, keyFile); saveToKeyfile(!pedited || spot_edited->hlcompr, "Locallab", "Hlcompr_" + index_str, spot.hlcompr, keyFile); saveToKeyfile(!pedited || spot_edited->hlcomprthresh, "Locallab", "Hlcomprthresh_" + index_str, spot.hlcomprthresh, keyFile); @@ -5196,6 +5220,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Shadow highlight if ((!pedited || spot_edited->visishadhigh) && spot.visishadhigh) { saveToKeyfile(!pedited || spot_edited->expshadhigh, "Locallab", "Expshadhigh_" + index_str, spot.expshadhigh, keyFile); + saveToKeyfile(!pedited || spot_edited->complexshadhigh, "Locallab", "Complexshadhigh_" + index_str, spot.complexshadhigh, keyFile); saveToKeyfile(!pedited || spot_edited->shMethod, "Locallab", "ShMethod_" + index_str, spot.shMethod, keyFile); for (int j = 0; j < 5; j++) { @@ -5231,6 +5256,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Vibrance if ((!pedited || spot_edited->visivibrance) && spot.visivibrance) { saveToKeyfile(!pedited || spot_edited->expvibrance, "Locallab", "Expvibrance_" + index_str, spot.expvibrance, keyFile); + saveToKeyfile(!pedited || spot_edited->complexvibrance, "Locallab", "Complexvibrance_" + index_str, spot.complexvibrance, keyFile); saveToKeyfile(!pedited || spot_edited->saturated, "Locallab", "Saturated_" + index_str, spot.saturated, keyFile); saveToKeyfile(!pedited || spot_edited->pastels, "Locallab", "Pastels_" + index_str, spot.pastels, keyFile); saveToKeyfile(!pedited || spot_edited->warm, "Locallab", "Warm_" + index_str, spot.warm, keyFile); @@ -5259,6 +5285,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Soft Light if ((!pedited || spot_edited->visisoft) && spot.visisoft) { saveToKeyfile(!pedited || spot_edited->expsoft, "Locallab", "Expsoft_" + index_str, spot.expsoft, keyFile); + saveToKeyfile(!pedited || spot_edited->complexsoft, "Locallab", "Complexsoft_" + index_str, spot.complexsoft, keyFile); saveToKeyfile(!pedited || spot_edited->streng, "Locallab", "Streng_" + index_str, spot.streng, keyFile); saveToKeyfile(!pedited || spot_edited->sensisf, "Locallab", "Sensisf_" + index_str, spot.sensisf, keyFile); saveToKeyfile(!pedited || spot_edited->laplace, "Locallab", "Laplace_" + index_str, spot.laplace, keyFile); @@ -5267,6 +5294,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Blur & Noise if ((!pedited || spot_edited->visiblur) && spot.visiblur) { saveToKeyfile(!pedited || spot_edited->expblur, "Locallab", "Expblur_" + index_str, spot.expblur, keyFile); + saveToKeyfile(!pedited || spot_edited->complexblur, "Locallab", "Complexblur_" + index_str, spot.complexblur, keyFile); saveToKeyfile(!pedited || spot_edited->radius, "Locallab", "Radius_" + index_str, spot.radius, keyFile); saveToKeyfile(!pedited || spot_edited->strength, "Locallab", "Strength_" + index_str, spot.strength, keyFile); saveToKeyfile(!pedited || spot_edited->sensibn, "Locallab", "Sensibn_" + index_str, spot.sensibn, keyFile); @@ -5317,6 +5345,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Tone Mapping if ((!pedited || spot_edited->visitonemap) && spot.visitonemap) { saveToKeyfile(!pedited || spot_edited->exptonemap, "Locallab", "Exptonemap_" + index_str, spot.exptonemap, keyFile); + saveToKeyfile(!pedited || spot_edited->complextonemap, "Locallab", "Complextonemap_" + index_str, spot.complextonemap, keyFile); saveToKeyfile(!pedited || spot_edited->stren, "Locallab", "Stren_" + index_str, spot.stren, keyFile); saveToKeyfile(!pedited || spot_edited->gamma, "Locallab", "Gamma_" + index_str, spot.gamma, keyFile); saveToKeyfile(!pedited || spot_edited->estop, "Locallab", "Estop_" + index_str, spot.estop, keyFile); @@ -5343,6 +5372,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Retinex if ((!pedited || spot_edited->visireti) && spot.visireti) { saveToKeyfile(!pedited || spot_edited->expreti, "Locallab", "Expreti_" + index_str, spot.expreti, keyFile); + saveToKeyfile(!pedited || spot_edited->complexreti, "Locallab", "Complexreti_" + index_str, spot.complexreti, keyFile); saveToKeyfile(!pedited || spot_edited->retinexMethod, "Locallab", "retinexMethod_" + index_str, spot.retinexMethod, keyFile); saveToKeyfile(!pedited || spot_edited->str, "Locallab", "Str_" + index_str, spot.str, keyFile); saveToKeyfile(!pedited || spot_edited->chrrt, "Locallab", "Chrrt_" + index_str, spot.chrrt, keyFile); @@ -5381,6 +5411,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Sharpening if ((!pedited || spot_edited->visisharp) && spot.visisharp) { saveToKeyfile(!pedited || spot_edited->expsharp, "Locallab", "Expsharp_" + index_str, spot.expsharp, keyFile); + saveToKeyfile(!pedited || spot_edited->complexsharp, "Locallab", "Complexsharp_" + index_str, spot.complexsharp, keyFile); saveToKeyfile(!pedited || spot_edited->sharcontrast, "Locallab", "Sharcontrast_" + index_str, spot.sharcontrast, keyFile); saveToKeyfile(!pedited || spot_edited->sharradius, "Locallab", "Sharradius_" + index_str, spot.sharradius, keyFile); saveToKeyfile(!pedited || spot_edited->sharamount, "Locallab", "Sharamount_" + index_str, spot.sharamount, keyFile); @@ -5393,6 +5424,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Local Contrast if ((!pedited || spot_edited->visicontrast) && spot.visicontrast) { saveToKeyfile(!pedited || spot_edited->expcontrast, "Locallab", "Expcontrast_" + index_str, spot.expcontrast, keyFile); + saveToKeyfile(!pedited || spot_edited->complexcontrast, "Locallab", "Complexcontrast_" + index_str, spot.complexcontrast, keyFile); saveToKeyfile(!pedited || spot_edited->lcradius, "Locallab", "Lcradius_" + index_str, spot.lcradius, keyFile); saveToKeyfile(!pedited || spot_edited->lcamount, "Locallab", "Lcamount_" + index_str, spot.lcamount, keyFile); saveToKeyfile(!pedited || spot_edited->lcdarkness, "Locallab", "Lcdarkness_" + index_str, spot.lcdarkness, keyFile); @@ -5464,6 +5496,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo // Contrast by detail levels if ((!pedited || spot_edited->visicbdl) && spot.visicbdl) { saveToKeyfile(!pedited || spot_edited->expcbdl, "Locallab", "Expcbdl_" + index_str, spot.expcbdl, keyFile); + saveToKeyfile(!pedited || spot_edited->complexcbdl, "Locallab", "Complexcbdl_" + index_str, spot.complexcbdl, keyFile); for (int j = 0; j < 6; j++) { saveToKeyfile(!pedited || spot_edited->mult[j], "Locallab", "Mult" + std::to_string(j) + "_" + index_str, spot.mult[j], keyFile); @@ -6685,6 +6718,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visicolor = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexcolor_" + index_str, pedited, spot.complexcolor, spotEdited.complexcolor); assignFromKeyfile(keyFile, "Locallab", "Curvactiv_" + index_str, pedited, spot.curvactiv, spotEdited.curvactiv); assignFromKeyfile(keyFile, "Locallab", "Lightness_" + index_str, pedited, spot.lightness, spotEdited.lightness); assignFromKeyfile(keyFile, "Locallab", "Contrast_" + index_str, pedited, spot.contrast, spotEdited.contrast); @@ -6761,6 +6795,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visiexpose = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexexpose_" + index_str, pedited, spot.complexexpose, spotEdited.complexexpose); assignFromKeyfile(keyFile, "Locallab", "Expcomp_" + index_str, pedited, spot.expcomp, spotEdited.expcomp); assignFromKeyfile(keyFile, "Locallab", "Hlcompr_" + index_str, pedited, spot.hlcompr, spotEdited.hlcompr); assignFromKeyfile(keyFile, "Locallab", "Hlcomprthresh_" + index_str, pedited, spot.hlcomprthresh, spotEdited.hlcomprthresh); @@ -6807,6 +6842,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visishadhigh = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexshadhigh_" + index_str, pedited, spot.complexshadhigh, spotEdited.complexshadhigh); assignFromKeyfile(keyFile, "Locallab", "ShMethod_" + index_str, pedited, spot.shMethod, spotEdited.shMethod); for (int j = 0; j < 5; j ++) { @@ -6847,6 +6883,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visivibrance = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexvibrance_" + index_str, pedited, spot.complexvibrance, spotEdited.complexvibrance); assignFromKeyfile(keyFile, "Locallab", "Saturated_" + index_str, pedited, spot.saturated, spotEdited.saturated); assignFromKeyfile(keyFile, "Locallab", "Pastels_" + index_str, pedited, spot.pastels, spotEdited.pastels); assignFromKeyfile(keyFile, "Locallab", "Warm_" + index_str, pedited, spot.warm, spotEdited.warm); @@ -6888,6 +6925,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visisoft = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexsoft_" + index_str, pedited, spot.complexsoft, spotEdited.complexsoft); assignFromKeyfile(keyFile, "Locallab", "Streng_" + index_str, pedited, spot.streng, spotEdited.streng); assignFromKeyfile(keyFile, "Locallab", "Sensisf_" + index_str, pedited, spot.sensisf, spotEdited.sensisf); assignFromKeyfile(keyFile, "Locallab", "Laplace_" + index_str, pedited, spot.laplace, spotEdited.laplace); @@ -6899,6 +6937,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visiblur = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexblur_" + index_str, pedited, spot.complexblur, spotEdited.complexblur); assignFromKeyfile(keyFile, "Locallab", "Radius_" + index_str, pedited, spot.radius, spotEdited.radius); assignFromKeyfile(keyFile, "Locallab", "Strength_" + index_str, pedited, spot.strength, spotEdited.strength); assignFromKeyfile(keyFile, "Locallab", "Sensibn_" + index_str, pedited, spot.sensibn, spotEdited.sensibn); @@ -6961,6 +7000,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visitonemap = true; } + assignFromKeyfile(keyFile, "Locallab", "Complextonemap_" + index_str, pedited, spot.complextonemap, spotEdited.complextonemap); assignFromKeyfile(keyFile, "Locallab", "Stren_" + index_str, pedited, spot.stren, spotEdited.stren); assignFromKeyfile(keyFile, "Locallab", "Gamma_" + index_str, pedited, spot.gamma, spotEdited.gamma); assignFromKeyfile(keyFile, "Locallab", "Estop_" + index_str, pedited, spot.estop, spotEdited.estop); @@ -6990,6 +7030,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visireti = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexreti_" + index_str, pedited, spot.complexreti, spotEdited.complexreti); assignFromKeyfile(keyFile, "Locallab", "retinexMethod_" + index_str, pedited, spot.retinexMethod, spotEdited.retinexMethod); assignFromKeyfile(keyFile, "Locallab", "Str_" + index_str, pedited, spot.str, spotEdited.str); assignFromKeyfile(keyFile, "Locallab", "Chrrt_" + index_str, pedited, spot.chrrt, spotEdited.chrrt); @@ -7031,6 +7072,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visisharp = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexsharp_" + index_str, pedited, spot.complexsharp, spotEdited.complexsharp); assignFromKeyfile(keyFile, "Locallab", "Sharcontrast_" + index_str, pedited, spot.sharcontrast, spotEdited.sharcontrast); assignFromKeyfile(keyFile, "Locallab", "Sharradius_" + index_str, pedited, spot.sharradius, spotEdited.sharradius); assignFromKeyfile(keyFile, "Locallab", "Sharamount_" + index_str, pedited, spot.sharamount, spotEdited.sharamount); @@ -7046,6 +7088,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visicontrast = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexcontrast_" + index_str, pedited, spot.complexcontrast, spotEdited.complexcontrast); assignFromKeyfile(keyFile, "Locallab", "Lcradius_" + index_str, pedited, spot.lcradius, spotEdited.lcradius); assignFromKeyfile(keyFile, "Locallab", "Lcamount_" + index_str, pedited, spot.lcamount, spotEdited.lcamount); assignFromKeyfile(keyFile, "Locallab", "Lcdarkness_" + index_str, pedited, spot.lcdarkness, spotEdited.lcdarkness); @@ -7131,6 +7174,8 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) spotEdited.visicbdl = true; } + assignFromKeyfile(keyFile, "Locallab", "Complexcbdl_" + index_str, pedited, spot.complexcbdl, spotEdited.complexcbdl); + for (int j = 0; j < 6; j ++) { assignFromKeyfile(keyFile, "Locallab", "Mult" + std::to_string(j) + "_" + index_str, pedited, spot.mult[j], spotEdited.mult[j]); } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index 2ec4b7f90..a1320ee5a 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -995,6 +995,7 @@ struct LocallabParams { // Color & Light bool visicolor; bool expcolor; + int complexcolor; bool curvactiv; int lightness; int contrast; @@ -1057,6 +1058,7 @@ struct LocallabParams { // Exposure bool visiexpose; bool expexpose; + int complexexpose; double expcomp; int hlcompr; int hlcomprthresh; @@ -1099,6 +1101,7 @@ struct LocallabParams { // Shadow highlight bool visishadhigh; bool expshadhigh; + int complexshadhigh; Glib::ustring shMethod; // std, tone int multsh[5]; int highlights; @@ -1130,6 +1133,7 @@ struct LocallabParams { // Vibrance bool visivibrance; bool expvibrance; + int complexvibrance; int saturated; int pastels; int warm; @@ -1157,6 +1161,7 @@ struct LocallabParams { // Soft Light bool visisoft; bool expsoft; + int complexsoft; int streng; int sensisf; double laplace; @@ -1164,6 +1169,7 @@ struct LocallabParams { // Blur & Noise bool visiblur; bool expblur; + int complexblur; double radius; int strength; int sensibn; @@ -1213,6 +1219,7 @@ struct LocallabParams { // Tone Mapping bool visitonemap; bool exptonemap; + int complextonemap; double stren; double gamma; double estop; @@ -1238,6 +1245,7 @@ struct LocallabParams { // Retinex bool visireti; bool expreti; + int complexreti; Glib::ustring retinexMethod; // low, uni, high double str; double chrrt; @@ -1275,6 +1283,7 @@ struct LocallabParams { // Sharpening bool visisharp; bool expsharp; + int complexsharp; int sharcontrast; double sharradius; int sharamount; @@ -1286,6 +1295,7 @@ struct LocallabParams { // Local Contrast bool visicontrast; bool expcontrast; + int complexcontrast; int lcradius; double lcamount; double lcdarkness; @@ -1356,6 +1366,7 @@ struct LocallabParams { // Contrast by detail levels bool visicbdl; bool expcbdl; + int complexcbdl; double mult[6]; double chromacbdl; double threshold; diff --git a/rtengine/refreshmap.cc b/rtengine/refreshmap.cc index 3fd6cebc9..c8654568d 100644 --- a/rtengine/refreshmap.cc +++ b/rtengine/refreshmap.cc @@ -938,14 +938,16 @@ int refreshmap[rtengine::NUMOFEVENTS] = { LUMINANCECURVE, // Evlocallabwaveshow LUMINANCECURVE, // EvLocallabSpotwavMethod LUMINANCECURVE, // EvlocallabchroMethod - LUMINANCECURVE, // Evlocallabstrbl + LUMINANCECURVE, // Evlocallabstrbl LUMINANCECURVE, // Evlocallabsigmadr LUMINANCECURVE, // Evlocallabsigmabl LUMINANCECURVE, // Evlocallabsigmaed LUMINANCECURVE, // Evlocallabresidsha LUMINANCECURVE, // Evlocallabresidshathr LUMINANCECURVE, // Evlocallabresidhi - LUMINANCECURVE // Evlocallabresidhithr + LUMINANCECURVE, // Evlocallabresidhithr + LUMINANCECURVE, // EvlocallabcomplexityWithRefresh + M_VOID // EvlocallabcomplexityWithoutRefresh }; diff --git a/rtgui/locallabtools.cc b/rtgui/locallabtools.cc index 289387759..7ee4b2268 100644 --- a/rtgui/locallabtools.cc +++ b/rtgui/locallabtools.cc @@ -119,12 +119,16 @@ static double blurRadius2Slider(double radius) } /* ==== LocallabTool ==== */ -LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11): +LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11, bool needMode): ToolPanel(toolName, need11), // LocallabTool parameters + needMode(needMode), isLocActivated(false), - locToolListener(nullptr) + locToolListener(nullptr), + + // LocallabTool generic widgets + complexity(Gtk::manage(new MyComboBoxText())) { const bool showtooltip = options.showtooltip; @@ -143,6 +147,18 @@ LocallabTool::LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustr removeEvBox->add(*removeImage); titleBox->pack_end(*removeEvBox, Gtk::PACK_SHRINK, 4); + if (needMode) { + complexity->append(M("TP_LOCALLAB_MODE_EXPERT")); + complexity->append(M("TP_LOCALLAB_MODE_NORMAL")); + complexity->set_active(0); + complexity->setPreferredWidth(100, -1); + complexityConn = complexity->signal_changed().connect(sigc::mem_fun(*this, &LocallabTool::complexityModeChanged)); + titleBox->pack_end(*complexity, Gtk::PACK_SHRINK, 2); + } + + Gtk::VSeparator* const separator = Gtk::manage(new Gtk::VSeparator()); + titleBox->pack_end(*separator, Gtk::PACK_SHRINK, 0); + if (need100Percent) { RTImage* titleImage = Gtk::manage(new RTImage("one-to-one-small.png")); @@ -290,12 +306,20 @@ void LocallabTool::disableListener() ToolPanel::disableListener(); enaExpConn.block(true); + + if (needMode) { + complexityConn.block(true); + } } void LocallabTool::enableListener() { ToolPanel::enableListener(); enaExpConn.block(false); + + if (needMode) { + complexityConn.block(false); + } } bool LocallabTool::on_remove_change(GdkEventButton* event) @@ -317,6 +341,32 @@ void LocallabTool::foldThemAll(GdkEventButton* event) } } +void LocallabTool::complexityModeChanged() +{ + if (complexity->get_active_row_number() == Normal) { // New selected mode is Normal one + // Convert tool widget parameters + convertParamToNormal(); + + // Update GUI based on new mode + updateGUIToMode(Normal); + + // Raise event with refreshing + if (listener) { + listener->panelChanged(EvlocallabcomplexityWithRefresh, + M("TP_LOCALLAB_MODE_NORMAL") + " (" + escapeHtmlChars(spotName) + ")"); + } + } else { // New selected mode is Expert one + // Update GUI based on new mode + updateGUIToMode(Expert); + + // Raise event without refreshing + if (listener) { + listener->panelChanged(EvlocallabcomplexityWithoutRefresh, + M("TP_LOCALLAB_MODE_EXPERT") + " (" + escapeHtmlChars(spotName) + ")"); + } + } +} + /* ==== LocallabColor ==== */ LocallabColor::LocallabColor(): LocallabTool(this, M("TP_LOCALLAB_COLOR_TOOLNAME"), M("TP_LOCALLAB_COFR"), false), @@ -375,8 +425,10 @@ LocallabColor::LocallabColor(): CCmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), LLmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), HHmaskshape(static_cast(maskCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), + struFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM")))), strumaskcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_STRUMASKCOL"), 0., 200., 0.1, 0.))), toolcol(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_TOOLCOL")))), + blurFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABBLURM")))), fftColorMask(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_FFTCOL_MASK")))), contcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_CONTCOL"), 0., 200., 0.5, 0.))), blurcol(Gtk::manage(new Adjuster(M("TP_LOCALLAB_BLURCOL"), 0.2, 100., 0.5, 0.2))), @@ -408,7 +460,6 @@ LocallabColor::LocallabColor(): const LocallabParams::LocallabSpot defSpot; const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Color & Light specific widgets curvactivConn = curvactiv->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::curvactivChanged)); @@ -701,10 +752,14 @@ LocallabColor::LocallabColor(): maskCurveEditorG->curveListComplete(); + struFrame->set_label_align(0.025, 0.5); + strumaskcol->setAdjusterListener(this); toolcolConn = toolcol->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::toolcolChanged)); + blurFrame->set_label_align(0.025, 0.5); + fftColorMaskConn = fftColorMask->signal_toggled().connect(sigc::mem_fun(*this, &LocallabColor::fftColorMaskChanged)); contcol->setAdjusterListener(this); @@ -794,24 +849,13 @@ LocallabColor::LocallabColor(): pack_start(*superFrame); pack_start(*sensi); pack_start(*structcol); - - if (complexsoft < 2) { - pack_start(*blurcolde); - pack_start(*softradiuscol); - } - + pack_start(*blurcolde); + pack_start(*softradiuscol); pack_start(*invers); ToolParamBlock* const gradcolBox = Gtk::manage(new ToolParamBlock()); gradcolBox->pack_start(*strcol); - - if (complexsoft < 2) { - gradcolBox->pack_start(*strcolab); - } - - if (complexsoft < 2) { - gradcolBox->pack_start(*strcolh); - } - + gradcolBox->pack_start(*strcolab); + gradcolBox->pack_start(*strcolh); gradcolBox->pack_start(*angcol); expgradcol->add(*gradcolBox, false); pack_start(*expgradcol, false, false); @@ -821,15 +865,11 @@ LocallabColor::LocallabColor(): qualcurvbox->pack_start(*qualitycurveMethod); curvBox->pack_start(*qualcurvbox); curvBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - - if (complexsoft < 2) { - curvBox->pack_start(*clCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - curvBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - curvBox->pack_start(*H2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - curvBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - curvBox->pack_start(*special); - } - + curvBox->pack_start(*clCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + curvBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + curvBox->pack_start(*H2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + curvBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + curvBox->pack_start(*special); expcurvcol->add(*curvBox, false); pack_start(*expcurvcol, false, false); ToolParamBlock* const mask7Box = Gtk::manage(new ToolParamBlock()); @@ -849,19 +889,11 @@ LocallabColor::LocallabColor(): gridmerBox->pack_start(*merlucol); gridmerFrame->add(*gridmerBox); mergecolBox->pack_start(*gridmerFrame); - - if (complexsoft < 2) { - merge1colFrame->add(*mergecolBox); - } - + merge1colFrame->add(*mergecolBox); mask7->pack_start(*merge1colFrame); mask7Box->pack_start(*mask7); expmaskcol1->add(*mask7Box, false); - - if (complexsoft < 2) { - pack_start(*expmaskcol1, false, false); - } - + pack_start(*expmaskcol1, false, false); Gtk::Frame* const mergecolFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_MERGECOLFRA"))); mergecolFrame->set_label_align(0.025, 0.5); ToolParamBlock* const maskcolBox = Gtk::manage(new ToolParamBlock()); @@ -869,63 +901,31 @@ LocallabColor::LocallabColor(): maskcolBox->pack_start(*showmaskcolMethodinv, Gtk::PACK_SHRINK, 4); maskcolBox->pack_start(*enaColorMask, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*maskCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - Gtk::Frame* const struFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABSTRUM"))); - struFrame->set_label_align(0.025, 0.5); ToolParamBlock* const strumBox = Gtk::manage(new ToolParamBlock()); - - if (complexsoft < 2) { - strumBox->pack_start(*strumaskcol); - strumBox->pack_start(*toolcol); - } - + strumBox->pack_start(*strumaskcol); + strumBox->pack_start(*toolcol); struFrame->add(*strumBox); - - if (complexsoft < 2) { - maskcolBox->pack_start(*struFrame, Gtk::PACK_SHRINK, 0); - } - - Gtk::Frame* const blurFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LABBLURM"))); - blurFrame->set_label_align(0.025, 0.5); + maskcolBox->pack_start(*struFrame, Gtk::PACK_SHRINK, 0); ToolParamBlock* const blurmBox = Gtk::manage(new ToolParamBlock()); - - if (complexsoft < 2) { - blurmBox->pack_start(*fftColorMask, Gtk::PACK_SHRINK, 0); - blurmBox->pack_start(*contcol); - blurmBox->pack_start(*blurcol); - } - + blurmBox->pack_start(*fftColorMask, Gtk::PACK_SHRINK, 0); + blurmBox->pack_start(*contcol); + blurmBox->pack_start(*blurcol); blurFrame->add(*blurmBox); - - if (complexsoft < 2) { - maskcolBox->pack_start(*blurFrame, Gtk::PACK_SHRINK, 0); - } - + maskcolBox->pack_start(*blurFrame, Gtk::PACK_SHRINK, 0); maskcolBox->pack_start(*blendmaskcol, Gtk::PACK_SHRINK, 0); Gtk::Frame* const toolcolFrame = Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_TOOLMASK"))); toolcolFrame->set_label_align(0.025, 0.5); ToolParamBlock* const toolcolBox = Gtk::manage(new ToolParamBlock()); toolcolBox->pack_start(*radmaskcol, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - toolcolBox->pack_start(*lapmaskcol, Gtk::PACK_SHRINK, 0); - } - + toolcolBox->pack_start(*lapmaskcol, Gtk::PACK_SHRINK, 0); toolcolBox->pack_start(*chromaskcol, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - toolcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0); - toolcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0); - toolcolBox->pack_start(*shadmaskcol, Gtk::PACK_SHRINK, 0); - toolcolBox->pack_start(*maskHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - } - + toolcolBox->pack_start(*gammaskcol, Gtk::PACK_SHRINK, 0); + toolcolBox->pack_start(*slomaskcol, Gtk::PACK_SHRINK, 0); + toolcolBox->pack_start(*shadmaskcol, Gtk::PACK_SHRINK, 0); + toolcolBox->pack_start(*maskHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor toolcolBox->pack_start(*mask2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - - if (complexsoft < 1) { - toolcolBox->pack_start(*mask2CurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolcolBox->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); - } - + toolcolBox->pack_start(*mask2CurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + toolcolBox->pack_start(*csThresholdcol, Gtk::PACK_SHRINK, 0); toolcolFrame->add(*toolcolBox); maskcolBox->pack_start(*toolcolFrame); mergecolFrame->add(*maskcolBox); @@ -1020,8 +1020,6 @@ void LocallabColor::enableListener() void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -1033,6 +1031,7 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param exp->set_visible(pp->locallab.spots.at(index).visicolor); exp->setEnabled(pp->locallab.spots.at(index).expcolor); + complexity->set_active(pp->locallab.spots.at(index).complexcolor); curvactiv->set_active(pp->locallab.spots.at(index).curvactiv); lightness->setValue(pp->locallab.spots.at(index).lightness); @@ -1053,26 +1052,12 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param strengthgrid->setValue(pp->locallab.spots.at(index).strengthgrid); sensi->setValue(pp->locallab.spots.at(index).sensi); structcol->setValue(pp->locallab.spots.at(index).structcol); - - if (complexsoft < 2) { - blurcolde->setValue(pp->locallab.spots.at(index).blurcolde); - softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol); - } else { - blurcolde->setValue(5.); - softradiuscol->setValue(0.); - } - + blurcolde->setValue(pp->locallab.spots.at(index).blurcolde); + softradiuscol->setValue(pp->locallab.spots.at(index).softradiuscol); invers->set_active(pp->locallab.spots.at(index).invers); strcol->setValue(pp->locallab.spots.at(index).strcol); - - if (complexsoft < 2) { - strcolab->setValue(pp->locallab.spots.at(index).strcolab); - strcolh->setValue(pp->locallab.spots.at(index).strcolh); - } else { - strcolab->setValue(0.); - strcolh->setValue(0.); - } - + strcolab->setValue(pp->locallab.spots.at(index).strcolab); + strcolh->setValue(pp->locallab.spots.at(index).strcolh); angcol->setValue(pp->locallab.spots.at(index).angcol); if (pp->locallab.spots.at(index).qualitycurveMethod == "none") { @@ -1083,18 +1068,10 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param llshape->setCurve(pp->locallab.spots.at(index).llcurve); ccshape->setCurve(pp->locallab.spots.at(index).cccurve); - - if (complexsoft < 2) { - clshape->setCurve(pp->locallab.spots.at(index).clcurve); - lcshape->setCurve(pp->locallab.spots.at(index).lccurve); - LHshape->setCurve(pp->locallab.spots.at(index).LHcurve); - HHshape->setCurve(pp->locallab.spots.at(index).HHcurve); - } else { - clshape->reset(); - lcshape->reset(); - LHshape->reset(); - HHshape->reset(); - } + clshape->setCurve(pp->locallab.spots.at(index).clcurve); + lcshape->setCurve(pp->locallab.spots.at(index).lccurve); + LHshape->setCurve(pp->locallab.spots.at(index).LHcurve); + HHshape->setCurve(pp->locallab.spots.at(index).HHcurve); if (pp->locallab.spots.at(index).toneMethod == "one") { toneMethod->set_active(0); @@ -1106,25 +1083,19 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param toneMethod->set_active(3); } - if (complexsoft < 2) { - rgbshape->setCurve(pp->locallab.spots.at(index).rgbcurve); - special->set_active(pp->locallab.spots.at(index).special); + rgbshape->setCurve(pp->locallab.spots.at(index).rgbcurve); + special->set_active(pp->locallab.spots.at(index).special); - if (pp->locallab.spots.at(index).merMethod == "mone") { - merMethod->set_active(0); - } else if (pp->locallab.spots.at(index).merMethod == "mtwo") { - merMethod->set_active(1); - } else if (pp->locallab.spots.at(index).merMethod == "mthr") { - merMethod->set_active(2); - } else if (pp->locallab.spots.at(index).merMethod == "mfou") { - merMethod->set_active(3); - } else if (pp->locallab.spots.at(index).merMethod == "mfiv") { - merMethod->set_active(4); - } - } else { - rgbshape->reset(); - special->set_active(false); + if (pp->locallab.spots.at(index).merMethod == "mone") { merMethod->set_active(0); + } else if (pp->locallab.spots.at(index).merMethod == "mtwo") { + merMethod->set_active(1); + } else if (pp->locallab.spots.at(index).merMethod == "mthr") { + merMethod->set_active(2); + } else if (pp->locallab.spots.at(index).merMethod == "mfou") { + merMethod->set_active(3); + } else if (pp->locallab.spots.at(index).merMethod == "mfiv") { + merMethod->set_active(4); } if (pp->locallab.spots.at(index).mergecolMethod == "one") { @@ -1183,59 +1154,30 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param CCmaskshape->setCurve(pp->locallab.spots.at(index).CCmaskcurve); LLmaskshape->setCurve(pp->locallab.spots.at(index).LLmaskcurve); HHmaskshape->setCurve(pp->locallab.spots.at(index).HHmaskcurve); - - if (complexsoft < 2) { - strumaskcol->setValue(pp->locallab.spots.at(index).strumaskcol); - toolcol->set_active(pp->locallab.spots.at(index).toolcol); - fftColorMask->set_active(pp->locallab.spots.at(index).fftColorMask); - contcol->setValue(pp->locallab.spots.at(index).contcol); - blurcol->setValue(pp->locallab.spots.at(index).blurcol); - } else { - strumaskcol->setValue(0.); - toolcol->set_active(false); - fftColorMask->set_active(false); - contcol->setValue(0.); - blurcol->setLimits(0.2, 100., 0.5, 0.2); - blurcol->setValue(pp->locallab.spots.at(index).blurcol); - } - + strumaskcol->setValue(pp->locallab.spots.at(index).strumaskcol); + toolcol->set_active(pp->locallab.spots.at(index).toolcol); + fftColorMask->set_active(pp->locallab.spots.at(index).fftColorMask); + contcol->setValue(pp->locallab.spots.at(index).contcol); + blurcol->setValue(pp->locallab.spots.at(index).blurcol); blendmaskcol->setValue(pp->locallab.spots.at(index).blendmaskcol); radmaskcol->setValue(pp->locallab.spots.at(index).radmaskcol); - - if (complexsoft < 2) { - lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol); - } else { - lapmaskcol->setValue(0.); - } - + lapmaskcol->setValue(pp->locallab.spots.at(index).lapmaskcol); chromaskcol->setValue(pp->locallab.spots.at(index).chromaskcol); - - if (complexsoft < 2) { - gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol); - slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol); - shadmaskcol->setValue(pp->locallab.spots.at(index).shadmaskcol); - HHhmaskshape->setCurve(pp->locallab.spots.at(index).HHhmaskcurve); - } else { - gammaskcol->setValue(1.); - slomaskcol->setValue(0.); - shadmaskcol->setValue(0.); - HHhmaskshape->reset(); - } - + gammaskcol->setValue(pp->locallab.spots.at(index).gammaskcol); + slomaskcol->setValue(pp->locallab.spots.at(index).slomaskcol); + shadmaskcol->setValue(pp->locallab.spots.at(index).shadmaskcol); + HHhmaskshape->setCurve(pp->locallab.spots.at(index).HHhmaskcurve); Lmaskshape->setCurve(pp->locallab.spots.at(index).Lmaskcurve); - - if (complexsoft == 0) { - LLmaskcolshapewav->setCurve(pp->locallab.spots.at(index).LLmaskcolcurvewav); - } else { - LLmaskcolshapewav->reset(); - } - + LLmaskcolshapewav->setCurve(pp->locallab.spots.at(index).LLmaskcolcurvewav); csThresholdcol->setValue(pp->locallab.spots.at(index).csthresholdcol); } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update GUI according to invers button state updateColorGUI1(); @@ -1255,6 +1197,7 @@ 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).complexcolor = complexity->get_active_row_number(); pp->locallab.spots.at(index).curvactiv = curvactiv->get_active(); pp->locallab.spots.at(index).lightness = lightness->getIntValue(); @@ -1763,6 +1706,181 @@ void LocallabColor::enabledChanged() } } +void LocallabColor::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + blurcolde->setValue((double)defSpot.blurcolde); + softradiuscol->setValue(defSpot.softradiuscol); + strcolab->setValue(defSpot.strcolab); + strcolh->setValue(defSpot.strcolh); + clshape->setCurve(defSpot.clcurve); + lcshape->setCurve(defSpot.lccurve); + LHshape->setCurve(defSpot.LHcurve); + HHshape->setCurve(defSpot.HHcurve); + + if (defSpot.toneMethod == "one") { + toneMethod->set_active(0); + } else if (defSpot.toneMethod == "two") { + toneMethod->set_active(1); + } else if (defSpot.toneMethod == "thr") { + toneMethod->set_active(2); + } else if (defSpot.toneMethod == "fou") { + toneMethod->set_active(3); + } + + rgbshape->setCurve(defSpot.rgbcurve); + special->set_active(defSpot.special); + + if (defSpot.merMethod == "mone") { + merMethod->set_active(0); + } else if (defSpot.merMethod == "mtwo") { + merMethod->set_active(1); + } else if (defSpot.merMethod == "mthr") { + merMethod->set_active(2); + } else if (defSpot.merMethod == "mfou") { + merMethod->set_active(3); + } else if (defSpot.merMethod == "mfiv") { + merMethod->set_active(4); + } + + if (defSpot.mergecolMethod == "one") { + mergecolMethod->set_active(0); + } else if (defSpot.mergecolMethod == "two") { + mergecolMethod->set_active(1); + } else if (defSpot.mergecolMethod == "thr") { + mergecolMethod->set_active(2); + } else if (defSpot.mergecolMethod == "fou") { + mergecolMethod->set_active(3); + } else if (defSpot.mergecolMethod == "fiv") { + mergecolMethod->set_active(4); + } else if (defSpot.mergecolMethod == "six") { + mergecolMethod->set_active(5); + } else if (defSpot.mergecolMethod == "sev") { + mergecolMethod->set_active(6); + } else if (defSpot.mergecolMethod == "sev0") { + mergecolMethod->set_active(7); + } else if (defSpot.mergecolMethod == "sev1") { + mergecolMethod->set_active(8); + } else if (defSpot.mergecolMethod == "sev2") { + mergecolMethod->set_active(9); + } else if (defSpot.mergecolMethod == "hei") { + mergecolMethod->set_active(10); + } else if (defSpot.mergecolMethod == "nin") { + mergecolMethod->set_active(11); + } else if (defSpot.mergecolMethod == "ten") { + mergecolMethod->set_active(12); + } else if (defSpot.mergecolMethod == "ele") { + mergecolMethod->set_active(13); + } else if (defSpot.mergecolMethod == "twe") { + mergecolMethod->set_active(14); + } else if (defSpot.mergecolMethod == "thi") { + mergecolMethod->set_active(15); + } else if (defSpot.mergecolMethod == "for") { + mergecolMethod->set_active(16); + } else if (defSpot.mergecolMethod == "hue") { + mergecolMethod->set_active(17); + } else if (defSpot.mergecolMethod == "sat") { + mergecolMethod->set_active(18); + } else if (defSpot.mergecolMethod == "col") { + mergecolMethod->set_active(19); + } else if (defSpot.mergecolMethod == "lum") { + mergecolMethod->set_active(20); + } + + mercol->setValue(defSpot.mercol); + opacol->setValue(defSpot.opacol); + conthrcol->setValue(defSpot.conthrcol); + labgridmerg->setParams(0, 0, + defSpot.labgridAHighmerg / LocallabParams::LABGRIDL_CORR_MAX, + defSpot.labgridBHighmerg / LocallabParams::LABGRIDL_CORR_MAX, + false); + merlucol->setValue(defSpot.merlucol); + strumaskcol->setValue(defSpot.strumaskcol); + toolcol->set_active(defSpot.toolcol); + fftColorMask->set_active(defSpot.fftColorMask); + contcol->setValue(defSpot.contcol); + lapmaskcol->setValue(defSpot.lapmaskcol); + gammaskcol->setValue(defSpot.gammaskcol); + slomaskcol->setValue(defSpot.slomaskcol); + shadmaskcol->setValue((double)defSpot.shadmaskcol); + HHhmaskshape->setCurve(defSpot.HHhmaskcurve); + LLmaskcolshapewav->setCurve(defSpot.LLmaskcolcurvewav); + csThresholdcol->setValue(defSpot.csthresholdcol); + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update GUI according to merMethod combobox state + updateColorGUI2(); + // - Update GUI according to fftColorMash button state + updateColorGUI3(); +} + +void LocallabColor::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + blurcolde->hide(); + softradiuscol->hide(); + strcolab->hide(); + strcolh->hide(); + clCurveEditorG->hide(); + HCurveEditorG->hide(); + H2CurveEditorG->hide(); + rgbCurveEditorG->hide(); + special->hide(); + expmaskcol1->hide(); + struFrame->hide(); + blurFrame->hide(); + lapmaskcol->hide(); + gammaskcol->hide(); + slomaskcol->hide(); + shadmaskcol->hide(); + maskHCurveEditorG->hide(); + mask2CurveEditorGwav->hide(); + csThresholdcol->hide(); + } else { + // Advanced widgets are shown in Expert mode + blurcolde->show(); + + if (!invers->get_active()) { // Keep widget hidden when invers is toggled + softradiuscol->show(); + } + + strcolab->show(); + strcolh->show(); + + if (!invers->get_active()) { // Keep widgets hidden when invers is toggled + clCurveEditorG->show(); + HCurveEditorG->show(); + } + + H2CurveEditorG->show(); + rgbCurveEditorG->show(); + special->show(); + + if (!invers->get_active()) { // Keep widget hidden when invers is toggled + expmaskcol1->show(); + } + + struFrame->show(); + blurFrame->show(); + lapmaskcol->show(); + gammaskcol->show(); + slomaskcol->show(); + shadmaskcol->show(); + maskHCurveEditorG->show(); + mask2CurveEditorGwav->show(); + csThresholdcol->show(); + } +} + void LocallabColor::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -1967,6 +2085,8 @@ void LocallabColor::fftColorMaskChanged() void LocallabColor::updateColorGUI1() { + const int mode = complexity->get_active_row_number(); + if (invers->get_active()) { gridFrame->hide(); structcol->hide(); @@ -1988,13 +2108,21 @@ void LocallabColor::updateColorGUI1() } else { gridFrame->show(); structcol->show(); - softradiuscol->show(); + + if (mode == Normal) { // Keep widget hidden in Normal mode + softradiuscol->show(); + } + expgradcol->show(); labqualcurv->show(); qualitycurveMethod->show(); - clCurveEditorG->show(); - HCurveEditorG->show(); - expmaskcol1->show(); + + if (mode == Normal) { // Keep widgets hidden in Normal mode + clCurveEditorG->show(); + HCurveEditorG->show(); + expmaskcol1->show(); + } + showmaskcolMethod->show(); showmaskcolMethodinv->hide(); // Reset hidden mask combobox @@ -2031,7 +2159,6 @@ void LocallabColor::updateColorGUI2() break; case 2: - sensi->set_sensitive(false); invers->set_sensitive(false); H2CurveEditorG->set_sensitive(true); rgbCurveEditorG->set_sensitive(false); @@ -2135,7 +2262,6 @@ LocallabExposure::LocallabExposure(): const LocallabParams::LocallabSpot defSpot; const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Exposure specific widgets if (showtooltip) { @@ -2410,27 +2536,15 @@ LocallabExposure::LocallabExposure(): maskexpBox->pack_start(*maskexpCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskexpBox->pack_start(*blendmaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*radmaskexp, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - maskexpBox->pack_start(*lapmaskexp, Gtk::PACK_SHRINK, 0); - } - + maskexpBox->pack_start(*lapmaskexp, Gtk::PACK_SHRINK, 0); maskexpBox->pack_start(*chromaskexp, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0); - maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0); - } - + maskexpBox->pack_start(*gammaskexp, Gtk::PACK_SHRINK, 0); + maskexpBox->pack_start(*slomaskexp, Gtk::PACK_SHRINK, 0); ToolParamBlock* const gradmaskBox = Gtk::manage(new ToolParamBlock()); gradmaskBox->pack_start(*strmaskexp); gradmaskBox->pack_start(*angmaskexp); gradFramemask->add(*gradmaskBox); - - if (complexsoft < 2) { - maskexpBox->pack_start(*gradFramemask); - } - + maskexpBox->pack_start(*gradFramemask); maskexpBox->pack_start(*mask2expCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor expmaskexp->add(*maskexpBox, false); pack_start(*expmaskexp, false, false); @@ -2496,8 +2610,6 @@ void LocallabExposure::enableListener() void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -2509,6 +2621,7 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa exp->set_visible(pp->locallab.spots.at(index).visiexpose); exp->setEnabled(pp->locallab.spots.at(index).expexpose); + complexity->set_active(pp->locallab.spots.at(index).complexexpose); if (pp->locallab.spots.at(index).expMethod == "std") { expMethod->set_active(0); @@ -2555,33 +2668,21 @@ void LocallabExposure::read(const rtengine::procparams::ProcParams* pp, const Pa HHmaskexpshape->setCurve(pp->locallab.spots.at(index).HHmaskexpcurve); blendmaskexp->setValue(pp->locallab.spots.at(index).blendmaskexp); radmaskexp->setValue(pp->locallab.spots.at(index).radmaskexp); - - if (complexsoft == 0) { - lapmaskexp->setValue(pp->locallab.spots.at(index).lapmaskexp); - } else { - lapmaskexp->setValue(0.); - } - + lapmaskexp->setValue(pp->locallab.spots.at(index).lapmaskexp); chromaskexp->setValue(pp->locallab.spots.at(index).chromaskexp); - - if (complexsoft < 2) { - gammaskexp->setValue(pp->locallab.spots.at(index).gammaskexp); - slomaskexp->setValue(pp->locallab.spots.at(index).slomaskexp); - strmaskexp->setValue(pp->locallab.spots.at(index).strmaskexp); - angmaskexp->setValue(pp->locallab.spots.at(index).angmaskexp); - } else { - gammaskexp->setValue(1.); - slomaskexp->setValue(0.); - strmaskexp->setValue(0.); - angmaskexp->setValue(0.); - } - + gammaskexp->setValue(pp->locallab.spots.at(index).gammaskexp); + slomaskexp->setValue(pp->locallab.spots.at(index).slomaskexp); + strmaskexp->setValue(pp->locallab.spots.at(index).strmaskexp); + angmaskexp->setValue(pp->locallab.spots.at(index).angmaskexp); Lmaskexpshape->setCurve(pp->locallab.spots.at(index).Lmaskexpcurve); } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update shcompr sensitivity according to black and shadex value updateExposureGUI1(); @@ -2601,6 +2702,7 @@ 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(); + pp->locallab.spots.at(index).complexexpose = complexity->get_active_row_number(); if (expMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).expMethod = "std"; @@ -2969,6 +3071,40 @@ void LocallabExposure::enabledChanged() } } +void LocallabExposure::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + lapmaskexp->setValue(defSpot.lapmaskexp); + gammaskexp->setValue(defSpot.gammaskexp); + slomaskexp->setValue(defSpot.slomaskexp); + strmaskexp->setValue(defSpot.strmaskexp); + angmaskexp->setValue(defSpot.angmaskexp); + + // Enable all listeners + enableListener(); +} + +void LocallabExposure::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + lapmaskexp->hide(); + gammaskexp->hide(); + slomaskexp->hide(); + gradFramemask->hide(); + } else { + // Advanced widgets are shown in Expert mode + lapmaskexp->show(); + gammaskexp->show(); + slomaskexp->show(); + gradFramemask->show(); + } +} void LocallabExposure::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { @@ -3224,7 +3360,6 @@ LocallabShadow::LocallabShadow(): const LocallabParams::LocallabSpot defSpot; const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Shadow highlight specific widgets if (showtooltip) { @@ -3383,9 +3518,7 @@ LocallabShadow::LocallabShadow(): fatanchorSH->setAdjusterListener(this); // Add Shadow highlight specific widgets to GUI - if (complexsoft < 2) { - pack_start(*shMethod); - } + pack_start(*shMethod); for (int i = 0; i < 5; ++i) { pack_start(*multipliersh[i]); @@ -3398,11 +3531,7 @@ LocallabShadow::LocallabShadow(): pack_start(*s_tonalwidth); pack_start(*sh_radius); pack_start(*sensihs); - - if (complexsoft < 2) { - pack_start(*blurSHde); - } - + pack_start(*blurSHde); ToolParamBlock* const gammBox = Gtk::manage(new ToolParamBlock()); gammBox->pack_start(*gamSH); gammBox->pack_start(*sloSH); @@ -3421,28 +3550,16 @@ LocallabShadow::LocallabShadow(): maskSHBox->pack_start(*maskSHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskSHBox->pack_start(*blendmaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*radmaskSH, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - maskSHBox->pack_start(*lapmaskSH, Gtk::PACK_SHRINK, 0); - } - + maskSHBox->pack_start(*lapmaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*chromaskSH, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0); - maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0); - } - + maskSHBox->pack_start(*gammaskSH, Gtk::PACK_SHRINK, 0); + maskSHBox->pack_start(*slomaskSH, Gtk::PACK_SHRINK, 0); maskSHBox->pack_start(*mask2SHCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor ToolParamBlock* const fatSHBox = Gtk::manage(new ToolParamBlock()); fatSHBox->pack_start(*fatamountSH); fatSHBox->pack_start(*fatanchorSH); fatSHFrame->add(*fatSHBox); - - if (complexsoft < 1) { - maskSHBox->pack_start(*fatSHFrame); - } - + maskSHBox->pack_start(*fatSHFrame); expmasksh->add(*maskSHBox, false); pack_start(*expmasksh, false, false); } @@ -3501,8 +3618,6 @@ void LocallabShadow::enableListener() void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -3514,14 +3629,11 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para exp->set_visible(pp->locallab.spots.at(index).visishadhigh); exp->setEnabled(pp->locallab.spots.at(index).expshadhigh); + complexity->set_active(pp->locallab.spots.at(index).complexshadhigh); - if (complexsoft < 2) { - if (pp->locallab.spots.at(index).shMethod == "std") { - shMethod->set_active(0); - } else if (pp->locallab.spots.at(index).shMethod == "tone") { - shMethod->set_active(1); - } - } else { + if (pp->locallab.spots.at(index).shMethod == "std") { + shMethod->set_active(0); + } else if (pp->locallab.spots.at(index).shMethod == "tone") { shMethod->set_active(1); } @@ -3530,21 +3642,9 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para } detailSH->setValue((double)pp->locallab.spots.at(index).detailSH); - - if (complexsoft < 2) { - highlights->setValue((double)pp->locallab.spots.at(index).highlights); - } else { - highlights->setValue(0.); - } - + highlights->setValue((double)pp->locallab.spots.at(index).highlights); h_tonalwidth->setValue((double)pp->locallab.spots.at(index).h_tonalwidth); - - if (complexsoft < 2) { - shadows->setValue(pp->locallab.spots.at(index).shadows); - } else { - shadows->setValue(0.); - } - + shadows->setValue(pp->locallab.spots.at(index).shadows); s_tonalwidth->setValue((double)pp->locallab.spots.at(index).s_tonalwidth); sh_radius->setValue((double)pp->locallab.spots.at(index).sh_radius); sensihs->setValue((double)pp->locallab.spots.at(index).sensihs); @@ -3560,23 +3660,10 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para HHmaskSHshape->setCurve(pp->locallab.spots.at(index).HHmaskSHcurve); blendmaskSH->setValue((double)pp->locallab.spots.at(index).blendmaskSH); radmaskSH->setValue(pp->locallab.spots.at(index).radmaskSH); - - if (complexsoft == 0) { - lapmaskSH->setValue(pp->locallab.spots.at(index).lapmaskSH); - } else { - lapmaskSH->setValue(0.); - } - + lapmaskSH->setValue(pp->locallab.spots.at(index).lapmaskSH); chromaskSH->setValue(pp->locallab.spots.at(index).chromaskSH); - - if (complexsoft < 2) { - gammaskSH->setValue(pp->locallab.spots.at(index).gammaskSH); - slomaskSH->setValue(pp->locallab.spots.at(index).slomaskSH); - } else { - gammaskSH->setValue(1.); - slomaskSH->setValue(0.); - } - + gammaskSH->setValue(pp->locallab.spots.at(index).gammaskSH); + slomaskSH->setValue(pp->locallab.spots.at(index).slomaskSH); LmaskSHshape->setCurve(pp->locallab.spots.at(index).LmaskSHcurve); fatamountSH->setValue(pp->locallab.spots.at(index).fatamountSH); fatanchorSH->setValue(pp->locallab.spots.at(index).fatanchorSH); @@ -3585,6 +3672,9 @@ void LocallabShadow::read(const rtengine::procparams::ProcParams* pp, const Para // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update shadow highlight GUI according to inverssh button state updateShadowGUI1(); @@ -3601,6 +3691,7 @@ 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).complexshadhigh = complexity->get_active_row_number(); if (shMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).shMethod = "std"; @@ -3886,6 +3977,56 @@ void LocallabShadow::enabledChanged() } } +void LocallabShadow::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + if (defSpot.shMethod == "std") { + shMethod->set_active(0); + } else if (defSpot.shMethod == "tone") { + shMethod->set_active(1); + } + + blurSHde->setValue((double)defSpot.blurSHde); + lapmaskSH->setValue(defSpot.lapmaskSH); + gammaskSH->setValue(defSpot.gammaskSH); + slomaskSH->setValue(defSpot.slomaskSH); + fatamountSH->setValue(defSpot.fatamountSH); + fatanchorSH->setValue(defSpot.fatanchorSH); + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update shadow highlight GUI according to shMethod combobox state + updateShadowGUI2(); +} + +void LocallabShadow::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + shMethod->hide(); + blurSHde->hide(); + lapmaskSH->hide(); + gammaskSH->hide(); + slomaskSH->hide(); + fatSHFrame->hide(); + } else { + // Advanced widgets are shown in Expert mode + shMethod->show(); + blurSHde->show(); + lapmaskSH->show(); + gammaskSH->show(); + slomaskSH->show(); + fatSHFrame->show(); + } +} + void LocallabShadow::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -4079,15 +4220,10 @@ LocallabVibrance::LocallabVibrance(): const LocallabParams::LocallabSpot defSpot; const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Vibrance specific widgets saturated->setAdjusterListener(this); - if (complexsoft == 2) { - pastels->setLabel(M("TP_LOCALLAB_PASTELS2")); - } - pastels->setAdjusterListener(this); if (showtooltip) { @@ -4238,34 +4374,19 @@ LocallabVibrance::LocallabVibrance(): mask2vibCurveEditorG->curveListComplete(); // Add Vibrance specific widgets to GUI - if (complexsoft < 2) { - pack_start(*saturated, Gtk::PACK_SHRINK, 0); - } - + pack_start(*saturated, Gtk::PACK_SHRINK, 0); pack_start(*pastels, Gtk::PACK_SHRINK, 0); pack_start(*warm, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - pack_start(*psThreshold, Gtk::PACK_SHRINK, 0); - pack_start(*protectSkins, Gtk::PACK_SHRINK, 0); - pack_start(*avoidColorShift, Gtk::PACK_SHRINK, 0); - pack_start(*pastSatTog, Gtk::PACK_SHRINK, 0); - } - + pack_start(*psThreshold, Gtk::PACK_SHRINK, 0); + 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); - - if (complexsoft < 2) { - pack_start(*curveEditorGG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - } - + 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); - - if (complexsoft < 2) { - gradvibBox->pack_start(*strvibab); - gradvibBox->pack_start(*strvibh); - } - + gradvibBox->pack_start(*strvibab); + gradvibBox->pack_start(*strvibh); gradvibBox->pack_start(*angvib); expgradvib->add(*gradvibBox, false); pack_start(*expgradvib); @@ -4275,18 +4396,10 @@ LocallabVibrance::LocallabVibrance(): maskvibBox->pack_start(*maskvibCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskvibBox->pack_start(*blendmaskvib, Gtk::PACK_SHRINK, 0); maskvibBox->pack_start(*radmaskvib, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - maskvibBox->pack_start(*lapmaskvib, Gtk::PACK_SHRINK, 0); - } - + maskvibBox->pack_start(*lapmaskvib, Gtk::PACK_SHRINK, 0); maskvibBox->pack_start(*chromaskvib, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - maskvibBox->pack_start(*gammaskvib, Gtk::PACK_SHRINK, 0); - maskvibBox->pack_start(*slomaskvib, Gtk::PACK_SHRINK, 0); - } - + maskvibBox->pack_start(*gammaskvib, Gtk::PACK_SHRINK, 0); + maskvibBox->pack_start(*slomaskvib, Gtk::PACK_SHRINK, 0); maskvibBox->pack_start(*mask2vibCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor expmaskvib->add(*maskvibBox, false); pack_start(*expmaskvib, false, false); @@ -4343,8 +4456,6 @@ void LocallabVibrance::enableListener() void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -4356,6 +4467,7 @@ void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const Pa exp->set_visible(pp->locallab.spots.at(index).visivibrance); exp->setEnabled(pp->locallab.spots.at(index).expvibrance); + complexity->set_active(pp->locallab.spots.at(index).complexvibrance); saturated->setValue(pp->locallab.spots.at(index).saturated); pastels->setValue(pp->locallab.spots.at(index).pastels); @@ -4365,23 +4477,10 @@ void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const Pa avoidColorShift->set_active(pp->locallab.spots.at(index).avoidcolorshift); pastSatTog->set_active(pp->locallab.spots.at(index).pastsattog); sensiv->setValue(pp->locallab.spots.at(index).sensiv); - - if (complexsoft < 2) { - skinTonesCurve->setCurve(pp->locallab.spots.at(index).skintonescurve); - } else { - skinTonesCurve->reset(); - } - + skinTonesCurve->setCurve(pp->locallab.spots.at(index).skintonescurve); strvib->setValue(pp->locallab.spots.at(index).strvib); - - if (complexsoft == 0) { - strvibab->setValue(pp->locallab.spots.at(index).strvibab); - strvibh->setValue(pp->locallab.spots.at(index).strvibh); - } else { - strvibab->setValue(0.); - strvibh->setValue(0.); - } - + strvibab->setValue(pp->locallab.spots.at(index).strvibab); + strvibh->setValue(pp->locallab.spots.at(index).strvibh); angvib->setValue(pp->locallab.spots.at(index).angvib); enavibMask->set_active(pp->locallab.spots.at(index).enavibMask); CCmaskvibshape->setCurve(pp->locallab.spots.at(index).CCmaskvibcurve); @@ -4389,29 +4488,19 @@ void LocallabVibrance::read(const rtengine::procparams::ProcParams* pp, const Pa HHmaskvibshape->setCurve(pp->locallab.spots.at(index).HHmaskvibcurve); blendmaskvib->setValue(pp->locallab.spots.at(index).blendmaskvib); radmaskvib->setValue(pp->locallab.spots.at(index).radmaskvib); - - if (complexsoft == 0) { - lapmaskvib->setValue(pp->locallab.spots.at(index).lapmaskvib); - } else { - lapmaskvib->setValue(0.); - } - + lapmaskvib->setValue(pp->locallab.spots.at(index).lapmaskvib); chromaskvib->setValue(pp->locallab.spots.at(index).chromaskvib); - - if (complexsoft < 2) { - gammaskvib->setValue(pp->locallab.spots.at(index).gammaskvib); - slomaskvib->setValue(pp->locallab.spots.at(index).slomaskvib); - } else { - gammaskvib->setValue(1.); - slomaskvib->setValue(0.); - } - + gammaskvib->setValue(pp->locallab.spots.at(index).gammaskvib); + slomaskvib->setValue(pp->locallab.spots.at(index).slomaskvib); Lmaskvibshape->setCurve(pp->locallab.spots.at(index).Lmaskvibcurve); } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update vibrance GUI according to pastsattog button state updateVibranceGUI(); @@ -4425,6 +4514,7 @@ 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).complexvibrance = complexity->get_active_row_number(); pp->locallab.spots.at(index).saturated = saturated->getIntValue(); pp->locallab.spots.at(index).pastels = pastels->getIntValue(); @@ -4704,6 +4794,67 @@ void LocallabVibrance::enabledChanged() } } +void LocallabVibrance::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + saturated->setValue((double)defSpot.saturated); + psThreshold->setValue(defSpot.psthreshold); + protectSkins->set_active(defSpot.protectskins); + avoidColorShift->set_active(defSpot.avoidcolorshift); + pastSatTog->set_active(defSpot.pastsattog); + skinTonesCurve->setCurve(defSpot.skintonescurve); + strvibab->setValue(defSpot.strvibab); + strvibh->setValue(defSpot.strvibh); + lapmaskvib->setValue(defSpot.lapmaskvib); + gammaskvib->setValue(defSpot.gammaskvib); + slomaskvib->setValue(defSpot.slomaskvib); + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update vibrance GUI according to pastsattog button state + updateVibranceGUI(); +} + +void LocallabVibrance::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + saturated->hide(); + pastels->setLabel(M("TP_LOCALLAB_PASTELS2")); + psThreshold->hide(); + protectSkins->hide(); + avoidColorShift->hide(); + pastSatTog->hide(); + curveEditorGG->hide(); + strvibab->hide(); + strvibh->hide(); + lapmaskvib->hide(); + gammaskvib->hide(); + slomaskvib->hide(); + } else { + // Advanced widgets are shown in Expert mode + saturated->show(); + pastels->setLabel(M("TP_VIBRANCE_PASTELS")); + psThreshold->show(); + protectSkins->show(); + avoidColorShift->show(); + pastSatTog->show(); + curveEditorGG->show(); + strvibab->show(); + strvibh->show(); + lapmaskvib->show(); + gammaskvib->show(); + slomaskvib->show(); + } +} + void LocallabVibrance::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -4823,7 +4974,6 @@ LocallabSoft::LocallabSoft(): sensisf(Gtk::manage(new Adjuster(M("TP_LOCALLAB_SENSI"), 1, 100, 1, 15))) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Soft light specific widgets softMethod->append(M("TP_LOCALLAB_SOFTM")); @@ -4858,10 +5008,7 @@ LocallabSoft::LocallabSoft(): sensisf->setAdjusterListener(this); // Add Soft light specific widgets to GUI - if (complexsoft < 2) { - pack_start(*softMethod); - } - + pack_start(*softMethod); Gtk::Label* const labelsoftmethod = Gtk::manage(new Gtk::Label(M("TP_LOCALLAB_SHOWDCT") + ":")); ctboxsoftmethod->pack_start(*labelsoftmethod, Gtk::PACK_SHRINK, 4); ctboxsoftmethod->pack_start(*showmasksoftMethod); @@ -4901,8 +5048,6 @@ void LocallabSoft::enableListener() void LocallabSoft::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -4914,20 +5059,15 @@ void LocallabSoft::read(const rtengine::procparams::ProcParams* pp, const Params exp->set_visible(pp->locallab.spots.at(index).visisoft); exp->setEnabled(pp->locallab.spots.at(index).expsoft); + complexity->set_active(pp->locallab.spots.at(index).complexsoft); - if (complexsoft < 2) { - if (pp->locallab.spots.at(index).softMethod == "soft") { - softMethod->set_active(0); - } else if (pp->locallab.spots.at(index).softMethod == "reti") { - softMethod->set_active(1); - } - - streng->setValue((double)pp->locallab.spots.at(index).streng); - } else { + if (pp->locallab.spots.at(index).softMethod == "soft") { softMethod->set_active(0); - streng->setValue(1.); + } else if (pp->locallab.spots.at(index).softMethod == "reti") { + softMethod->set_active(1); } + streng->setValue((double)pp->locallab.spots.at(index).streng); sensisf->setValue((double)pp->locallab.spots.at(index).sensisf); laplace->setValue(pp->locallab.spots.at(index).laplace); } @@ -4935,6 +5075,9 @@ void LocallabSoft::read(const rtengine::procparams::ProcParams* pp, const Params // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update soft light GUI according to softMethod combobox updateSoftGUI(); @@ -4948,6 +5091,7 @@ 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(); + pp->locallab.spots.at(index).complexsoft = complexity->get_active_row_number(); if (softMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).softMethod = "soft"; @@ -5020,6 +5164,39 @@ void LocallabSoft::enabledChanged() } } +void LocallabSoft::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + if (defSpot.softMethod == "soft") { + softMethod->set_active(0); + } else if (defSpot.softMethod == "reti") { + softMethod->set_active(1); + } + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update soft light GUI according to softMethod combobox + updateSoftGUI(); +} + +void LocallabSoft::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + softMethod->hide(); + } else { + // Advanced widgets are shown in Expert mode + softMethod->show(); + } +} + void LocallabSoft::softMethodChanged() { // Update soft light GUI according to softMethod combobox @@ -5131,7 +5308,6 @@ LocallabBlur::LocallabBlur(): const LocallabParams::LocallabSpot defSpot; const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Blur, Noise & Denoise specific widgets setExpandAlignProperties(expblnoise, true, false, Gtk::ALIGN_FILL, Gtk::ALIGN_START); @@ -5367,11 +5543,7 @@ LocallabBlur::LocallabBlur(): // Add Blur, Noise & Denoise specific widgets to GUI ToolParamBlock* const blnoisebox = Gtk::manage(new ToolParamBlock()); blnoisebox->pack_start(*blMethod); - - if (complexsoft < 2) { - blnoisebox->pack_start(*fftwbl, Gtk::PACK_SHRINK, 0); - } - + blnoisebox->pack_start(*fftwbl, Gtk::PACK_SHRINK, 0); blnoisebox->pack_start(*radius); blnoisebox->pack_start(*strength); ToolParamBlock* const grainBox = Gtk::manage(new ToolParamBlock()); @@ -5416,37 +5588,21 @@ LocallabBlur::LocallabBlur(): maskblBox->pack_start(*showmaskblMethod, Gtk::PACK_SHRINK, 4); maskblBox->pack_start(*enablMask, Gtk::PACK_SHRINK, 0); maskblBox->pack_start(*maskblCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - - if (complexsoft < 2) { - maskblBox->pack_start(*strumaskbl, Gtk::PACK_SHRINK, 0); - maskblBox->pack_start(*toolbl, Gtk::PACK_SHRINK, 0); - } - + maskblBox->pack_start(*strumaskbl, Gtk::PACK_SHRINK, 0); + maskblBox->pack_start(*toolbl, Gtk::PACK_SHRINK, 0); Gtk::HSeparator* const separatorstrubl = Gtk::manage(new Gtk::HSeparator()); maskblBox->pack_start(*separatorstrubl, Gtk::PACK_SHRINK, 2); maskblBox->pack_start(*blendmaskbl, Gtk::PACK_SHRINK, 0); ToolParamBlock* const toolblBox = Gtk::manage(new ToolParamBlock()); toolblBox->pack_start(*radmaskbl, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - toolblBox->pack_start(*lapmaskbl, Gtk::PACK_SHRINK, 0); - } - + toolblBox->pack_start(*lapmaskbl, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*chromaskbl, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - toolblBox->pack_start(*gammaskbl, Gtk::PACK_SHRINK, 0); - toolblBox->pack_start(*slomaskbl, Gtk::PACK_SHRINK, 0); - toolblBox->pack_start(*shadmaskbl, Gtk::PACK_SHRINK, 0); - } - + toolblBox->pack_start(*gammaskbl, Gtk::PACK_SHRINK, 0); + toolblBox->pack_start(*slomaskbl, Gtk::PACK_SHRINK, 0); + toolblBox->pack_start(*shadmaskbl, Gtk::PACK_SHRINK, 0); toolblBox->pack_start(*mask2blCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - - if (complexsoft < 1) { - toolblBox->pack_start(*mask2blCurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor - toolblBox->pack_start(*csThresholdblur, Gtk::PACK_SHRINK, 0); - } - + toolblBox->pack_start(*mask2blCurveEditorGwav, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor + toolblBox->pack_start(*csThresholdblur, Gtk::PACK_SHRINK, 0); toolblFrame->add(*toolblBox); maskblBox->pack_start(*toolblFrame); expmaskbl->add(*maskblBox, false); @@ -5512,8 +5668,6 @@ void LocallabBlur::enableListener() void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -5525,6 +5679,7 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params exp->set_visible(pp->locallab.spots.at(index).visiblur); exp->setEnabled(pp->locallab.spots.at(index).expblur); + complexity->set_active(pp->locallab.spots.at(index).complexblur); if (pp->locallab.spots.at(index).blMethod == "blur") { blMethod->set_active(0); @@ -5534,32 +5689,23 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params blMethod->set_active(2); } - if (complexsoft < 2) { - fftwbl->set_active(pp->locallab.spots.at(index).fftwbl); - } else { - fftwbl->set_active(false); - } - + fftwbl->set_active(pp->locallab.spots.at(index).fftwbl); radius->setValue(pp->locallab.spots.at(index).radius); strength->setValue(pp->locallab.spots.at(index).strength); isogr->setValue((double)pp->locallab.spots.at(index).isogr); strengr->setValue((double)pp->locallab.spots.at(index).strengr); scalegr->setValue((double)pp->locallab.spots.at(index).scalegr); - if (complexsoft < 2) { - if (pp->locallab.spots.at(index).medMethod == "none") { - medMethod->set_active(0); - } else if (pp->locallab.spots.at(index).medMethod == "33") { - medMethod->set_active(1); - } else if (pp->locallab.spots.at(index).medMethod == "55") { - medMethod->set_active(2); - } else if (pp->locallab.spots.at(index).medMethod == "77") { - medMethod->set_active(3); - } else if (pp->locallab.spots.at(index).medMethod == "99") { - medMethod->set_active(4); - } - } else { + if (pp->locallab.spots.at(index).medMethod == "none") { medMethod->set_active(0); + } else if (pp->locallab.spots.at(index).medMethod == "33") { + medMethod->set_active(1); + } else if (pp->locallab.spots.at(index).medMethod == "55") { + medMethod->set_active(2); + } else if (pp->locallab.spots.at(index).medMethod == "77") { + medMethod->set_active(3); + } else if (pp->locallab.spots.at(index).medMethod == "99") { + medMethod->set_active(4); } itera->setValue((double)pp->locallab.spots.at(index).itera); @@ -5601,49 +5747,26 @@ void LocallabBlur::read(const rtengine::procparams::ProcParams* pp, const Params CCmaskblshape->setCurve(pp->locallab.spots.at(index).CCmaskblcurve); LLmaskblshape->setCurve(pp->locallab.spots.at(index).LLmaskblcurve); HHmaskblshape->setCurve(pp->locallab.spots.at(index).HHmaskblcurve); - - if (complexsoft < 2) { - strumaskbl->setValue(pp->locallab.spots.at(index).strumaskbl); - } else { - strumaskbl->setValue(0.); - } - + strumaskbl->setValue(pp->locallab.spots.at(index).strumaskbl); toolbl->set_active(pp->locallab.spots.at(index).toolbl); blendmaskbl->setValue((double)pp->locallab.spots.at(index).blendmaskbl); radmaskbl->setValue(pp->locallab.spots.at(index).radmaskbl); - - if (complexsoft == 0) { - lapmaskbl->setValue(pp->locallab.spots.at(index).lapmaskbl); - } else { - lapmaskbl->setValue(0.); - } - + lapmaskbl->setValue(pp->locallab.spots.at(index).lapmaskbl); chromaskbl->setValue(pp->locallab.spots.at(index).chromaskbl); - - if (complexsoft < 2) { - gammaskbl->setValue(pp->locallab.spots.at(index).gammaskbl); - slomaskbl->setValue(pp->locallab.spots.at(index).slomaskbl); - shadmaskbl->setValue((double)pp->locallab.spots.at(index).shadmaskbl); - } else { - gammaskbl->setValue(1.); - slomaskbl->setValue(0.); - shadmaskbl->setValue(0.); - } - + gammaskbl->setValue(pp->locallab.spots.at(index).gammaskbl); + slomaskbl->setValue(pp->locallab.spots.at(index).slomaskbl); + shadmaskbl->setValue((double)pp->locallab.spots.at(index).shadmaskbl); Lmaskblshape->setCurve(pp->locallab.spots.at(index).Lmaskblcurve); - - if (complexsoft == 0) { - LLmaskblshapewav->setCurve(pp->locallab.spots.at(index).LLmaskblcurvewav); - } else { - LLmaskblshapewav->reset(); - } - + LLmaskblshapewav->setCurve(pp->locallab.spots.at(index).LLmaskblcurvewav); csThresholdblur->setValue(pp->locallab.spots.at(index).csthresholdblur); } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update Blur & Noise GUI according to blMethod combobox state updateBlurGUI(); @@ -5657,6 +5780,7 @@ void LocallabBlur::write(rtengine::procparams::ProcParams* pp, ParamsEdited* ped if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expblur = exp->getEnabled(); pp->locallab.spots.at(index).visiblur = exp->get_visible(); + pp->locallab.spots.at(index).complexblur = complexity->get_active_row_number(); if (blMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).blMethod = "blur"; @@ -6080,6 +6204,58 @@ void LocallabBlur::enabledChanged() } } +void LocallabBlur::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + fftwbl->set_active(defSpot.fftwbl); + strumaskbl->setValue(defSpot.strumaskbl); + toolbl->set_active(defSpot.toolbl); + lapmaskbl->setValue(defSpot.lapmaskbl); + gammaskbl->setValue(defSpot.gammaskbl); + slomaskbl->setValue(defSpot.slomaskbl); + shadmaskbl->setValue((double)defSpot.shadmaskbl); + LLmaskblshapewav->setCurve(defSpot.LLmaskblcurvewav); + csThresholdblur->setValue(defSpot.csthresholdblur); + + // Enable all listeners + enableListener(); +} + +void LocallabBlur::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + fftwbl->hide(); + strumaskbl->hide(); + toolbl->hide(); + lapmaskbl->hide(); + gammaskbl->hide(); + slomaskbl->hide(); + shadmaskbl->hide(); + mask2blCurveEditorGwav->hide(); + csThresholdblur->hide(); + } else { + // Advanced widgets are shown in Expert mode + if (blMethod->get_active_row_number() == 0) { // Keep widget hidden when blMethod is > 0 + fftwbl->show(); + } + + strumaskbl->show(); + toolbl->show(); + lapmaskbl->show(); + gammaskbl->show(); + slomaskbl->show(); + shadmaskbl->show(); + mask2blCurveEditorGwav->show(); + csThresholdblur->show(); + } +} + void LocallabBlur::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( diff --git a/rtgui/locallabtools.h b/rtgui/locallabtools.h index 9446a38ac..c9e22f948 100644 --- a/rtgui/locallabtools.h +++ b/rtgui/locallabtools.h @@ -49,21 +49,29 @@ class LocallabTool: public AdjusterListener { protected: + // LocallabTool mode enumeration + enum modeType { + Expert = 0, + Normal = 1 + }; + // LocallabTool parameters + bool needMode; bool isLocActivated; Glib::ustring spotName; LocallabToolListener* locToolListener; // LocallabTool generic widgets MyExpander* exp; + MyComboBoxText* const complexity; - sigc::connection enaExpConn; + sigc::connection enaExpConn, complexityConn; IdleRegister idle_register; public: // Locallab tool constructor/destructor - LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11 = false); + LocallabTool(Gtk::Box* content, Glib::ustring toolName, Glib::ustring UILabel, bool need11 = false, bool needMode = true); virtual ~LocallabTool(); // Getter for Locallab tool expander @@ -142,8 +150,13 @@ private: // Tool expander event function void foldThemAll(GdkEventButton* event); + // Complexity mode event function + void complexityModeChanged(); + // To be implemented virtual void enabledChanged() {}; + virtual void convertParamToNormal() {}; // Only necessary when using mode + virtual void updateGUIToMode(const modeType new_type) {}; // Only necessary when using mode }; /* ==== LocallabColor ==== */ @@ -207,8 +220,10 @@ private: FlatCurveEditor* const CCmaskshape; FlatCurveEditor* const LLmaskshape; FlatCurveEditor* const HHmaskshape; + Gtk::Frame* const struFrame; Adjuster* const strumaskcol; Gtk::CheckButton* const toolcol; + Gtk::Frame* const blurFrame; Gtk::CheckButton* const fftColorMask; Adjuster* const contcol; Adjuster* const blurcol; @@ -254,6 +269,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -355,6 +372,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -435,6 +454,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -514,6 +535,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -557,6 +580,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void softMethodChanged(); void showmasksoftMethodChanged(); @@ -654,6 +679,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -724,6 +751,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -812,6 +841,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -864,6 +895,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void inversshaChanged(); void showmasksharMethodChanged(); @@ -993,6 +1026,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; @@ -1074,6 +1109,8 @@ public: private: void enabledChanged() override; + void convertParamToNormal() override; + void updateGUIToMode(const modeType new_type) override; void updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) override; diff --git a/rtgui/locallabtools2.cc b/rtgui/locallabtools2.cc index 55c4ec127..8660eb630 100644 --- a/rtgui/locallabtools2.cc +++ b/rtgui/locallabtools2.cc @@ -146,7 +146,6 @@ LocallabTone::LocallabTone(): Lmasktmshape(static_cast(mask2tmCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; const LocallabParams::LocallabSpot defSpot; @@ -280,19 +279,11 @@ LocallabTone::LocallabTone(): // pack_start(*amount); // To use if we change transit_shapedetect parameters pack_start(*stren); pack_start(*equiltm); - - if (complexsoft < 2) { - pack_start(*gamma); - pack_start(*satur); - } - + pack_start(*gamma); + pack_start(*satur); pack_start(*estop); pack_start(*scaltm); - - if (complexsoft < 2) { - pack_start(*rewei); - } - + pack_start(*rewei); // pack_start(*softradiustm); // Always bad with TM ?? pack_start(*sensitm); ToolParamBlock* const masktmBox = Gtk::manage(new ToolParamBlock()); @@ -301,19 +292,11 @@ LocallabTone::LocallabTone(): masktmBox->pack_start(*enatmMaskaft, Gtk::PACK_SHRINK, 0); masktmBox->pack_start(*masktmCurveEditorG, Gtk::PACK_SHRINK, 4); masktmBox->pack_start(*blendmasktm, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - masktmBox->pack_start(*lapmasktm, Gtk::PACK_SHRINK, 0); - } - + masktmBox->pack_start(*lapmasktm, Gtk::PACK_SHRINK, 0); masktmBox->pack_start(*radmasktm, Gtk::PACK_SHRINK, 0); masktmBox->pack_start(*chromasktm, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 2) { - masktmBox->pack_start(*gammasktm, Gtk::PACK_SHRINK, 0); - masktmBox->pack_start(*slomasktm, Gtk::PACK_SHRINK, 0); - } - + masktmBox->pack_start(*gammasktm, Gtk::PACK_SHRINK, 0); + masktmBox->pack_start(*slomasktm, Gtk::PACK_SHRINK, 0); masktmBox->pack_start(*mask2tmCurveEditorG, Gtk::PACK_SHRINK, 4); expmasktm->add(*masktmBox, false); pack_start(*expmasktm, false, false); @@ -364,8 +347,6 @@ void LocallabTone::enableListener() void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -377,28 +358,16 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params exp->set_visible(pp->locallab.spots.at(index).visitonemap); exp->setEnabled(pp->locallab.spots.at(index).exptonemap); + complexity->set_active(pp->locallab.spots.at(index).complextonemap); amount->setValue(pp->locallab.spots.at(index).amount); stren->setValue(pp->locallab.spots.at(index).stren); equiltm->set_active(pp->locallab.spots.at(index).equiltm); - - if (complexsoft < 2) { - gamma->setValue(pp->locallab.spots.at(index).gamma); - satur->setValue(pp->locallab.spots.at(index).satur); - } else { - gamma->setValue(1.); - satur->setValue(0.); - } - + gamma->setValue(pp->locallab.spots.at(index).gamma); + satur->setValue(pp->locallab.spots.at(index).satur); estop->setValue(pp->locallab.spots.at(index).estop); scaltm->setValue(pp->locallab.spots.at(index).scaltm); - - if (complexsoft < 2) { - rewei->setValue((double)pp->locallab.spots.at(index).rewei); - } else { - rewei->setValue(0.); - } - + rewei->setValue((double)pp->locallab.spots.at(index).rewei); softradiustm->setValue(pp->locallab.spots.at(index).softradiustm); sensitm->setValue((double)pp->locallab.spots.at(index).sensitm); enatmMask->set_active(pp->locallab.spots.at(index).enatmMask); @@ -407,30 +376,20 @@ void LocallabTone::read(const rtengine::procparams::ProcParams* pp, const Params LLmasktmshape->setCurve(pp->locallab.spots.at(index).LLmasktmcurve); HHmasktmshape->setCurve(pp->locallab.spots.at(index).HHmasktmcurve); blendmasktm->setValue((double)pp->locallab.spots.at(index).blendmasktm); - - if (complexsoft == 0) { - lapmasktm->setValue(pp->locallab.spots.at(index).lapmasktm); - } else { - lapmasktm->setValue(0.); - } - + lapmasktm->setValue(pp->locallab.spots.at(index).lapmasktm); radmasktm->setValue(pp->locallab.spots.at(index).radmasktm); chromasktm->setValue(pp->locallab.spots.at(index).chromasktm); - - if (complexsoft < 2) { - gammasktm->setValue(pp->locallab.spots.at(index).gammasktm); - slomasktm->setValue(pp->locallab.spots.at(index).slomasktm); - } else { - gammasktm->setValue(1.); - slomasktm->setValue(0.); - } - + gammasktm->setValue(pp->locallab.spots.at(index).gammasktm); + slomasktm->setValue(pp->locallab.spots.at(index).slomasktm); Lmasktmshape->setCurve(pp->locallab.spots.at(index).Lmasktmcurve); } // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Note: No need to manage pedited as batch mode is deactivated for Locallab } @@ -441,6 +400,7 @@ 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).complextonemap = complexity->get_active_row_number(); pp->locallab.spots.at(index).amount = amount->getValue(); pp->locallab.spots.at(index).stren = stren->getValue(); @@ -655,6 +615,46 @@ void LocallabTone::enabledChanged() } } +void LocallabTone::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + gamma->setValue(defSpot.gamma); + satur->setValue(defSpot.satur); + rewei->setValue((double)defSpot.rewei); + lapmasktm->setValue(defSpot.lapmasktm); + gammasktm->setValue(defSpot.gammasktm); + slomasktm->setValue(defSpot.slomasktm); + + // Enable all listeners + enableListener(); +} + +void LocallabTone::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + gamma->hide(); + satur->hide(); + rewei->hide(); + lapmasktm->hide(); + gammasktm->hide(); + slomasktm->hide(); + } else { + // Advanced widgets are shown in Expert mode + gamma->show(); + satur->show(); + rewei->show(); + lapmasktm->show(); + gammasktm->show(); + slomasktm->show(); + } +} + void LocallabTone::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -784,7 +784,6 @@ LocallabRetinex::LocallabRetinex(): inversret(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_INVERS")))) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; const LocallabParams::LocallabSpot defSpot; @@ -1011,11 +1010,7 @@ LocallabRetinex::LocallabRetinex(): deharetiBox->pack_start(*str); deharetiBox->pack_start(*loglin); retiFrame->add(*deharetiBox); - - if (complexsoft < 1) { - auxBox->add(*retiFrame); - } - + auxBox->add(*retiFrame); ToolParamBlock* const scopeBox = Gtk::manage(new ToolParamBlock()); scopeBox->pack_start(*sensih); auxBox->add(*scopeBox); @@ -1146,8 +1141,6 @@ void LocallabRetinex::enableListener() void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -1159,17 +1152,12 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par exp->set_visible(pp->locallab.spots.at(index).visireti); exp->setEnabled(pp->locallab.spots.at(index).expreti); + complexity->set_active(pp->locallab.spots.at(index).complexreti); dehaz->setValue((double)pp->locallab.spots.at(index).dehaz); depth->setValue((double)pp->locallab.spots.at(index).depth); lumonly->set_active(pp->locallab.spots.at(index).lumonly); - - if (complexsoft < 2) { - str->setValue(pp->locallab.spots.at(index).str); - } else { - str->setValue(0.); - } - + str->setValue(pp->locallab.spots.at(index).str); loglin->set_active(pp->locallab.spots.at(index).loglin); sensih->setValue((double)pp->locallab.spots.at(index).sensih); @@ -1213,6 +1201,9 @@ void LocallabRetinex::read(const rtengine::procparams::ProcParams* pp, const Par // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update Retinex GUI according to scalereti adjuster value updateRetinexGUI1(); @@ -1232,6 +1223,7 @@ void LocallabRetinex::write(rtengine::procparams::ProcParams* pp, ParamsEdited* if (index < (int)pp->locallab.spots.size()) { pp->locallab.spots.at(index).expreti = exp->getEnabled(); pp->locallab.spots.at(index).visireti = exp->get_visible(); + pp->locallab.spots.at(index).complexreti = complexity->get_active_row_number(); pp->locallab.spots.at(index).dehaz = dehaz->getIntValue(); pp->locallab.spots.at(index).depth = depth->getIntValue(); @@ -1530,6 +1522,36 @@ void LocallabRetinex::enabledChanged() } } +void LocallabRetinex::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + str->setValue(defSpot.str); + loglin->set_active(defSpot.loglin); + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update Retinex GUI according to str adjuster value + updateRetinexGUI3(); +} + +void LocallabRetinex::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + retiFrame->hide(); + } else { + // Advanced widgets are shown in Expert mode + retiFrame->show(); + } +} + void LocallabRetinex::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -1728,7 +1750,6 @@ LocallabSharp::LocallabSharp(): showmasksharMethod(Gtk::manage(new MyComboBoxText())) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; // Parameter Sharpening specific widgets if (showtooltip) { @@ -1772,13 +1793,9 @@ LocallabSharp::LocallabSharp(): pack_start(*sharcontrast); pack_start(*sharradius); pack_start(*sharamount); - - if (complexsoft < 2) { - pack_start(*shardamping); - pack_start(*shariter); - pack_start(*sharblur); - } - + pack_start(*shardamping); + pack_start(*shariter); + pack_start(*sharblur); pack_start(*sensisha); pack_start(*inverssha); ToolParamBlock* const sharfBox = Gtk::manage(new ToolParamBlock()); @@ -1817,8 +1834,6 @@ void LocallabSharp::enableListener() void LocallabSharp::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -1830,21 +1845,14 @@ void LocallabSharp::read(const rtengine::procparams::ProcParams* pp, const Param exp->set_visible(pp->locallab.spots.at(index).visisharp); exp->setEnabled(pp->locallab.spots.at(index).expsharp); + complexity->set_active(pp->locallab.spots.at(index).complexsharp); sharcontrast->setValue((double)pp->locallab.spots.at(index).sharcontrast); sharradius->setValue(pp->locallab.spots.at(index).sharradius); sharamount->setValue((double)pp->locallab.spots.at(index).sharamount); - - if (complexsoft < 2) { - shardamping->setValue((double)pp->locallab.spots.at(index).shardamping); - shariter->setValue((double)pp->locallab.spots.at(index).shariter); - sharblur->setValue(pp->locallab.spots.at(index).sharblur); - } else { - shardamping->setValue(0.); - shariter->setValue(30.); - sharblur->setValue(0.2); - } - + shardamping->setValue((double)pp->locallab.spots.at(index).shardamping); + shariter->setValue((double)pp->locallab.spots.at(index).shariter); + sharblur->setValue(pp->locallab.spots.at(index).sharblur); sensisha->setValue((double)pp->locallab.spots.at(index).sensisha); inverssha->set_active(pp->locallab.spots.at(index).inverssha); } @@ -1852,6 +1860,9 @@ void LocallabSharp::read(const rtengine::procparams::ProcParams* pp, const Param // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Note: No need to manage pedited as batch mode is deactivated for Locallab } @@ -1862,6 +1873,7 @@ 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).complexsharp = complexity->get_active_row_number(); pp->locallab.spots.at(index).sharcontrast = sharcontrast->getIntValue(); pp->locallab.spots.at(index).sharradius = sharradius->getValue(); @@ -1965,6 +1977,37 @@ void LocallabSharp::enabledChanged() } } +void LocallabSharp::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + shardamping->setValue((double)defSpot.shardamping); + shariter->setValue((double)defSpot.shariter); + sharblur->setValue(defSpot.sharblur); + + // Enable all listeners + enableListener(); +} + +void LocallabSharp::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + shardamping->hide(); + shariter->hide(); + sharblur->hide(); + } else { + // Advanced widgets are shown in Expert mode + shardamping->show(); + shariter->show(); + sharblur->show(); + } +} + void LocallabSharp::inversshaChanged() { if (isLocActivated && exp->getEnabled()) { @@ -2090,7 +2133,6 @@ LocallabContrast::LocallabContrast(): Lmasklcshape(static_cast(mask2lcCurveEditorG->addCurve(CT_Diagonal, "L(L)"))) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; const LocallabParams::LocallabSpot defSpot; @@ -2104,10 +2146,6 @@ LocallabContrast::LocallabContrast(): localcontMethod->set_active(0); localcontMethodConn = localcontMethod->signal_changed().connect(sigc::mem_fun(*this, &LocallabContrast::localcontMethodChanged)); - if (complexsoft == 2) { - lcradius->setLimits(20, 100, 1, 80); - } - lcradius->setAdjusterListener(this); lcamount->setAdjusterListener(this); @@ -2164,12 +2202,13 @@ LocallabContrast::LocallabContrast(): claricres->setAdjusterListener(this); - clarisoft->setLogScale(10, -10); - clarisoft->setAdjusterListener(this); if (showtooltip) { clarisoft->set_tooltip_markup(M("TP_LOCALLAB_CLARISOFT_TOOLTIP")); } + clarisoft->setLogScale(10, -10); + clarisoft->setAdjusterListener(this); + origlcConn = origlc->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::origlcChanged)); Gtk::HBox* const LCTitleHBox = Gtk::manage(new Gtk::HBox()); @@ -2307,7 +2346,7 @@ LocallabContrast::LocallabContrast(): wavcompConn = wavcomp->signal_toggled().connect(sigc::mem_fun(*this, &LocallabContrast::wavcompChanged)); if (showtooltip) { - // sigmadc->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP")); + // sigmadc->set_tooltip_text(M("TP_LOCALLAB_COMPFRAME_TOOLTIP")); } sigmadc->setAdjusterListener(this); @@ -2404,11 +2443,8 @@ LocallabContrast::LocallabContrast(): mask2lcCurveEditorG->curveListComplete(); // Add Local contrast specific widgets to GUI - if (complexsoft < 2) { - pack_start(*localcontMethod); - } + pack_start(*localcontMethod); shresFrame->set_label_align(0.025, 0.5); - pack_start(*lcradius); pack_start(*lcamount); pack_start(*lcdarkness); @@ -2424,7 +2460,6 @@ LocallabContrast::LocallabContrast(): shresBox->pack_start(*residshathr); shresBox->pack_start(*residhi); shresBox->pack_start(*residhithr); - shresFrame->add(*shresBox); resiBox->pack_start(*shresFrame); expresidpyr->add(*resiBox, false); @@ -2514,18 +2549,14 @@ LocallabContrast::LocallabContrast(): compBox->pack_start(*sigmadc); compBox->pack_start(*deltad); compBox->pack_start(*LocalcurveEditorwavcomp, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor -// Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator()); -// compBox->pack_start(*separatorcomp); - //compBox->pack_start(*fatres); + // Gtk::HSeparator* const separatorcomp = Gtk::manage(new Gtk::HSeparator()); + // compBox->pack_start(*separatorcomp); + // compBox->pack_start(*fatres); compFrame->add(*compBox); blurcontBox2->pack_start(*compFrame); expcontrastpyr2->add(*blurcontBox2, false); pack_start(*expcontrastpyr2); - - if (complexsoft < 2) { - pack_start(*fftwlc); - } - + pack_start(*fftwlc); ToolParamBlock* const masklcBox = Gtk::manage(new ToolParamBlock()); masklcBox->pack_start(*showmasklcMethod, Gtk::PACK_SHRINK, 4); masklcBox->pack_start(*enalcMask, Gtk::PACK_SHRINK, 0); @@ -2614,8 +2645,6 @@ void LocallabContrast::enableListener() void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -2627,14 +2656,11 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa exp->set_visible(pp->locallab.spots.at(index).visicontrast); exp->setEnabled(pp->locallab.spots.at(index).expcontrast); + complexity->set_active(pp->locallab.spots.at(index).complexcontrast); - if (complexsoft < 2) { - if (pp->locallab.spots.at(index).localcontMethod == "loc") { - localcontMethod->set_active(0); - } else if (pp->locallab.spots.at(index).localcontMethod == "wav") { - localcontMethod->set_active(1); - } - } else { + if (pp->locallab.spots.at(index).localcontMethod == "loc") { + localcontMethod->set_active(0); + } else if (pp->locallab.spots.at(index).localcontMethod == "wav") { localcontMethod->set_active(1); } @@ -2711,13 +2737,7 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa deltad->setValue(pp->locallab.spots.at(index).deltad); wavshapecomp->setCurve(pp->locallab.spots.at(index).loccompwavcurve); fatres->setValue(pp->locallab.spots.at(index).fatres); - - if (complexsoft < 2) { - fftwlc->set_active(pp->locallab.spots.at(index).fftwlc); - } else { - fftwlc->set_active(false); - } - + fftwlc->set_active(pp->locallab.spots.at(index).fftwlc); enalcMask->set_active(pp->locallab.spots.at(index).enalcMask); CCmasklcshape->setCurve(pp->locallab.spots.at(index).CCmasklccurve); LLmasklcshape->setCurve(pp->locallab.spots.at(index).LLmasklccurve); @@ -2731,6 +2751,9 @@ void LocallabContrast::read(const rtengine::procparams::ProcParams* pp, const Pa // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Update Local contrast GUI according to localcontMethod combobox value updateContrastGUI1(); @@ -2750,6 +2773,7 @@ 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(); + pp->locallab.spots.at(index).complexcontrast = complexity->get_active_row_number(); if (localcontMethod->get_active_row_number() == 0) { pp->locallab.spots.at(index).localcontMethod = "loc"; @@ -3300,6 +3324,45 @@ void LocallabContrast::enabledChanged() } } +void LocallabContrast::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + if (defSpot.localcontMethod == "loc") { + localcontMethod->set_active(0); + } else if (defSpot.localcontMethod == "wav") { + localcontMethod->set_active(1); + } + + fftwlc->set_active(defSpot.fftwlc); + + // Enable all listeners + enableListener(); + + // Update GUI based on converted widget parameters: + // - Update Local contrast GUI according to localcontMethod combobox value + updateContrastGUI1(); + // - Update Local contrast GUI according to fftwlc button state + updateContrastGUI3(); +} + +void LocallabContrast::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + localcontMethod->hide(); + fftwlc->hide(); + } else { + // Advanced widgets are shown in Expert mode + localcontMethod->show(); + fftwlc->show(); + } +} + void LocallabContrast::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -3707,7 +3770,6 @@ LocallabCBDL::LocallabCBDL(): lumacontrastPlusButton(Gtk::manage(new Gtk::Button(M("TP_DIRPYREQUALIZER_LUMACONTRAST_PLUS")))) { const bool showtooltip = options.showtooltip; - const int complexsoft = options.complexity; const LocallabParams::LocallabSpot defSpot; @@ -3851,7 +3913,7 @@ LocallabCBDL::LocallabCBDL(): pack_start(*separator, Gtk::PACK_SHRINK, 2); pack_start(*chromacbdl); pack_start(*threshold); - // pack_start(*blurcbdl); + // pack_start(*blurcbdl); ToolParamBlock* const residBox = Gtk::manage(new ToolParamBlock()); residBox->pack_start(*clarityml); residBox->pack_start(*contresid); @@ -3865,11 +3927,7 @@ LocallabCBDL::LocallabCBDL(): maskcbBox->pack_start(*maskcbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor maskcbBox->pack_start(*blendmaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*radmaskcb, Gtk::PACK_SHRINK, 0); - - if (complexsoft < 1) { - maskcbBox->pack_start(*lapmaskcb, Gtk::PACK_SHRINK, 0); - } - + maskcbBox->pack_start(*lapmaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*chromaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*gammaskcb, Gtk::PACK_SHRINK, 0); maskcbBox->pack_start(*slomaskcb, Gtk::PACK_SHRINK, 0); @@ -3927,8 +3985,6 @@ void LocallabCBDL::enableListener() void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited) { - const int complexsoft = options.complexity; - // Disable all listeners disableListener(); @@ -3940,6 +3996,7 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params exp->set_visible(pp->locallab.spots.at(index).visicbdl); exp->setEnabled(pp->locallab.spots.at(index).expcbdl); + complexity->set_active(pp->locallab.spots.at(index).complexcbdl); for (int i = 0; i < 6; i++) { multiplier[i]->setValue(pp->locallab.spots.at(index).mult[i]); @@ -3958,13 +4015,7 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params HHmaskcbshape->setCurve(pp->locallab.spots.at(index).HHmaskcbcurve); blendmaskcb->setValue((double)pp->locallab.spots.at(index).blendmaskcb); radmaskcb->setValue(pp->locallab.spots.at(index).radmaskcb); - - if (complexsoft == 0) { - lapmaskcb->setValue(pp->locallab.spots.at(index).lapmaskcb); - } else { - lapmaskcb->setValue(0.); - } - + lapmaskcb->setValue(pp->locallab.spots.at(index).lapmaskcb); chromaskcb->setValue(pp->locallab.spots.at(index).chromaskcb); gammaskcb->setValue(pp->locallab.spots.at(index).gammaskcb); slomaskcb->setValue(pp->locallab.spots.at(index).slomaskcb); @@ -3974,6 +4025,9 @@ void LocallabCBDL::read(const rtengine::procparams::ProcParams* pp, const Params // Enable all listeners enableListener(); + // Update GUI according to complexity mode + updateGUIToMode(static_cast(complexity->get_active_row_number())); + // Note: No need to manage pedited as batch mode is deactivated for Locallab } @@ -3984,6 +4038,7 @@ 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(); + pp->locallab.spots.at(index).complexcbdl = complexity->get_active_row_number(); for (int i = 0; i < 6; i++) { pp->locallab.spots.at(index).mult[i] = multiplier[i]->getValue(); @@ -4200,6 +4255,31 @@ void LocallabCBDL::enabledChanged() } } +void LocallabCBDL::convertParamToNormal() +{ + const LocallabParams::LocallabSpot defSpot; + + // Disable all listeners + disableListener(); + + // Set hidden GUI widgets in Normal mode to default spot values + lapmaskcb->setValue(defSpot.lapmaskcb); + + // Enable all listeners + enableListener(); +} + +void LocallabCBDL::updateGUIToMode(const modeType new_type) +{ + if (new_type == Normal) { + // Advanced widgets are hidden in Normal mode + lapmaskcb->hide(); + } else { + // Advanced widgets are shown in Expert mode + lapmaskcb->show(); + } +} + void LocallabCBDL::updateMaskBackground(const double normChromar, const double normLumar, const double normHuer) { idle_register.add( @@ -4277,7 +4357,7 @@ void LocallabCBDL::lumacontrastPlusPressed() /* ==== LocallabLog ==== */ LocallabLog::LocallabLog(): - LocallabTool(this, M("TP_LOCALLAB_LOG_TOOLNAME"), M("TP_LOCALLAB_LOG"), false), + LocallabTool(this, M("TP_LOCALLAB_LOG_TOOLNAME"), M("TP_LOCALLAB_LOG"), false, false), // Log encoding specific widgets logPFrame(Gtk::manage(new Gtk::Frame(M("TP_LOCALLAB_LOGPFRA")))), diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index d9feb9134..a5c8138d3 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -1019,6 +1019,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexcolor = locallab.spots.at(j).complexcolor && pSpot.complexcolor == otherSpot.complexcolor; 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; locallab.spots.at(j).contrast = locallab.spots.at(j).contrast && pSpot.contrast == otherSpot.contrast; @@ -1081,6 +1082,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexexpose = locallab.spots.at(j).complexexpose && pSpot.complexexpose == otherSpot.complexexpose; 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; locallab.spots.at(j).hlcomprthresh = locallab.spots.at(j).hlcomprthresh && pSpot.hlcomprthresh == otherSpot.hlcomprthresh; @@ -1123,6 +1125,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexshadhigh = locallab.spots.at(j).complexshadhigh && pSpot.complexshadhigh == otherSpot.complexshadhigh; locallab.spots.at(j).shMethod = locallab.spots.at(j).shMethod && pSpot.shMethod == otherSpot.shMethod; for (int k = 0; k < 5; k++) { @@ -1158,6 +1161,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexvibrance = locallab.spots.at(j).complexvibrance && pSpot.complexvibrance == otherSpot.complexvibrance; 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; locallab.spots.at(j).warm = locallab.spots.at(j).warm && pSpot.warm == otherSpot.warm; @@ -1185,6 +1189,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexsoft = locallab.spots.at(j).complexsoft && pSpot.complexsoft == otherSpot.complexsoft; 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; @@ -1192,6 +1197,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexblur = locallab.spots.at(j).complexblur && pSpot.complexblur == otherSpot.complexblur; 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; locallab.spots.at(j).sensibn = locallab.spots.at(j).sensibn && pSpot.sensibn == otherSpot.sensibn; @@ -1241,6 +1247,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complextonemap = locallab.spots.at(j).complextonemap && pSpot.complextonemap == otherSpot.complextonemap; 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; locallab.spots.at(j).estop = locallab.spots.at(j).estop && pSpot.estop == otherSpot.estop; @@ -1266,6 +1273,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexreti = locallab.spots.at(j).complexreti && pSpot.complexreti == otherSpot.complexreti; 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; locallab.spots.at(j).chrrt = locallab.spots.at(j).chrrt && pSpot.chrrt == otherSpot.chrrt; @@ -1303,6 +1311,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexsharp = locallab.spots.at(j).complexsharp && pSpot.complexsharp == otherSpot.complexsharp; 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; locallab.spots.at(j).sharamount = locallab.spots.at(j).sharamount && pSpot.sharamount == otherSpot.sharamount; @@ -1314,6 +1323,7 @@ void ParamsEdited::initFrom(const std::vector& // 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).complexcontrast = locallab.spots.at(j).complexcontrast && pSpot.complexcontrast == otherSpot.complexcontrast; 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; locallab.spots.at(j).lcdarkness = locallab.spots.at(j).lcdarkness && pSpot.lcdarkness == otherSpot.lcdarkness; @@ -1384,6 +1394,7 @@ void ParamsEdited::initFrom(const std::vector& // 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; + locallab.spots.at(j).complexcbdl = locallab.spots.at(j).complexcbdl && pSpot.complexcbdl == otherSpot.complexcbdl; for (int k = 0; k < 6; k++) { locallab.spots.at(j).mult[k] = locallab.spots.at(j).mult[k] && pSpot.mult[k] == otherSpot.mult[k]; @@ -3043,6 +3054,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expcolor = mods.locallab.spots.at(i).expcolor; } + if (locallab.spots.at(i).complexcolor) { + toEdit.locallab.spots.at(i).complexcolor = mods.locallab.spots.at(i).complexcolor; + } + if (locallab.spots.at(i).curvactiv) { toEdit.locallab.spots.at(i).curvactiv = mods.locallab.spots.at(i).curvactiv; } @@ -3288,6 +3303,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expexpose = mods.locallab.spots.at(i).expexpose; } + if (locallab.spots.at(i).complexexpose) { + toEdit.locallab.spots.at(i).complexexpose = mods.locallab.spots.at(i).complexexpose; + } + if (locallab.spots.at(i).expcomp) { toEdit.locallab.spots.at(i).expcomp = mods.locallab.spots.at(i).expcomp; } @@ -3453,6 +3472,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expshadhigh = mods.locallab.spots.at(i).expshadhigh; } + if (locallab.spots.at(i).complexshadhigh) { + toEdit.locallab.spots.at(i).complexshadhigh = mods.locallab.spots.at(i).complexshadhigh; + } + if (locallab.spots.at(i).shMethod) { toEdit.locallab.spots.at(i).shMethod = mods.locallab.spots.at(i).shMethod; } @@ -3576,6 +3599,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expvibrance = mods.locallab.spots.at(i).expvibrance; } + if (locallab.spots.at(i).complexvibrance) { + toEdit.locallab.spots.at(i).complexvibrance = mods.locallab.spots.at(i).complexvibrance; + } + if (locallab.spots.at(i).saturated) { toEdit.locallab.spots.at(i).saturated = mods.locallab.spots.at(i).saturated; } @@ -3681,6 +3708,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expsoft = mods.locallab.spots.at(i).expsoft; } + if (locallab.spots.at(i).complexsoft) { + toEdit.locallab.spots.at(i).complexsoft = mods.locallab.spots.at(i).complexsoft; + } + if (locallab.spots.at(i).streng) { toEdit.locallab.spots.at(i).streng = mods.locallab.spots.at(i).streng; } @@ -3706,6 +3737,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expblur = mods.locallab.spots.at(i).expblur; } + if (locallab.spots.at(i).complexblur) { + toEdit.locallab.spots.at(i).complexblur = mods.locallab.spots.at(i).complexblur; + } + if (locallab.spots.at(i).radius) { toEdit.locallab.spots.at(i).radius = mods.locallab.spots.at(i).radius; } @@ -3899,6 +3934,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).exptonemap = mods.locallab.spots.at(i).exptonemap; } + if (locallab.spots.at(i).complextonemap) { + toEdit.locallab.spots.at(i).complextonemap = mods.locallab.spots.at(i).complextonemap; + } + if (locallab.spots.at(i).stren) { toEdit.locallab.spots.at(i).stren = mods.locallab.spots.at(i).stren; } @@ -3996,6 +4035,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expreti = mods.locallab.spots.at(i).expreti; } + if (locallab.spots.at(i).complexreti) { + toEdit.locallab.spots.at(i).complexreti = mods.locallab.spots.at(i).complexreti; + } + if (locallab.spots.at(i).retinexMethod) { toEdit.locallab.spots.at(i).retinexMethod = mods.locallab.spots.at(i).retinexMethod; } @@ -4141,6 +4184,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expsharp = mods.locallab.spots.at(i).expsharp; } + if (locallab.spots.at(i).complexsharp) { + toEdit.locallab.spots.at(i).complexsharp = mods.locallab.spots.at(i).complexsharp; + } + if (locallab.spots.at(i).sharcontrast) { toEdit.locallab.spots.at(i).sharcontrast = mods.locallab.spots.at(i).sharcontrast; } @@ -4182,6 +4229,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expcontrast = mods.locallab.spots.at(i).expcontrast; } + if (locallab.spots.at(i).complexcontrast) { + toEdit.locallab.spots.at(i).complexcontrast = mods.locallab.spots.at(i).complexcontrast; + } + if (locallab.spots.at(i).lcradius) { toEdit.locallab.spots.at(i).lcradius = mods.locallab.spots.at(i).lcradius; } @@ -4460,6 +4511,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.spots.at(i).expcbdl = mods.locallab.spots.at(i).expcbdl; } + if (locallab.spots.at(i).complexcbdl) { + toEdit.locallab.spots.at(i).complexcbdl = mods.locallab.spots.at(i).complexcbdl; + } + for (int j = 0; j < 6; j++) { if (locallab.spots.at(i).mult[j]) { toEdit.locallab.spots.at(i).mult[j] = mods.locallab.spots.at(i).mult[j]; @@ -5703,6 +5758,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Color & Light visicolor(v), expcolor(v), + complexcolor(v), curvactiv(v), lightness(v), contrast(v), @@ -5765,6 +5821,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Exposure visiexpose(v), expexpose(v), + complexexpose(v), expcomp(v), hlcompr(v), hlcomprthresh(v), @@ -5807,6 +5864,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Shadow highlight visishadhigh(v), expshadhigh(v), + complexshadhigh(v), shMethod(v), multsh{v, v, v, v, v, v}, highlights(v), @@ -5838,6 +5896,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Vibrance visivibrance(v), expvibrance(v), + complexvibrance(v), saturated(v), pastels(v), warm(v), @@ -5865,6 +5924,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Soft Light visisoft(v), expsoft(v), + complexsoft(v), streng(v), sensisf(v), laplace(v), @@ -5872,6 +5932,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Blur & Noise visiblur(v), expblur(v), + complexblur(v), radius(v), strength(v), sensibn(v), @@ -5921,6 +5982,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Tone Mapping visitonemap(v), exptonemap(v), + complextonemap(v), stren(v), gamma(v), estop(v), @@ -5946,6 +6008,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Retinex visireti(v), expreti(v), + complexreti(v), retinexMethod(v), str(v), chrrt(v), @@ -5983,6 +6046,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Sharpening visisharp(v), expsharp(v), + complexsharp(v), sharcontrast(v), sharradius(v), sharamount(v), @@ -5994,6 +6058,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Local Contrast visicontrast(v), expcontrast(v), + complexcontrast(v), lcradius(v), lcamount(v), lcdarkness(v), @@ -6064,6 +6129,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) : // Contrast by detail levels visicbdl(v), expcbdl(v), + complexcbdl(v), mult{v, v, v, v, v, v}, chromacbdl(v), threshold(v), @@ -6138,6 +6204,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Color & Light visicolor = v; expcolor = v; + complexcolor = v; curvactiv = v; lightness = v; contrast = v; @@ -6200,6 +6267,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Exposure visiexpose = v; expexpose = v; + complexexpose = v; expcomp = v; hlcompr = v; hlcomprthresh = v; @@ -6242,6 +6310,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Shadow highlight visishadhigh = v; expshadhigh = v; + complexshadhigh = v; shMethod = v; for (int i = 0; i < 5; i++) { @@ -6277,6 +6346,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Vibrance visivibrance = v; expvibrance = v; + complexvibrance = v; saturated = v; pastels = v; warm = v; @@ -6304,6 +6374,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Soft Light visisoft = v; expsoft = v; + complexsoft = v; streng = v; sensisf = v; laplace = v; @@ -6311,6 +6382,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Blur & Noise visiblur = v; expblur = v; + complexblur = v; radius = v; strength = v; sensibn = v; @@ -6360,6 +6432,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Tone Mapping visitonemap = v; exptonemap = v; + complextonemap = v; stren = v; gamma = v; estop = v; @@ -6385,6 +6458,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Retinex visireti = v; expreti = v; + complexreti = v; retinexMethod = v; str = v; chrrt = v; @@ -6422,6 +6496,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Sharpening visisharp = v; expsharp = v; + complexsharp = v; sharcontrast = v; sharradius = v; sharamount = v; @@ -6433,6 +6508,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Local Contrast visicontrast = v; expcontrast = v; + complexcontrast = v; lcradius = v; lcamount = v; lcdarkness = v; @@ -6503,6 +6579,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v) // Contrast by detail levels visicbdl = v; expcbdl = v; + complexcbdl = v; for (int i = 0; i < 6; i++) { mult[i] = v; diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index d11569ab7..2149bea02 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -423,6 +423,7 @@ public: // Color & Light bool visicolor; bool expcolor; + bool complexcolor; bool curvactiv; bool lightness; bool contrast; @@ -485,6 +486,7 @@ public: // Exposure bool visiexpose; bool expexpose; + bool complexexpose; bool expcomp; bool hlcompr; bool hlcomprthresh; @@ -527,6 +529,7 @@ public: // Shadow highlight bool visishadhigh; bool expshadhigh; + bool complexshadhigh; bool shMethod; bool multsh[6]; bool highlights; @@ -558,6 +561,7 @@ public: // Vibrance bool visivibrance; bool expvibrance; + bool complexvibrance; bool saturated; bool pastels; bool warm; @@ -585,6 +589,7 @@ public: // Soft Light bool visisoft; bool expsoft; + bool complexsoft; bool streng; bool sensisf; bool laplace; @@ -592,6 +597,7 @@ public: // Blur & Noise bool visiblur; bool expblur; + bool complexblur; bool radius; bool strength; bool sensibn; @@ -641,6 +647,7 @@ public: // Tone Mapping bool visitonemap; bool exptonemap; + bool complextonemap; bool stren; bool gamma; bool estop; @@ -666,6 +673,7 @@ public: // Retinex bool visireti; bool expreti; + bool complexreti; bool retinexMethod; bool str; bool chrrt; @@ -703,6 +711,7 @@ public: // Sharpening bool visisharp; bool expsharp; + bool complexsharp; bool sharcontrast; bool sharradius; bool sharamount; @@ -714,6 +723,7 @@ public: // Local Contrast bool visicontrast; bool expcontrast; + bool complexcontrast; bool lcradius; bool lcamount; bool lcdarkness; @@ -784,6 +794,7 @@ public: // Contrast by detail levels bool visicbdl; bool expcbdl; + bool complexcbdl; bool mult[6]; bool chromacbdl; bool threshold;