diff --git a/rtengine/procparams.cc b/rtengine/procparams.cc index 387e03858..b351aed71 100644 --- a/rtengine/procparams.cc +++ b/rtengine/procparams.cc @@ -2282,22 +2282,38 @@ LocallabParams::LocallabParams() : transit(), thresh(), iter(), + // Color & Light + expcolor(), + curvactiv(), + lightness(), + contrast(), + chroma(), + sensi(), + qualitycurveMethod(), + llcurve(), + cccurve(), + LHcurve(), + HHcurve(), + invers(), + // Exposure + /* llcurve{ DCT_NURBS, 0.0, 0.0, 1.0, 1.0, -}, -cccurve{ + }, + cccurve{ DCT_NURBS, 0.0, 0.0, 1.0, 1.0, -}, -excurve{ + }, + */ + excurve{ DCT_NURBS, 0.0, 0.0, @@ -2334,6 +2350,7 @@ localTgaincurverab{ 0.35, 0.35 }, +/* LHcurve{ static_cast(FCT_MinMaxCPoints), 0.0, @@ -2388,29 +2405,12 @@ HHcurve{ 0.35, 0.35 }, +*/ skintonescurve { DCT_Linear } /* -enabled(false), -degree(0), -locY(250), -locX(250), -locYT(250), -locXL(250), -centerX(0), -centerY(0), -circrad(18), -centerXbuf(0), -centerYbuf(0), adjblur(0), -qualityMethod("enh"), -qualitycurveMethod("none"), -proxi(0), -thres(18), -lightness(0), -contrast(0), -chroma(0), warm(0), expcomp(0), black(0), @@ -2437,7 +2437,6 @@ sharradius(40), sharamount(75), shardamping(75), shariter(30), -sensi(19), sensiex(19), sensih(19), retrab(500), @@ -2456,16 +2455,9 @@ scaltm(10), rewei(0), transit(60), avoid(false), -Smethod("IND"), -Exclumethod("norm"), -shapemethod("ELI"), retinexMethod("high"), -blurMethod("norm"), -dustMethod("mov"), -invers(false), cutpast(false), lastdust(false), -curvactiv(false), activlum(false), inversrad(false), inversret(false), @@ -2488,7 +2480,6 @@ mult{ 1.0, 1.0, }, -expcolor(false), expexpose(false), expvibrance(false), expblur(false), @@ -2498,8 +2489,7 @@ expsharp(false), expcbdl(false), expdenoi(false), threshold(20), -chromacbdl(0), -spotduplicated(false) +chromacbdl(0) */ { } @@ -2528,25 +2518,24 @@ bool LocallabParams::operator ==(const LocallabParams& other) const && qualityMethod == other.qualityMethod && transit == other.transit && thresh == other.thresh - && iter == other.iter; + && iter == other.iter + // Color & Light + && expcolor == other.expcolor + && curvactiv == other.curvactiv + && lightness == other.lightness + && contrast == other.contrast + && chroma == other.chroma + && sensi == other.sensi + && qualitycurveMethod == other.qualitycurveMethod + && llcurve == other.llcurve + && cccurve == other.cccurve + && LHcurve == other.LHcurve + && HHcurve == other.HHcurve + && invers == other.invers + // Exposure + ; /* - && qualityMethod == other.qualityMethod - && qualitycurveMethod == other.qualitycurveMethod - && locY == other.locY - && locX == other.locX - && locYT == other.locYT - && locXL == other.locXL - && centerX == other.centerX - && centerY == other.centerY - && circrad == other.circrad - && centerXbuf == other.centerXbuf - && centerYbuf == other.centerYbuf && adjblur == other.adjblur - && thres == other.thres - && proxi == other.proxi - && lightness == other.lightness - && contrast == other.contrast - && chroma == other.chroma && warm == other.warm && expcomp == other.expcomp && hlcompr == other.hlcompr @@ -2602,12 +2591,9 @@ bool LocallabParams::operator ==(const LocallabParams& other) const && estop == other.estop && scaltm == other.scaltm && rewei == other.rewei - && transit == other.transit && chrrt == other.chrrt && str == other.str && neigh == other.neigh - && nbspot == other.nbspot - && anbspot == other.anbspot && hueref == other.hueref && huerefblur == other.huerefblur && chromaref == other.chromaref @@ -2616,7 +2602,6 @@ bool LocallabParams::operator ==(const LocallabParams& other) const && vart == other.vart && threshold == other.threshold && chromacbdl == other.chromacbdl - && expcolor == other.expcolor && expexpose == other.expexpose && expvibrance == other.expvibrance && expblur == other.expblur @@ -2627,13 +2612,6 @@ bool LocallabParams::operator ==(const LocallabParams& other) const && expdenoi == other.expdenoi && localTgaincurve == other.localTgaincurve && localTgaincurverab == other.localTgaincurverab - && llcurve == other.llcurve - && cccurve == other.cccurve - && LHcurve == other.LHcurve - && HHcurve == other.HHcurve - && id == other.id - && name == other.name - && isvisible == other.isvisible; */ } @@ -2643,7 +2621,7 @@ bool LocallabParams::operator !=(const LocallabParams& other) const return !(*this == other); } - +/* void LocallabParams::getCurves( LocretigainCurve &cTgainCurve, LocretigainCurverab &cTgainCurverab, @@ -2658,6 +2636,7 @@ void LocallabParams::getCurves( hhCurve.Set(this->HHcurve, HHutili); } +*/ DirPyrEqualizerParams::DirPyrEqualizerParams() : @@ -3530,10 +3509,23 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.transit, "Locallab", "Transit_" + std::to_string(i), locallab.transit.at(i), keyFile); saveToKeyfile(!pedited || pedited->locallab.thresh, "Locallab", "Thresh_" + std::to_string(i), locallab.thresh.at(i), keyFile); saveToKeyfile(!pedited || pedited->locallab.iter, "Locallab", "Iter_" + std::to_string(i), locallab.iter.at(i), keyFile); + // Color & Light + saveToKeyfile(!pedited || pedited->locallab.expcolor, "Locallab", "Expcolor_" + std::to_string(i), locallab.expcolor.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.curvactiv, "Locallab", "Curvactiv_" + std::to_string(i), locallab.curvactiv.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.lightness, "Locallab", "Lightness_" + std::to_string(i), locallab.lightness.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.contrast, "Locallab", "Contrast_" + std::to_string(i), locallab.contrast.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.chroma, "Locallab", "Chroma_" + std::to_string(i), locallab.chroma.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.sensi, "Locallab", "Sensi_" + std::to_string(i), locallab.sensi.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.qualitycurveMethod, "Locallab", "QualityCurveMethod_" + std::to_string(i), locallab.qualitycurveMethod.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.llcurve, "Locallab", "LLCurve_" + std::to_string(i), locallab.llcurve.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.cccurve, "Locallab", "CCCurve_" + std::to_string(i), locallab.cccurve.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.LHcurve, "Locallab", "LHCurve_" + std::to_string(i), locallab.LHcurve.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.HHcurve, "Locallab", "HHCurve_" + std::to_string(i), locallab.HHcurve.at(i), keyFile); + saveToKeyfile(!pedited || pedited->locallab.invers, "Locallab", "Invers_" + std::to_string(i), locallab.invers.at(i), keyFile); + // Exposure } /* - saveToKeyfile(!pedited || pedited->locallab.expcolor, "Locallab", "Expcolor", locallab.expcolor, keyFile); saveToKeyfile(!pedited || pedited->locallab.expexpose, "Locallab", "Expexpose", locallab.expexpose, keyFile); saveToKeyfile(!pedited || pedited->locallab.expvibrance, "Locallab", "Expvibrance", locallab.expvibrance, keyFile); saveToKeyfile(!pedited || pedited->locallab.expblur, "Locallab", "Expblur", locallab.expblur, keyFile); @@ -3543,44 +3535,20 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.expcbdl, "Locallab", "Expcbdl", locallab.expcbdl, keyFile); saveToKeyfile(!pedited || pedited->locallab.expdenoi, "Locallab", "Expdenoi", locallab.expdenoi, keyFile); saveToKeyfile(!pedited || pedited->locallab.localTgaincurve, "Locallab", "TgainCurve", locallab.localTgaincurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.llcurve, "Locallab", "LLCurve", locallab.llcurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.cccurve, "Locallab", "CCCurve", locallab.cccurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.LHcurve, "Locallab", "LHCurve", locallab.LHcurve, keyFile); - saveToKeyfile(!pedited || pedited->locallab.HHcurve, "Locallab", "HHCurve", locallab.HHcurve, keyFile); saveToKeyfile(!pedited || pedited->locallab.localTgaincurverab, "Locallab", "TgainCurverab", locallab.localTgaincurverab, keyFile); saveToKeyfile(!pedited || pedited->locallab.avoid, "Locallab", "Avoid", locallab.avoid, keyFile); - saveToKeyfile(!pedited || pedited->locallab.invers, "Locallab", "Invers", locallab.invers, keyFile); saveToKeyfile(!pedited || pedited->locallab.cutpast, "Locallab", "Cutpast", locallab.cutpast, keyFile); saveToKeyfile(!pedited || pedited->locallab.lastdust, "Locallab", "Lastdust", locallab.lastdust, keyFile); - saveToKeyfile(!pedited || pedited->locallab.curvactiv, "Locallab", "Curvactiv", locallab.curvactiv, keyFile); saveToKeyfile(!pedited || pedited->locallab.activlum, "Locallab", "activlum", locallab.activlum, keyFile); saveToKeyfile(!pedited || pedited->locallab.inversrad, "Locallab", "Inversrad", locallab.inversrad, keyFile); saveToKeyfile(!pedited || pedited->locallab.inverssha, "Locallab", "Inverssha", locallab.inverssha, keyFile); saveToKeyfile(!pedited || pedited->locallab.inversret, "Locallab", "Inversret", locallab.inversret, keyFile); - saveToKeyfile(!pedited || pedited->locallab.degree, "Locallab", "Degree", locallab.degree, keyFile); - saveToKeyfile(!pedited || pedited->locallab.Smethod, "Locallab", "Smethod", locallab.Smethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.Exclumethod, "Locallab", "Exclumethod", locallab.Exclumethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.shapemethod, "Locallab", "Shapemethod", locallab.shapemethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.retinexMethod, "Locallab", "retinexMethod", locallab.retinexMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.blurMethod, "Locallab", "BlurMethod", locallab.blurMethod, keyFile); saveToKeyfile(!pedited || pedited->locallab.dustMethod, "Locallab", "DustMethod", locallab.dustMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.qualityMethod, "Locallab", "qualityMethod", locallab.qualityMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.qualitycurveMethod, "Locallab", "qualitycurveMethod", locallab.qualitycurveMethod, keyFile); - saveToKeyfile(!pedited || pedited->locallab.locY, "Locallab", "LocY", locallab.locY, keyFile); - saveToKeyfile(!pedited || pedited->locallab.locX, "Locallab", "LocX", locallab.locX, keyFile); - saveToKeyfile(!pedited || pedited->locallab.locYT, "Locallab", "LocYT", locallab.locYT, keyFile); - saveToKeyfile(!pedited || pedited->locallab.locXL, "Locallab", "LocXL", locallab.locXL, keyFile); - saveToKeyfile(!pedited || pedited->locallab.centerX, "Locallab", "CenterX", locallab.centerX, keyFile); - saveToKeyfile(!pedited || pedited->locallab.centerY, "Locallab", "CenterY", locallab.centerY, keyFile); - saveToKeyfile(!pedited || pedited->locallab.circrad, "Locallab", "Circrad", locallab.circrad, keyFile); - saveToKeyfile(!pedited || pedited->locallab.centerXbuf, "Locallab", "CenterXbuf", locallab.centerXbuf, keyFile); - saveToKeyfile(!pedited || pedited->locallab.centerYbuf, "Locallab", "CenterYbuf", locallab.centerYbuf, keyFile); saveToKeyfile(!pedited || pedited->locallab.adjblur, "Locallab", "Adjblur", locallab.adjblur, keyFile); - saveToKeyfile(!pedited || pedited->locallab.thres, "Locallab", "Thres", locallab.thres, keyFile); - saveToKeyfile(!pedited || pedited->locallab.proxi, "Locallab", "Proxi", locallab.proxi, keyFile); - saveToKeyfile(!pedited || pedited->locallab.lightness, "Locallab", "Lightness", locallab.lightness, keyFile); - saveToKeyfile(!pedited || pedited->locallab.contrast, "Locallab", "Contrast", locallab.contrast, keyFile); - saveToKeyfile(!pedited || pedited->locallab.chroma, "Locallab", "Chroma", locallab.chroma, keyFile); saveToKeyfile(!pedited || pedited->locallab.warm, "Locallab", "Warm", locallab.warm, keyFile); saveToKeyfile(!pedited || pedited->locallab.expcomp, "Locallab", "Expcomp", locallab.expcomp, keyFile); saveToKeyfile(!pedited || pedited->locallab.hlcompr, "Locallab", "Hlcompr", locallab.hlcompr, keyFile); @@ -3610,7 +3578,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.sharamount, "Locallab", "Sharamount", locallab.sharamount, keyFile); saveToKeyfile(!pedited || pedited->locallab.shardamping, "Locallab", "Shardamping", locallab.shardamping, keyFile); saveToKeyfile(!pedited || pedited->locallab.shariter, "Locallab", "Shariter", locallab.shariter, keyFile); - saveToKeyfile(!pedited || pedited->locallab.sensi, "Locallab", "Sensi", locallab.sensi, keyFile); saveToKeyfile(!pedited || pedited->locallab.sensiex, "Locallab", "Sensiex", locallab.sensiex, keyFile); saveToKeyfile(!pedited || pedited->locallab.sensitm, "Locallab", "Sensitm", locallab.sensitm, keyFile); saveToKeyfile(!pedited || pedited->locallab.sensisha, "Locallab", "Sensisha", locallab.sensisha, keyFile); @@ -3624,8 +3591,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.chrrt, "Locallab", "Chrrt", locallab.chrrt, keyFile); saveToKeyfile(!pedited || pedited->locallab.str, "Locallab", "Str", locallab.str, keyFile); saveToKeyfile(!pedited || pedited->locallab.neigh, "Locallab", "Neigh", locallab.neigh, keyFile); - saveToKeyfile(!pedited || pedited->locallab.nbspot, "Locallab", "Nbspot", locallab.nbspot, keyFile); - saveToKeyfile(!pedited || pedited->locallab.anbspot, "Locallab", "ANbspot", locallab.anbspot, keyFile); saveToKeyfile(!pedited || pedited->locallab.hueref, "Locallab", "Hueref", locallab.hueref, keyFile); saveToKeyfile(!pedited || pedited->locallab.huerefblur, "Locallab", "Huerefblur", locallab.huerefblur, keyFile); saveToKeyfile(!pedited || pedited->locallab.chromaref, "Locallab", "Chromaref", locallab.chromaref, keyFile); @@ -3649,10 +3614,6 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo saveToKeyfile(!pedited || pedited->locallab.estop, "Locallab", "Estop", locallab.estop, keyFile); saveToKeyfile(!pedited || pedited->locallab.scaltm, "Locallab", "Scaltm", locallab.scaltm, keyFile); saveToKeyfile(!pedited || pedited->locallab.rewei, "Locallab", "Rewei", locallab.rewei, keyFile); - saveToKeyfile(!pedited || pedited->locallab.spotduplicated, "Locallab", "Spotduplicated", locallab.spotduplicated, keyFile); - saveToKeyfile(!pedited || pedited->locallab.id, "Locallab", "Id", locallab.id, keyFile); - saveToKeyfile(!pedited || pedited->locallab.name, "Locallab", "Name", locallab.name, keyFile); - saveToKeyfile(!pedited || pedited->locallab.isvisible, "Locallab", "Isvisible", locallab.isvisible, keyFile); */ // Post-crop vignette @@ -4673,6 +4634,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) // Resize locallab settings if required if (locallab.nbspot > (int)locallab.id.size()) { + // Control spot settings locallab.id.resize(locallab.nbspot); locallab.name.resize(locallab.nbspot); locallab.isvisible.resize(locallab.nbspot); @@ -4690,6 +4652,20 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) locallab.transit.resize(locallab.nbspot); locallab.thresh.resize(locallab.nbspot); locallab.iter.resize(locallab.nbspot); + // Color & Light + locallab.expcolor.resize(locallab.nbspot); + locallab.curvactiv.resize(locallab.nbspot); + locallab.lightness.resize(locallab.nbspot); + locallab.contrast.resize(locallab.nbspot); + locallab.chroma.resize(locallab.nbspot); + locallab.sensi.resize(locallab.nbspot); + locallab.qualitycurveMethod.resize(locallab.nbspot); + locallab.llcurve.resize(locallab.nbspot); + locallab.cccurve.resize(locallab.nbspot); + locallab.LHcurve.resize(locallab.nbspot); + locallab.HHcurve.resize(locallab.nbspot); + locallab.invers.resize(locallab.nbspot); + // Exposure } for (int i = 0; i < locallab.nbspot; i++) { @@ -4711,10 +4687,23 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Transit_" + std::to_string(i), pedited, locallab.transit.at(i), pedited->locallab.transit); assignFromKeyfile(keyFile, "Locallab", "Thresh_" + std::to_string(i), pedited, locallab.thresh.at(i), pedited->locallab.thresh); assignFromKeyfile(keyFile, "Locallab", "Iter_" + std::to_string(i), pedited, locallab.iter.at(i), pedited->locallab.iter); + // Color & Light + assignFromKeyfile(keyFile, "Locallab", "Expcolor_" + std::to_string(i), pedited, locallab.expcolor.at(i), pedited->locallab.expcolor); + assignFromKeyfile(keyFile, "Locallab", "Curvactiv_" + std::to_string(i), pedited, locallab.curvactiv.at(i), pedited->locallab.curvactiv); + assignFromKeyfile(keyFile, "Locallab", "Lightness_" + std::to_string(i), pedited, locallab.lightness.at(i), pedited->locallab.lightness); + assignFromKeyfile(keyFile, "Locallab", "Contrast_" + std::to_string(i), pedited, locallab.contrast.at(i), pedited->locallab.contrast); + assignFromKeyfile(keyFile, "Locallab", "Chroma_" + std::to_string(i), pedited, locallab.chroma.at(i), pedited->locallab.chroma); + assignFromKeyfile(keyFile, "Locallab", "Sensi_" + std::to_string(i), pedited, locallab.sensi.at(i), pedited->locallab.sensi); + assignFromKeyfile(keyFile, "Locallab", "QualityCurveMethod_" + std::to_string(i), pedited, locallab.qualitycurveMethod.at(i), pedited->locallab.qualitycurveMethod); + assignFromKeyfile(keyFile, "Locallab", "LLCurve_" + std::to_string(i), pedited, locallab.llcurve.at(i), pedited->locallab.llcurve); + assignFromKeyfile(keyFile, "Locallab", "CCCurve_" + std::to_string(i), pedited, locallab.cccurve.at(i), pedited->locallab.cccurve); + assignFromKeyfile(keyFile, "Locallab", "LHCurve_" + std::to_string(i), pedited, locallab.LHcurve.at(i), pedited->locallab.LHcurve); + assignFromKeyfile(keyFile, "Locallab", "HHCurve_" + std::to_string(i), pedited, locallab.HHcurve.at(i), pedited->locallab.HHcurve); + assignFromKeyfile(keyFile, "Locallab", "Invers_" + std::to_string(i), pedited, locallab.invers.at(i), pedited->locallab.invers); + // Exposure } /* - assignFromKeyfile(keyFile, "Locallab", "Expcolor", pedited, locallab.expcolor, pedited->locallab.expcolor); assignFromKeyfile(keyFile, "Locallab", "Expcbdl", pedited, locallab.expcbdl, pedited->locallab.expcbdl); assignFromKeyfile(keyFile, "Locallab", "Expexpose", pedited, locallab.expexpose, pedited->locallab.expexpose); assignFromKeyfile(keyFile, "Locallab", "Expvibrance", pedited, locallab.expvibrance, pedited->locallab.expvibrance); @@ -4725,40 +4714,16 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Expdenoi", pedited, locallab.expdenoi, pedited->locallab.expdenoi); assignFromKeyfile(keyFile, "Locallab", "Avoid", pedited, locallab.avoid, pedited->locallab.avoid); assignFromKeyfile(keyFile, "Locallab", "TgainCurve", pedited, locallab.localTgaincurve, pedited->locallab.localTgaincurve); - assignFromKeyfile(keyFile, "Locallab", "LLCurve", pedited, locallab.llcurve, pedited->locallab.llcurve); - assignFromKeyfile(keyFile, "Locallab", "CCCurve", pedited, locallab.cccurve, pedited->locallab.cccurve); - assignFromKeyfile(keyFile, "Locallab", "LHCurve", pedited, locallab.LHcurve, pedited->locallab.LHcurve); - assignFromKeyfile(keyFile, "Locallab", "HHCurve", pedited, locallab.HHcurve, pedited->locallab.HHcurve); assignFromKeyfile(keyFile, "Locallab", "TgainCurverab", pedited, locallab.localTgaincurverab, pedited->locallab.localTgaincurverab); - assignFromKeyfile(keyFile, "Locallab", "Invers", pedited, locallab.invers, pedited->locallab.invers); assignFromKeyfile(keyFile, "Locallab", "Cutpast", pedited, locallab.cutpast, pedited->locallab.cutpast); assignFromKeyfile(keyFile, "Locallab", "Lastdust", pedited, locallab.lastdust, pedited->locallab.lastdust); - assignFromKeyfile(keyFile, "Locallab", "Curvactiv", pedited, locallab.curvactiv, pedited->locallab.curvactiv); assignFromKeyfile(keyFile, "Locallab", "activlum", pedited, locallab.activlum, pedited->locallab.activlum); assignFromKeyfile(keyFile, "Locallab", "Inversrad", pedited, locallab.inversrad, pedited->locallab.inversrad); assignFromKeyfile(keyFile, "Locallab", "Inverssha", pedited, locallab.inverssha, pedited->locallab.inverssha); assignFromKeyfile(keyFile, "Locallab", "Inversret", pedited, locallab.inversret, pedited->locallab.inversret); - assignFromKeyfile(keyFile, "Locallab", "Degree", pedited, locallab.degree, pedited->locallab.degree); - assignFromKeyfile(keyFile, "Locallab", "Smethod", pedited, locallab.Smethod, pedited->locallab.Smethod); assignFromKeyfile(keyFile, "Locallab", "Exclumethod", pedited, locallab.Exclumethod, pedited->locallab.Exclumethod); - assignFromKeyfile(keyFile, "Locallab", "Shapemethod", pedited, locallab.shapemethod, pedited->locallab.shapemethod); assignFromKeyfile(keyFile, "Locallab", "retinexMethod", pedited, locallab.retinexMethod, pedited->locallab.retinexMethod); - assignFromKeyfile(keyFile, "Locallab", "BlurMethod", pedited, locallab.blurMethod, pedited->locallab.blurMethod); - assignFromKeyfile(keyFile, "Locallab", "DustMethod", pedited, locallab.dustMethod, pedited->locallab.dustMethod); - assignFromKeyfile(keyFile, "Locallab", "qualitycurveMethod", pedited, locallab.qualitycurveMethod, pedited->locallab.qualitycurveMethod); - assignFromKeyfile(keyFile, "Locallab", "LocY", pedited, locallab.locY, pedited->locallab.locY); - assignFromKeyfile(keyFile, "Locallab", "LocX", pedited, locallab.locX, pedited->locallab.locX); - assignFromKeyfile(keyFile, "Locallab", "LocYT", pedited, locallab.locYT, pedited->locallab.locYT); - assignFromKeyfile(keyFile, "Locallab", "LocXL", pedited, locallab.locXL, pedited->locallab.locXL); - assignFromKeyfile(keyFile, "Locallab", "CenterX", pedited, locallab.centerX, pedited->locallab.centerX); - assignFromKeyfile(keyFile, "Locallab", "CenterY", pedited, locallab.centerY, pedited->locallab.centerY); - assignFromKeyfile(keyFile, "Locallab", "Circrad", pedited, locallab.circrad, pedited->locallab.circrad); - assignFromKeyfile(keyFile, "Locallab", "CenterXbuf", pedited, locallab.centerXbuf, pedited->locallab.centerXbuf); - assignFromKeyfile(keyFile, "Locallab", "CenterYbuf", pedited, locallab.centerYbuf, pedited->locallab.centerYbuf); assignFromKeyfile(keyFile, "Locallab", "Adjblur", pedited, locallab.adjblur, pedited->locallab.adjblur); - assignFromKeyfile(keyFile, "Locallab", "Thres", pedited, locallab.thres, pedited->locallab.thres); - assignFromKeyfile(keyFile, "Locallab", "Proxi", pedited, locallab.proxi, pedited->locallab.proxi); - assignFromKeyfile(keyFile, "Locallab", "Chroma", pedited, locallab.chroma, pedited->locallab.chroma); assignFromKeyfile(keyFile, "Locallab", "Warm", pedited, locallab.warm, pedited->locallab.warm); assignFromKeyfile(keyFile, "Locallab", "Expcomp", pedited, locallab.expcomp, pedited->locallab.expcomp); assignFromKeyfile(keyFile, "Locallab", "Hlcompr", pedited, locallab.hlcompr, pedited->locallab.hlcompr); @@ -4778,7 +4743,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Sharamount", pedited, locallab.sharamount, pedited->locallab.sharamount); assignFromKeyfile(keyFile, "Locallab", "Shardamping", pedited, locallab.shardamping, pedited->locallab.shardamping); assignFromKeyfile(keyFile, "Locallab", "Shariter", pedited, locallab.shariter, pedited->locallab.shariter); - assignFromKeyfile(keyFile, "Locallab", "Sensi", pedited, locallab.sensi, pedited->locallab.sensi); assignFromKeyfile(keyFile, "Locallab", "Sensiex", pedited, locallab.sensiex, pedited->locallab.sensiex); assignFromKeyfile(keyFile, "Locallab", "Sensitm", pedited, locallab.sensitm, pedited->locallab.sensitm); assignFromKeyfile(keyFile, "Locallab", "Sensisha", pedited, locallab.sensisha, pedited->locallab.sensisha); @@ -4793,16 +4757,12 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Chrrt", pedited, locallab.chrrt, pedited->locallab.chrrt); assignFromKeyfile(keyFile, "Locallab", "Str", pedited, locallab.str, pedited->locallab.str); assignFromKeyfile(keyFile, "Locallab", "Neigh", pedited, locallab.neigh, pedited->locallab.neigh); - assignFromKeyfile(keyFile, "Locallab", "Nbspot", pedited, locallab.nbspot, pedited->locallab.nbspot); - assignFromKeyfile(keyFile, "Locallab", "ANbspot", pedited, locallab.anbspot, pedited->locallab.anbspot); assignFromKeyfile(keyFile, "Locallab", "Hueref", pedited, locallab.hueref, pedited->locallab.hueref); assignFromKeyfile(keyFile, "Locallab", "Huerefblur", pedited, locallab.huerefblur, pedited->locallab.huerefblur); assignFromKeyfile(keyFile, "Locallab", "Chromaref", pedited, locallab.chromaref, pedited->locallab.chromaref); assignFromKeyfile(keyFile, "Locallab", "Lumaref", pedited, locallab.lumaref, pedited->locallab.lumaref); assignFromKeyfile(keyFile, "Locallab", "Sobelref", pedited, locallab.sobelref, pedited->locallab.sobelref); assignFromKeyfile(keyFile, "Locallab", "Vart", pedited, locallab.vart, pedited->locallab.vart); - assignFromKeyfile(keyFile, "Locallab", "Lightness", pedited, locallab.lightness, pedited->locallab.lightness); - assignFromKeyfile(keyFile, "Locallab", "Contrast", pedited, locallab.contrast, pedited->locallab.contrast); assignFromKeyfile(keyFile, "Locallab", "Sensiv", pedited, locallab.sensiv, pedited->locallab.sensiv); assignFromKeyfile(keyFile, "Locallab", "Pastels", pedited, locallab.pastels, pedited->locallab.pastels); assignFromKeyfile(keyFile, "Locallab", "Saturated", pedited, locallab.saturated, pedited->locallab.saturated); @@ -4847,10 +4807,6 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited) assignFromKeyfile(keyFile, "Locallab", "Threshold", pedited, locallab.threshold, pedited->locallab.threshold); assignFromKeyfile(keyFile, "Locallab", "Chromacbdl", pedited, locallab.chromacbdl, pedited->locallab.chromacbdl); - assignFromKeyfile(keyFile, "Locallab", "Spotduplicated", pedited, locallab.spotduplicated, pedited->locallab.spotduplicated); - assignFromKeyfile(keyFile, "Locallab", "Id", pedited, locallab.id, pedited->locallab.id); - assignFromKeyfile(keyFile, "Locallab", "Name", pedited, locallab.name, pedited->locallab.name); - assignFromKeyfile(keyFile, "Locallab", "Isvisible", pedited, locallab.isvisible, pedited->locallab.isvisible); */ } diff --git a/rtengine/procparams.h b/rtengine/procparams.h index d8880ab0b..d09de3e99 100644 --- a/rtengine/procparams.h +++ b/rtengine/procparams.h @@ -920,36 +920,29 @@ struct LocallabParams { std::vector transit; std::vector thresh; std::vector iter; + // Color & Light + std::vector expcolor; + std::vector curvactiv; + std::vector lightness; + std::vector contrast; + std::vector chroma; + std::vector sensi; + std::vector qualitycurveMethod; + std::vector> llcurve; + std::vector> cccurve; + std::vector> LHcurve; + std::vector> HHcurve; + std::vector invers; + // Exposure - std::vector llcurve; - std::vector cccurve; std::vector excurve; std::vector localTgaincurve; std::vector localTgaincurverab; - std::vector LHcurve; - std::vector HHcurve; std::vector skintonescurve; /* - bool enabled; - double degree; - int locY; - int locX; - int locYT; - int locXL; - int centerX; - int centerY; - int circrad; - int centerXbuf; - int centerYbuf; + int adjblur; - Glib::ustring qualityMethod; - Glib::ustring qualitycurveMethod; - int proxi; - int thres; - int lightness; - int contrast; - int chroma; int warm; int expcomp; int black; @@ -976,7 +969,6 @@ struct LocallabParams { int sharamount; int shardamping; int shariter; - int sensi; int sensiex; int sensih; int retrab; @@ -993,18 +985,12 @@ struct LocallabParams { int estop; int scaltm; int rewei; - int transit; bool avoid; - Glib::ustring Smethod; - Glib::ustring Exclumethod; - Glib::ustring shapemethod; Glib::ustring retinexMethod; Glib::ustring blurMethod; Glib::ustring dustMethod; - bool invers; bool cutpast; bool lastdust; - bool curvactiv; bool activlum; bool inversrad; bool inversret; @@ -1021,7 +1007,6 @@ struct LocallabParams { int vart; int chrrt; double mult[5]; - bool expcolor; bool expexpose; bool expvibrance; bool expblur; @@ -1032,10 +1017,6 @@ struct LocallabParams { bool expdenoi; double threshold; int chromacbdl; - bool spotduplicated; - int id; - Glib::ustring name; - bool isvisible; */ LocallabParams(); @@ -1043,6 +1024,7 @@ struct LocallabParams { bool operator ==(const LocallabParams& other) const; bool operator !=(const LocallabParams& other) const; + /* void getCurves( LocretigainCurve &cTgainCurve, LocretigainCurverab &cTgainCurverab, @@ -1051,6 +1033,7 @@ struct LocallabParams { bool &LHutili, bool &HHutili ) const; + */ }; diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index da7fc6997..33168b055 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -359,7 +359,7 @@ Locallab::Locallab(): llCurveEditorG->setCurveListener(this); llshape = static_cast(llCurveEditorG->addCurve(CT_Diagonal, "L(L)")); - llshape->setResetCurve(DiagonalCurveType(default_params.llcurve.at(0)), default_params.llcurve); + llshape->setResetCurve(DCT_NURBS, {(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}); llshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); milestones.push_back(GradientMilestone(0., 0., 0., 0.)); milestones.push_back(GradientMilestone(1., 1., 1., 1.)); @@ -367,7 +367,7 @@ Locallab::Locallab(): llshape->setLeftBarBgGradient(milestones); ccshape = static_cast(llCurveEditorG->addCurve(CT_Diagonal, "C(C)")); - ccshape->setResetCurve(DiagonalCurveType(default_params.cccurve.at(0)), default_params.cccurve); + ccshape->setResetCurve(DCT_NURBS, {(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}); ccshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); milestones.push_back(GradientMilestone(0., 0., 0., 0.)); milestones.push_back(GradientMilestone(1., 1., 1., 1.)); @@ -378,7 +378,7 @@ Locallab::Locallab(): LHshape = static_cast(llCurveEditorG->addCurve(CT_Flat, "L(H)", nullptr, false, true)); LHshape->setIdentityValue(0.); - LHshape->setResetCurve(FlatCurveType(default_params.LHcurve.at(0)), default_params.LHcurve); + LHshape->setResetCurve(FCT_MinMaxCPoints, {(double)FCT_MinMaxCPoints, 0.0, 0.50, 0.35, 0.35, 0.166, 0.50, 0.35, 0.35, 0.333, 0.50, 0.35, 0.35, 0.50, 0.50, 0.35, 0.35, 0.666, 0.50, 0.35, 0.35, 0.833, 0.50, 0.35, 0.35}); LHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); LHshape->setCurveColorProvider(this, 1); milestones.clear(); @@ -396,7 +396,7 @@ Locallab::Locallab(): HHshape = static_cast(llCurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true)); HHshape->setIdentityValue(0.); - HHshape->setResetCurve(FlatCurveType(default_params.HHcurve.at(0)), default_params.HHcurve); + HHshape->setResetCurve(FCT_MinMaxCPoints, {(double)FCT_MinMaxCPoints, 0.0, 0.50, 0.35, 0.35, 0.166, 0.50, 0.35, 0.35, 0.333, 0.50, 0.35, 0.35, 0.50, 0.50, 0.35, 0.35, 0.666, 0.50, 0.35, 0.35, 0.833, 0.50, 0.35, 0.35}); HHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP")); HHshape->setCurveColorProvider(this, 1); milestones.clear(); @@ -1206,13 +1206,13 @@ void Locallab::lumacontrastMinusPressed() } - +/* void Locallab::autoOpenCurve() { cTgainshape->openIfNonlinear(); } - +*/ int localChangedUI(void* data) { @@ -2116,6 +2116,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) if (pedited) { set_inconsistent(multiImage && !pedited->locallab.enabled); + // Control spot settings ControlSpotPanel::SpotEdited* const se = new ControlSpotPanel::SpotEdited(); if (pedited->locallab.nbspot) { @@ -2144,6 +2145,27 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) se->thresh = pedited->locallab.thresh; se->iter = pedited->locallab.iter; expsettings->setEditedStates(se); + + // Color & Light + expcolor->set_inconsistent(!pedited->locallab.expcolor); + curvactiv->set_inconsistent(multiImage && !pedited->locallab.curvactiv); + lightness->setEditedState(pedited->locallab.lightness ? Edited : UnEdited); + contrast->setEditedState(pedited->locallab.contrast ? Edited : UnEdited); + chroma->setEditedState(pedited->locallab.chroma ? Edited : UnEdited); + sensi->setEditedState(pedited->locallab.sensi ? Edited : UnEdited); + + if (!pedited->locallab.qualitycurveMethod) { + qualitycurveMethod->set_active(3); + } + + llshape->setUnChanged(!pedited->locallab.llcurve); + ccshape->setUnChanged(!pedited->locallab.cccurve); + LHshape->setUnChanged(!pedited->locallab.LHcurve); + HHshape->setUnChanged(!pedited->locallab.HHcurve); + invers->set_inconsistent(multiImage && !pedited->locallab.invers); + + // Exposure + } setEnabled(pp->locallab.enabled); @@ -2223,8 +2245,12 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) } // Select active spot - printf("%d\n", pp->locallab.selspot); - expsettings->setSelectedSpot(pp->locallab.selspot); + if (pp->locallab.nbspot > 0) { + expsettings->setSelectedSpot(pp->locallab.id.at(pp->locallab.selspot)); + } + + // Update Locallab tools GUI + updateLocallabGUI(pp, pp->locallab.selspot); // Enable all listeners enableListener(); @@ -2239,36 +2265,8 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) centerXbuf->hide(); centerYbuf->hide(); - disableListener(); - - enablecolorConn.block(true); - enablevibranceConn.block(true); - enableblurConn.block(true); - enabletonemapConn.block(true); - enableretiConn.block(true); - enablesharpConn.block(true); - enablecbdlConn.block(true); - enabledenoiConn.block(true); - - if (pedited) { - - degree->setEditedState(pedited->locallab.degree ? Edited : UnEdited); - locY->setEditedState(pedited->locallab.locY ? Edited : UnEdited); - locX->setEditedState(pedited->locallab.locX ? Edited : UnEdited); - locYT->setEditedState(pedited->locallab.locYT ? Edited : UnEdited); - locXL->setEditedState(pedited->locallab.locXL ? Edited : UnEdited); - centerX->setEditedState(pedited->locallab.centerX ? Edited : UnEdited); - centerY->setEditedState(pedited->locallab.centerY ? Edited : UnEdited); - circrad->setEditedState(pedited->locallab.circrad ? Edited : UnEdited); - centerXbuf->setEditedState(pedited->locallab.centerXbuf ? Edited : UnEdited); - centerYbuf->setEditedState(pedited->locallab.centerYbuf ? Edited : UnEdited); adjblur->setEditedState(pedited->locallab.adjblur ? Edited : UnEdited); - thres->setEditedState(pedited->locallab.thres ? Edited : UnEdited); - proxi->setEditedState(pedited->locallab.proxi ? Edited : UnEdited); - lightness->setEditedState(pedited->locallab.lightness ? Edited : UnEdited); - contrast->setEditedState(pedited->locallab.contrast ? Edited : UnEdited); - chroma->setEditedState(pedited->locallab.chroma ? Edited : UnEdited); warm->setEditedState(pedited->locallab.warm ? Edited : UnEdited); expcomp->setEditedState(pedited->locallab.expcomp ? Edited : UnEdited); hlcompr->setEditedState(pedited->locallab.hlcompr ? Edited : UnEdited); @@ -2276,7 +2274,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) black->setEditedState(pedited->locallab.black ? Edited : UnEdited); shcompr->setEditedState(pedited->locallab.shcompr ? Edited : UnEdited); sensiex->setEditedState(pedited->locallab.sensiex ? Edited : UnEdited); - sharradius->setEditedState(pedited->locallab.sharradius ? Edited : UnEdited); sharamount->setEditedState(pedited->locallab.sharamount ? Edited : UnEdited); shardamping->setEditedState(pedited->locallab.shardamping ? Edited : UnEdited); @@ -2300,7 +2297,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) pastSatTog->set_inconsistent(!pedited->locallab.pastsattog); skinTonesCurve->setUnChanged(!pedited->locallab.skintonescurve); sensiv->setEditedState(pedited->locallab.sensiv ? Edited : UnEdited); - // spotduplicated->set_inconsistent(!pedited->locallab.spotduplicated); for (int i = 0; i < 5; i++) { multiplier[i]->setEditedState(pedited->locallab.mult[i] ? Edited : UnEdited); @@ -2310,8 +2306,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) chromacbdl->setEditedState(pedited->locallab.chromacbdl ? Edited : UnEdited); sensiexclu->setEditedState(pedited->locallab.sensiexclu ? Edited : UnEdited); struc->setEditedState(pedited->locallab.struc ? Edited : UnEdited); - - sensi->setEditedState(pedited->locallab.sensi ? Edited : UnEdited); sensih->setEditedState(pedited->locallab.sensih ? Edited : UnEdited); retrab->setEditedState(pedited->locallab.retrab ? Edited : UnEdited); sensicb->setEditedState(pedited->locallab.sensicb ? Edited : UnEdited); @@ -2324,9 +2318,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) estop->setEditedState(pedited->locallab.estop ? Edited : UnEdited); scaltm->setEditedState(pedited->locallab.scaltm ? Edited : UnEdited); rewei->setEditedState(pedited->locallab.rewei ? Edited : UnEdited); - - nbspot->setEditedState(pedited->locallab.nbspot ? Edited : UnEdited); - anbspot->setEditedState(pedited->locallab.anbspot ? Edited : UnEdited); hueref->setEditedState(pedited->locallab.hueref ? Edited : UnEdited); huerefblur->setEditedState(pedited->locallab.huerefblur ? Edited : UnEdited); chromaref->setEditedState(pedited->locallab.chromaref ? Edited : UnEdited); @@ -2340,21 +2331,15 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) set_inconsistent(multiImage && !pedited->locallab.enabled); avoid->set_inconsistent(multiImage && !pedited->locallab.avoid); activlum->set_inconsistent(multiImage && !pedited->locallab.activlum); - invers->set_inconsistent(multiImage && !pedited->locallab.invers); cutpast->set_inconsistent(multiImage && !pedited->locallab.cutpast); lastdust->set_inconsistent(multiImage && !pedited->locallab.lastdust); - curvactiv->set_inconsistent(multiImage && !pedited->locallab.curvactiv); inversrad->set_inconsistent(multiImage && !pedited->locallab.inversrad); inverssha->set_inconsistent(multiImage && !pedited->locallab.inverssha); cTgainshape->setUnChanged(!pedited->locallab.localTgaincurve); - llshape->setUnChanged(!pedited->locallab.llcurve); - ccshape->setUnChanged(!pedited->locallab.cccurve); - LHshape->setUnChanged(!pedited->locallab.LHcurve); - HHshape->setUnChanged(!pedited->locallab.HHcurve); shapeexpos->setUnChanged(!pedited->locallab.excurve); inversret->set_inconsistent(multiImage && !pedited->locallab.inversret); cTgainshaperab->setUnChanged(!pedited->locallab.localTgaincurverab); - expcolor->set_inconsistent(!pedited->locallab.expcolor); + expexpose->set_inconsistent(!pedited->locallab.expexpose); expvibrance->set_inconsistent(!pedited->locallab.expvibrance); expblur->set_inconsistent(!pedited->locallab.expblur); @@ -2392,10 +2377,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) qualityMethod->set_active_text(M("GENERAL_UNCHANGED")); } - if (!pedited->locallab.qualitycurveMethod) { - qualitycurveMethod->set_active_text(M("GENERAL_UNCHANGED")); - } - } setEnabled(pp->locallab.enabled); @@ -2411,19 +2392,12 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) activlumConn.block(true); activlum->set_active(pp->locallab.activlum); activlumConn.block(false); - inversConn.block(true); - invers->set_active(pp->locallab.invers); - inversConn.block(false); cutpastConn.block(true); cutpast->set_active(pp->locallab.cutpast); cutpastConn.block(false); lastdustConn.block(true); lastdust->set_active(pp->locallab.lastdust); lastdustConn.block(false); - - curvactivConn.block(true); - curvactiv->set_active(pp->locallab.curvactiv); - curvactivConn.block(false); inversradConn.block(true); inversrad->set_active(pp->locallab.inversrad); inversradConn.block(false); @@ -2434,22 +2408,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) inverssha->set_active(pp->locallab.inverssha); inversshaConn.block(false); - degree->setValue(pp->locallab.degree); - locY->setValue(pp->locallab.locY); - locX->setValue(pp->locallab.locX); - locYT->setValue(pp->locallab.locYT); - locXL->setValue(pp->locallab.locXL); - centerX->setValue(pp->locallab.centerX); - centerY->setValue(pp->locallab.centerY); - circrad->setValue(pp->locallab.circrad); - centerXbuf->setValue(pp->locallab.centerXbuf); - centerYbuf->setValue(pp->locallab.centerYbuf); adjblur->setValue(pp->locallab.adjblur); - thres->setValue(pp->locallab.thres); - proxi->setValue(pp->locallab.proxi); - lightness->setValue(pp->locallab.lightness); - contrast->setValue(pp->locallab.contrast); - chroma->setValue(pp->locallab.chroma); warm->setValue(pp->locallab.warm); expcomp->setValue(pp->locallab.expcomp); hlcompr->setValue(pp->locallab.hlcompr); @@ -2493,11 +2452,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) chrrt->setValue(pp->locallab.chrrt); cTgainshape->setCurve(pp->locallab.localTgaincurve); cTgainshaperab->setCurve(pp->locallab.localTgaincurverab); - llshape->setCurve(pp->locallab.llcurve); - ccshape->setCurve(pp->locallab.cccurve); - LHshape->setCurve(pp->locallab.LHcurve); shapeexpos->setCurve(pp->locallab.excurve); - HHshape->setCurve(pp->locallab.HHcurve); lastactivlum = pp->locallab.activlum; lastanbspot = pp->locallab.anbspot; noiselumf->setValue(pp->locallab.noiselumf); @@ -2509,7 +2464,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) noisechrodetail->setValue(pp->locallab.noisechrodetail); bilateral->setValue(pp->locallab.bilateral); sensiden->setValue(pp->locallab.sensiden); - expcolor->setEnabled(pp->locallab.expcolor); expexpose->setEnabled(pp->locallab.expexpose); expvibrance->setEnabled(pp->locallab.expvibrance); sensiv->setValue(pp->locallab.sensiv); @@ -2654,17 +2608,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) qualityMethodChanged(); - if (pp->locallab.qualitycurveMethod == "none") { - qualitycurveMethod->set_active(0); - } else if (pp->locallab.qualitycurveMethod == "std") { - qualitycurveMethod->set_active(1); - } else if (pp->locallab.qualitycurveMethod == "enh") { - qualitycurveMethod->set_active(2); - } - - qualitycurveMethodChanged(); - qualitycurveMethodConn.block(false); - anbspot->hide(); hueref->hide(); huerefblur->hide(); @@ -2688,17 +2631,6 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited) locYT->setValue(pp->locallab.locYT); } - - enablecolorConn.block(false); - enablevibranceConn.block(false); - enableblurConn.block(false); - enabletonemapConn.block(false); - enableretiConn.block(false); - enablesharpConn.block(false); - enablecbdlConn.block(false); - enabledenoiConn.block(false); - - enableListener(); */ } @@ -2735,11 +2667,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) r->thresh = 18; r->iter = 0; expsettings->addControlSpot(r); - expsettings->setSelectedSpot(spotId); // ProcParams update pp->locallab.nbspot++; - pp->locallab.selspot = spotId; + pp->locallab.selspot = pp->locallab.nbspot - 1; + // Control spot settings pp->locallab.id.push_back(r->id); pp->locallab.name.push_back(r->name); pp->locallab.isvisible.push_back(r->isvisible); @@ -2757,6 +2689,28 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.transit.push_back(r->transit); pp->locallab.thresh.push_back(r->thresh); pp->locallab.iter.push_back(r->iter); + // Color & Light + pp->locallab.expcolor.push_back(0); + pp->locallab.curvactiv.push_back(0); + pp->locallab.lightness.push_back(0); + pp->locallab.contrast.push_back(0); + pp->locallab.chroma.push_back(0); + pp->locallab.sensi.push_back(19); + pp->locallab.qualitycurveMethod.push_back("none"); + pp->locallab.llcurve.push_back({(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}); + pp->locallab.cccurve.push_back({(double)DCT_NURBS, 0.0, 0.0, 1.0, 1.0}); + pp->locallab.LHcurve.push_back({(double)FCT_MinMaxCPoints, 0.0, 0.50, 0.35, 0.35, 0.166, 0.50, 0.35, 0.35, 0.333, 0.50, 0.35, 0.35, 0.50, 0.50, 0.35, 0.35, 0.666, 0.50, 0.35, 0.35, 0.833, 0.50, 0.35, 0.35}); + pp->locallab.HHcurve.push_back({(double)FCT_MinMaxCPoints, 0.0, 0.50, 0.35, 0.35, 0.166, 0.50, 0.35, 0.35, 0.333, 0.50, 0.35, 0.35, 0.50, 0.50, 0.35, 0.35, 0.666, 0.50, 0.35, 0.35, 0.833, 0.50, 0.35, 0.35}); + pp->locallab.invers.push_back(0); + // Exposure + + // New created spot selection + expsettings->setSelectedSpot(spotId); + + // Update Locallab tools GUI with new created spot + disableListener(); + updateLocallabGUI(pp, pp->locallab.selspot); + enableListener(); break; @@ -2768,6 +2722,8 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) if (pp->locallab.id.at(i) == spotId) { // ProcParams update pp->locallab.nbspot--; + pp->locallab.selspot = 0; + // Control spot settings pp->locallab.id.erase(pp->locallab.id.begin() + i); pp->locallab.name.erase(pp->locallab.name.begin() + i); pp->locallab.isvisible.erase(pp->locallab.isvisible.begin() + i); @@ -2786,15 +2742,32 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.thresh.erase(pp->locallab.thresh.begin() + i); pp->locallab.iter.erase(pp->locallab.iter.begin() + i); expsettings->deleteControlSpot(spotId); + // Color & Light + pp->locallab.expcolor.erase(pp->locallab.expcolor.begin() + i); + pp->locallab.curvactiv.erase(pp->locallab.curvactiv.begin() + i); + pp->locallab.lightness.erase(pp->locallab.lightness.begin() + i); + pp->locallab.contrast.erase(pp->locallab.contrast.begin() + i); + pp->locallab.chroma.erase(pp->locallab.chroma.begin() + i); + pp->locallab.sensi.erase(pp->locallab.sensi.begin() + i); + pp->locallab.qualitycurveMethod.erase(pp->locallab.qualitycurveMethod.begin() + i); + pp->locallab.llcurve.erase(pp->locallab.llcurve.begin() + i); + pp->locallab.cccurve.erase(pp->locallab.cccurve.begin() + i); + pp->locallab.LHcurve.erase(pp->locallab.LHcurve.begin() + i); + pp->locallab.HHcurve.erase(pp->locallab.HHcurve.begin() + i); + pp->locallab.invers.erase(pp->locallab.invers.begin() + i); + + // Exposure // Select one remaining spot - if (pp->locallab.nbspot >= 1) { - pp->locallab.selspot = 1; - expsettings->setSelectedSpot(1); - } else { - pp->locallab.selspot = 0; + if (pp->locallab.nbspot > 0) { + expsettings->setSelectedSpot(pp->locallab.id.at(pp->locallab.selspot)); } + // Update Locallab tools GUI with new created spot + disableListener(); + updateLocallabGUI(pp, pp->locallab.selspot); + enableListener(); + break; } } @@ -2803,71 +2776,105 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) case (3): // 3 = Spot selection event spotId = expsettings->getSelectedSpot(); - pp->locallab.selspot = spotId; + + for (int i = 0; i < pp->locallab.nbspot; i++) { + if (pp->locallab.id.at(i) == spotId) { + pp->locallab.selspot = i; + break; + } + } + + // Update control spots and Locallab tools GUI with selected spot expsettings->setSelectedSpot(spotId); + disableListener(); + updateLocallabGUI(pp, pp->locallab.selspot); + enableListener(); break; default: // Spot or locallab GUI updated - spotId = expsettings->getSelectedSpot(); - r = expsettings->getSpot(spotId); + if (pp->locallab.nbspot > 0) { + r = expsettings->getSpot(expsettings->getSelectedSpot()); - for (int i = 0; i < pp->locallab.nbspot; i++) { - if (pp->locallab.id.at(i) == spotId) { - // ProcParams update - pp->locallab.name.at(i) = r->name; - pp->locallab.isvisible.at(i) = r->isvisible; + // ProcParams update + // Control spot settings + pp->locallab.name.at(pp->locallab.selspot) = r->name; + pp->locallab.isvisible.at(pp->locallab.selspot) = r->isvisible; - if (r->shape == 0) { - pp->locallab.shape.at(i) = "ELI"; - } else { - pp->locallab.shape.at(i) = "RECT"; - } - - if (r->spotMethod == 0) { - pp->locallab.spotMethod.at(i) = "norm"; - } else { - pp->locallab.spotMethod.at(i) = "exc"; - } - - if (r->shapeMethod == 0) { - pp->locallab.shapeMethod.at(i) = "IND"; - } else if (r->shapeMethod == 1) { - pp->locallab.shapeMethod.at(i) = "SYM"; - } else if (r->shapeMethod == 2) { - pp->locallab.shapeMethod.at(i) = "INDSL"; - } else { - pp->locallab.shapeMethod.at(i) = "SYMSL"; - } - - pp->locallab.locX.at(i) = r->locX; - pp->locallab.locXL.at(i) = r->locXL; - pp->locallab.locY.at(i) = r->locY; - pp->locallab.locYT.at(i) = r->locYT; - pp->locallab.centerX.at(i) = r->centerX; - pp->locallab.centerY.at(i) = r->centerY; - pp->locallab.circrad.at(i) = r->circrad; - - if (r->qualityMethod == 0) { - pp->locallab.qualityMethod.at(i) = "std"; - } else if (r->qualityMethod == 1) { - pp->locallab.qualityMethod.at(i) = "enh"; - } else { - pp->locallab.qualityMethod.at(i) = "enhden"; - } - - pp->locallab.transit.at(i) = r->transit; - pp->locallab.thresh.at(i) = r->thresh; - pp->locallab.iter.at(i) = r->iter; - - break; + if (r->shape == 0) { + pp->locallab.shape.at(pp->locallab.selspot) = "ELI"; + } else { + pp->locallab.shape.at(pp->locallab.selspot) = "RECT"; } + + if (r->spotMethod == 0) { + pp->locallab.spotMethod.at(pp->locallab.selspot) = "norm"; + } else { + pp->locallab.spotMethod.at(pp->locallab.selspot) = "exc"; + } + + if (r->shapeMethod == 0) { + pp->locallab.shapeMethod.at(pp->locallab.selspot) = "IND"; + } else if (r->shapeMethod == 1) { + pp->locallab.shapeMethod.at(pp->locallab.selspot) = "SYM"; + } else if (r->shapeMethod == 2) { + pp->locallab.shapeMethod.at(pp->locallab.selspot) = "INDSL"; + } else { + pp->locallab.shapeMethod.at(pp->locallab.selspot) = "SYMSL"; + } + + pp->locallab.locX.at(pp->locallab.selspot) = r->locX; + pp->locallab.locXL.at(pp->locallab.selspot) = r->locXL; + pp->locallab.locY.at(pp->locallab.selspot) = r->locY; + pp->locallab.locYT.at(pp->locallab.selspot) = r->locYT; + pp->locallab.centerX.at(pp->locallab.selspot) = r->centerX; + pp->locallab.centerY.at(pp->locallab.selspot) = r->centerY; + pp->locallab.circrad.at(pp->locallab.selspot) = r->circrad; + + if (r->qualityMethod == 0) { + pp->locallab.qualityMethod.at(pp->locallab.selspot) = "std"; + } else if (r->qualityMethod == 1) { + pp->locallab.qualityMethod.at(pp->locallab.selspot) = "enh"; + } else { + pp->locallab.qualityMethod.at(pp->locallab.selspot) = "enhden"; + } + + pp->locallab.transit.at(pp->locallab.selspot) = r->transit; + pp->locallab.thresh.at(pp->locallab.selspot) = r->thresh; + pp->locallab.iter.at(pp->locallab.selspot) = r->iter; + // Color & Light + pp->locallab.expcolor.at(pp->locallab.selspot) = (int)expcolor->getEnabled(); + pp->locallab.curvactiv.at(pp->locallab.selspot) = (int)curvactiv->get_active(); + pp->locallab.lightness.at(pp->locallab.selspot) = lightness->getIntValue(); + pp->locallab.contrast.at(pp->locallab.selspot) = contrast->getIntValue(); + pp->locallab.chroma.at(pp->locallab.selspot) = chroma->getIntValue(); + pp->locallab.sensi.at(pp->locallab.selspot) = sensi->getIntValue(); + + if (qualitycurveMethod->get_active_row_number() == 0) { + pp->locallab.qualitycurveMethod.at(pp->locallab.selspot) = "none"; + } else if (qualitycurveMethod->get_active_row_number() == 1) { + pp->locallab.qualitycurveMethod.at(pp->locallab.selspot) = "std"; + } else if (qualitycurveMethod->get_active_row_number() == 2) { + pp->locallab.qualitycurveMethod.at(pp->locallab.selspot) = "enh"; + } + + pp->locallab.llcurve.at(pp->locallab.selspot) = llshape->getCurve(); + pp->locallab.cccurve.at(pp->locallab.selspot) = ccshape->getCurve(); + pp->locallab.LHcurve.at(pp->locallab.selspot) = LHshape->getCurve(); + pp->locallab.HHcurve.at(pp->locallab.selspot) = HHshape->getCurve(); + pp->locallab.invers.at(pp->locallab.selspot) = invers->get_active(); + // Exposure } + + // Update Locallab tools GUI + disableListener(); + updateLocallabGUI(pp, pp->locallab.selspot); + enableListener(); } if (pedited) { pedited->locallab.enabled = !get_inconsistent(); - + // Control spot settings ControlSpotPanel::SpotEdited* const se = expsettings->getEditedStates(); pedited->locallab.nbspot = se->addbutton || se->deletebutton; pedited->locallab.selspot = se->treeview; @@ -2888,25 +2895,24 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.transit = se->transit; pedited->locallab.thresh = se->thresh; pedited->locallab.iter = se->iter; + // Color & Light + pedited->locallab.expcolor = !expcolor->get_inconsistent(); + pedited->locallab.curvactiv = !curvactiv->get_inconsistent(); + pedited->locallab.lightness = lightness->getEditedState(); + pedited->locallab.contrast = contrast->getEditedState(); + pedited->locallab.chroma = chroma->getEditedState(); + pedited->locallab.sensi = sensi->getEditedState(); + pedited->locallab.qualitycurveMethod = qualitycurveMethod->get_active_row_number() != 3; + pedited->locallab.llcurve = !llshape->isUnChanged(); + pedited->locallab.cccurve = !ccshape->isUnChanged(); + pedited->locallab.LHcurve = !LHshape->isUnChanged(); + pedited->locallab.HHcurve = !HHshape->isUnChanged(); + pedited->locallab.invers = !invers->get_inconsistent(); + // Exposure } /* - pp->locallab.degree = degree->getValue(); - pp->locallab.locY = locY->getIntValue(); - pp->locallab.locX = locX->getValue(); - pp->locallab.locYT = locYT->getIntValue(); - pp->locallab.locXL = locXL->getValue(); - pp->locallab.centerX = centerX->getIntValue(); - pp->locallab.centerY = centerY->getIntValue(); - pp->locallab.circrad = circrad->getIntValue(); - pp->locallab.centerXbuf = centerXbuf->getIntValue(); - pp->locallab.centerYbuf = centerYbuf->getIntValue(); pp->locallab.adjblur = adjblur->getIntValue(); - pp->locallab.proxi = proxi->getIntValue(); - pp->locallab.thres = thres->getIntValue(); - pp->locallab.lightness = lightness->getIntValue(); - pp->locallab.contrast = contrast->getIntValue(); - pp->locallab.chroma = chroma->getIntValue(); pp->locallab.warm = warm->getIntValue(); pp->locallab.expcomp = expcomp->getValue(); pp->locallab.black = (int)black->getValue(); @@ -2927,7 +2933,6 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.shardamping = shardamping->getIntValue(); pp->locallab.shariter = shariter->getIntValue(); pp->locallab.sensisha = sensisha->getIntValue(); - pp->locallab.sensi = sensi->getIntValue(); pp->locallab.sensiex = sensiex->getIntValue(); pp->locallab.sensih = sensih->getIntValue(); pp->locallab.retrab = retrab->getIntValue(); @@ -2943,14 +2948,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.estop = estop->getIntValue(); pp->locallab.scaltm = scaltm->getIntValue(); pp->locallab.rewei = rewei->getIntValue(); - pp->locallab.enabled = getEnabled(); pp->locallab.transit = transit->getIntValue(); pp->locallab.avoid = avoid->get_active(); pp->locallab.activlum = activlum->get_active(); - pp->locallab.invers = invers->get_active(); pp->locallab.cutpast = cutpast->get_active(); pp->locallab.lastdust = lastdust->get_active(); - pp->locallab.curvactiv = curvactiv->get_active(); pp->locallab.inversrad = inversrad->get_active(); pp->locallab.inversret = inversret->get_active(); pp->locallab.inverssha = inverssha->get_active(); @@ -2967,12 +2969,8 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.chrrt = chrrt->getIntValue(); pp->locallab.localTgaincurve = cTgainshape->getCurve(); pp->locallab.localTgaincurverab = cTgainshaperab->getCurve(); - pp->locallab.llcurve = llshape->getCurve(); - pp->locallab.cccurve = ccshape->getCurve(); - pp->locallab.LHcurve = LHshape->getCurve(); - pp->locallab.HHcurve = HHshape->getCurve(); pp->locallab.excurve = shapeexpos->getCurve(); - pp->locallab.expcolor = expcolor->getEnabled(); + pp->locallab.expexpose = expexpose->getEnabled(); pp->locallab.expvibrance = expvibrance->getEnabled(); pp->locallab.expblur = expblur->getEnabled(); @@ -2997,34 +2995,12 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.pastsattog = pastSatTog->get_active(); pp->locallab.skintonescurve = skinTonesCurve->getCurve(); pp->locallab.sensiv = sensiv->getIntValue(); - // pp->locallab.spotduplicated = spotduplicated->get_active(); if (pedited) { - pedited->locallab.degree = degree->getEditedState(); - pedited->locallab.Smethod = Smethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.shapemethod = shapemethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.Exclumethod = Exclumethod->get_active_text() != M("GENERAL_UNCHANGED"); pedited->locallab.retinexMethod = retinexMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.qualityMethod = qualityMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.qualitycurveMethod = qualitycurveMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.blurMethod = blurMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.dustMethod = dustMethod->get_active_text() != M("GENERAL_UNCHANGED"); - pedited->locallab.locY = locY->getEditedState(); - pedited->locallab.locX = locX->getEditedState(); - pedited->locallab.locYT = locYT->getEditedState(); - pedited->locallab.locXL = locXL->getEditedState(); - pedited->locallab.centerX = centerX->getEditedState(); - pedited->locallab.centerY = centerY->getEditedState(); - pedited->locallab.circrad = circrad->getEditedState(); - pedited->locallab.centerXbuf = centerXbuf->getEditedState(); - pedited->locallab.centerYbuf = centerYbuf->getEditedState(); pedited->locallab.adjblur = adjblur->getEditedState(); - pedited->locallab.proxi = proxi->getEditedState(); - pedited->locallab.thres = thres->getEditedState(); - pedited->locallab.lightness = lightness->getEditedState(); - pedited->locallab.contrast = contrast->getEditedState(); - pedited->locallab.chroma = chroma->getEditedState(); pedited->locallab.warm = warm->getEditedState(); pedited->locallab.expcomp = expcomp->getEditedState(); pedited->locallab.black = black->getEditedState(); @@ -3046,7 +3022,6 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.shardamping = shardamping->getEditedState(); pedited->locallab.shariter = shariter->getEditedState(); pedited->locallab.sensisha = sensisha->getEditedState(); - pedited->locallab.sensi = sensi->getEditedState(); pedited->locallab.sensiex = sensiex->getEditedState(); pedited->locallab.sensih = sensih->getEditedState(); pedited->locallab.retrab = retrab->getEditedState(); @@ -3062,21 +3037,15 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.estop = estop->getEditedState(); pedited->locallab.scaltm = scaltm->getEditedState(); pedited->locallab.rewei = rewei->getEditedState(); - pedited->locallab.transit = transit->getEditedState(); - pedited->locallab.enabled = !get_inconsistent(); pedited->locallab.avoid = !avoid->get_inconsistent(); - pedited->locallab.invers = !invers->get_inconsistent(); pedited->locallab.cutpast = !cutpast->get_inconsistent(); pedited->locallab.lastdust = !lastdust->get_inconsistent(); - pedited->locallab.curvactiv = !curvactiv->get_inconsistent(); pedited->locallab.activlum = !activlum->get_inconsistent(); pedited->locallab.inversret = !inversret->get_inconsistent(); pedited->locallab.inversrad = !inversrad->get_inconsistent(); pedited->locallab.inverssha = !inverssha->get_inconsistent(); pedited->locallab.str = str->getEditedState(); pedited->locallab.neigh = neigh->getEditedState(); - pedited->locallab.nbspot = nbspot->getEditedState(); - pedited->locallab.anbspot = anbspot->getEditedState(); pedited->locallab.hueref = hueref->getEditedState(); pedited->locallab.huerefblur = huerefblur->getEditedState(); pedited->locallab.chromaref = chromaref->getEditedState(); @@ -3087,14 +3056,8 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.chrrt = chrrt->getEditedState(); pedited->locallab.localTgaincurve = !cTgainshape->isUnChanged(); pedited->locallab.localTgaincurverab = !cTgainshaperab->isUnChanged(); - pedited->locallab.llcurve = !llshape->isUnChanged(); - pedited->locallab.cccurve = !ccshape->isUnChanged(); - pedited->locallab.LHcurve = !LHshape->isUnChanged(); pedited->locallab.excurve = !shapeexpos->isUnChanged(); - pedited->locallab.HHcurve = !HHshape->isUnChanged(); - - pedited->locallab.expcolor = !expcolor->get_inconsistent(); pedited->locallab.expexpose = !expexpose->get_inconsistent(); pedited->locallab.expvibrance = !expvibrance->get_inconsistent(); pedited->locallab.expblur = !expblur->get_inconsistent(); @@ -3118,9 +3081,6 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pedited->locallab.pastsattog = !pastSatTog->get_inconsistent(); pedited->locallab.skintonescurve = !skinTonesCurve->isUnChanged(); pedited->locallab.sensiv = sensiv->getEditedState(); - // pedited->locallab.spotduplicated = !spotduplicated->get_inconsistent(); - - } if (retinexMethod->get_active_row_number() == 0) { @@ -3131,81 +3091,11 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited) pp->locallab.retinexMethod = "high"; } - if (blurMethod->get_active_row_number() == 0) { - pp->locallab.blurMethod = "norm"; - } else if (blurMethod->get_active_row_number() == 1) { - pp->locallab.blurMethod = "inv"; - } else if (blurMethod->get_active_row_number() == 2) { - pp->locallab.blurMethod = "sym"; - } - - if (dustMethod->get_active_row_number() == 0) { - pp->locallab.dustMethod = "cop"; - } else if (dustMethod->get_active_row_number() == 1) { - pp->locallab.dustMethod = "mov"; - } else if (dustMethod->get_active_row_number() == 2) { - pp->locallab.dustMethod = "pas"; - } - - if (qualityMethod->get_active_row_number() == 0) { - pp->locallab.qualityMethod = "std"; - } else if (qualityMethod->get_active_row_number() == 1) { - pp->locallab.qualityMethod = "enh"; - } else if (qualityMethod->get_active_row_number() == 2) { - pp->locallab.qualityMethod = "enhden"; - } - - if (qualitycurveMethod->get_active_row_number() == 0) { - pp->locallab.qualitycurveMethod = "none"; - } else if (qualitycurveMethod->get_active_row_number() == 1) { - pp->locallab.qualitycurveMethod = "std"; - } else if (qualitycurveMethod->get_active_row_number() == 2) { - pp->locallab.qualitycurveMethod = "enh"; - } - if (Exclumethod->get_active_row_number() == 0) { pp->locallab.Exclumethod = "norm"; } else if (Exclumethod->get_active_row_number() == 1) { pp->locallab.Exclumethod = "exc"; } - - if (shapemethod->get_active_row_number() == 0) { - pp->locallab.shapemethod = "ELI"; - } else if (shapemethod->get_active_row_number() == 1) { - pp->locallab.shapemethod = "RECT"; - } - - if (Smethod->get_active_row_number() == 0) { - pp->locallab.Smethod = "IND"; - } else if (Smethod->get_active_row_number() == 1) { - pp->locallab.Smethod = "SYM"; - } else if (Smethod->get_active_row_number() == 2) { - pp->locallab.Smethod = "INDSL"; - } else if (Smethod->get_active_row_number() == 3) { - pp->locallab.Smethod = "SYMSL"; - } - - if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - // if(Smethod->get_active_row_number() == 0 || Smethod->get_active_row_number() == 1) { - pp->locallab.locX = locX->getValue(); - pp->locallab.locY = locY->getValue(); - - pp->locallab.locXL = pp->locallab.locX; - pp->locallab.locYT = pp->locallab.locY; - } - /* else if(Smethod->get_active_row_number()==2){ - pp->locallab.locXL=pp->locallab.locX; - pp->locallab.locYT=pp->locallab.locX; - pp->locallab.locY=pp->locallab.locX; - } - */ - /* - else { - pp->locallab.locXL = locXL->getValue(); - pp->locallab.locX = locX->getValue(); - pp->locallab.locY = locY->getValue(); - pp->locallab.locYT = locYT->getValue(); - } */ } @@ -3352,7 +3242,34 @@ void Locallab::pastsattog_toggled() void Locallab::curveChanged(CurveEditor* ce) { + // Color & Light + if (getEnabled() && expcolor->getEnabled()) { + if (ce == llshape) { + if (listener) { + listener->panelChanged(Evlocallabllshape, M("HISTORY_CUSTOMCURVE")); + } + } + if (ce == ccshape) { + if (listener) { + listener->panelChanged(Evlocallabccshape, M("HISTORY_CUSTOMCURVE")); + } + } + + if (ce == LHshape) { + if (listener) { + listener->panelChanged(EvlocallabLHshape, M("HISTORY_CUSTOMCURVE")); + } + } + + if (ce == HHshape) { + if (listener) { + listener->panelChanged(EvlocallabHHshape, M("HISTORY_CUSTOMCURVE")); + } + } + } + + /* if (listener && getEnabled()) { if (ce == cTgainshape) { listener->panelChanged(EvlocallabCTgainCurve, M("HISTORY_CUSTOMCURVE")); //HISTORY_CUSTOMCURVE @@ -3432,6 +3349,7 @@ void Locallab::curveChanged(CurveEditor* ce) adjusterChanged(retrab, strval); } } + */ } void Locallab::retinexMethodChanged() @@ -3498,17 +3416,7 @@ void Locallab::qualityMethodChanged() void Locallab::qualitycurveMethodChanged() { - if (!batchMode) { - /* - if (qualitycurveMethod->get_active_row_number() == 0 || qualitycurveMethod->get_active_row_number() == 1) { //None or STD - artifFrame->hide(); - } else if (qualitycurveMethod->get_active_row_number() == 0 && qualityMethod->get_active_row_number() >= 1) { - artifFrame->show(); - } else if (qualitycurveMethod->get_active_row_number() == 2){ - artifFrame->show(); - } - */ - } + printf("qualitycurveMethodChanged\n"); if (listener) { listener->panelChanged(EvlocallabqualitycurveMethod, qualitycurveMethod->get_active_text()); @@ -3608,7 +3516,9 @@ void Locallab::SmethodChanged() } void Locallab::inversChanged() { + printf("inversChanged\n"); + /* if (batchMode) { if (invers->get_inconsistent()) { invers->set_inconsistent(false); @@ -3621,30 +3531,15 @@ void Locallab::inversChanged() lastinvers = invers->get_active(); } + */ - if (invers->get_active()) { - // warm->hide(); - sensi->show(); - llCurveEditorG->hide(); - curvactiv->hide(); - qualitycurveMethod->hide(); - labqualcurv->hide(); - - } else { - sensi->show(); - // warm->show(); - llCurveEditorG->show(); - curvactiv->show(); - qualitycurveMethod->show(); - labqualcurv->show(); - - } - - if (listener) { - if (getEnabled()) { - listener->panelChanged(Evlocallabinvers, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabinvers, M("GENERAL_DISABLED")); + if (getEnabled() && expcolor->getEnabled()) { + if (listener) { + if (invers->get_active()) { + listener->panelChanged(Evlocallabinvers, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabinvers, M("GENERAL_DISABLED")); + } } } } @@ -3704,7 +3599,10 @@ void Locallab::lastdustChanged() void Locallab::curvactivChanged() { + printf("curvactivChanged\n"); + // TODO Batch mode + /* if (batchMode) { if (curvactiv->get_inconsistent()) { curvactiv->set_inconsistent(false); @@ -3717,13 +3615,15 @@ void Locallab::curvactivChanged() lastcurvactiv = curvactiv->get_active(); } + */ - - if (listener) { - if (getEnabled()) { - listener->panelChanged(Evlocallabcurvactiv, M("GENERAL_ENABLED")); - } else { - listener->panelChanged(Evlocallabcurvactiv, M("GENERAL_DISABLED")); + if (getEnabled() && expcolor->getEnabled()) { + if (listener) { + if (curvactiv->get_active()) { + listener->panelChanged(Evlocallabcurvactiv, M("GENERAL_ENABLED")); + } else { + listener->panelChanged(Evlocallabcurvactiv, M("GENERAL_DISABLED")); + } } } } @@ -4105,8 +4005,35 @@ void Locallab::adjusterChanged(ThresholdAdjuster* a, int newBottom, int newTop) void Locallab::adjusterChanged(Adjuster * a, double newval) { + printf("adjusterChanged\n"); + + // Color & Light + if (getEnabled() && expcolor->getEnabled()) { + if (a == lightness) { + if (listener) { + listener->panelChanged(Evlocallablightness, lightness->getTextValue()); + } + } + + if (a == contrast) { + if (listener) { + listener->panelChanged(Evlocallabcontrast, contrast->getTextValue()); + } + } + + if (a == chroma) { + if (listener) { + listener->panelChanged(Evlocallabchroma, chroma->getTextValue()); + } + } + + if (a == sensih) { + if (listener) { + listener->panelChanged(Evlocallabsensih, sensih->getTextValue()); + } + } + } - // updateGeometry(int (centerX->getValue()), int (centerY->getValue()), int (circrad->getValue()), (int)locY->getValue(), degree->getValue(), (int)locX->getValue(), (int)locYT->getValue(), (int)locXL->getValue()); anbspot->hide(); hueref->hide(); huerefblur->hide(); @@ -4121,73 +4048,7 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) } if (listener && getEnabled()) { - if (a == degree) { - listener->panelChanged(EvlocallabDegree, degree->getTextValue()); - } else if (a == locY) { - if (Smethod->get_active_row_number() == 0 || Smethod->get_active_row_number() == 2) { // 0 2 - listener->panelChanged(EvlocallablocY, locY->getTextValue()); - } - /* else if(Smethod->get_active_row_number()==2) { - listener->panelChanged (EvlocallablocY, locY->getTextValue()); - locXL->setValue (locX->getValue()); - locY->setValue (locX->getValue()); - locYT->setValue (locX->getValue()); - }*/ - else if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - listener->panelChanged(EvlocallablocY, locY->getTextValue()); - locYT->setValue(locY->getValue()); - } - } else if (a == locX) { - //listener->panelChanged (EvlocallablocX, locX->getTextValue()); - if (Smethod->get_active_row_number() == 0 || Smethod->get_active_row_number() == 2) { - listener->panelChanged(EvlocallablocX, locX->getTextValue()); - } - /* else if(Smethod->get_active_row_number()==2) { - listener->panelChanged (EvlocallablocX, locX->getTextValue()); - locXL->setValue (locX->getValue()); - locY->setValue (locX->getValue()); - locYT->setValue (locX->getValue()); - }*/ - else if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - listener->panelChanged(EvlocallablocX, locX->getTextValue()); - locXL->setValue(locX->getValue()); - } - } else if (a == locYT) { - if (Smethod->get_active_row_number() == 0 || Smethod->get_active_row_number() == 2) { - listener->panelChanged(EvlocallablocYT, locYT->getTextValue()); - } - /* else if(Smethod->get_active_row_number()==2) { - listener->panelChanged (EvlocallablocYT, locYT->getTextValue()); - locXL->setValue (locX->getValue()); - locY->setValue (locX->getValue()); - locYT->setValue (locX->getValue()); - }*/ - else if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - listener->panelChanged(EvlocallablocYT, locYT->getTextValue()); - locYT->setValue(locY->getValue()); - } - } else if (a == locXL) { - if (Smethod->get_active_row_number() == 0 || Smethod->get_active_row_number() == 2) { - listener->panelChanged(EvlocallablocXL, locXL->getTextValue()); - listener->panelChanged(EvlocallablocXL, locXL->getTextValue()); - } - /* else if(Smethod->get_active_row_number()==2) { - listener->panelChanged (EvlocallablocXL, locXL->getTextValue()); - locXL->setValue (locX->getValue()); - locY->setValue (locX->getValue()); - locYT->setValue (locX->getValue()); - }*/ - else if (Smethod->get_active_row_number() == 1 || Smethod->get_active_row_number() == 3) { - listener->panelChanged(EvlocallablocXL, locXL->getTextValue()); - locXL->setValue(locX->getValue()); - } - } else if (a == lightness) { - listener->panelChanged(Evlocallablightness, lightness->getTextValue()); - } else if (a == contrast) { - listener->panelChanged(Evlocallabcontrast, contrast->getTextValue()); - } else if (a == chroma) { - listener->panelChanged(Evlocallabchroma, chroma->getTextValue()); - } else if (a == warm) { + if (a == warm) { listener->panelChanged(Evlocallabwarm, warm->getTextValue()); } else if (a == expcomp) { listener->panelChanged(Evlocallabexpcomp, expcomp->getTextValue()); @@ -4238,8 +4099,6 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabsensis, sensisha->getTextValue()); } else if (a == sensi) { listener->panelChanged(Evlocallabsensi, sensi->getTextValue()); - } else if (a == sensih) { - listener->panelChanged(Evlocallabsensih, sensih->getTextValue()); } else if (a == retrab) { listener->panelChanged(Evlocallabretrab, ""); //retrab->getTextValue()); } else if (a == radius) { @@ -4258,16 +4117,10 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabrewei, rewei->getTextValue()); } else if (a == sensitm) { listener->panelChanged(Evlocallabsensitm, sensitm->getTextValue()); - } else if (a == transit) { - listener->panelChanged(Evlocallabtransit, transit->getTextValue()); } else if (a == str) { listener->panelChanged(Evlocallabstr, str->getTextValue()); } else if (a == neigh) { listener->panelChanged(Evlocallabneigh, neigh->getTextValue()); - } else if (a == nbspot) { - listener->panelChanged(Evlocallabnbspot, nbspot->getTextValue()); - } else if (a == anbspot) { - listener->panelChanged(Evlocallabanbspot, ""); //anbspot->getTextValue()); } else if (a == hueref) { listener->panelChanged(Evlocallabhueref, ""); //anbspot->getTextValue()); } else if (a == huerefblur) { @@ -4282,10 +4135,6 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabvart, vart->getTextValue()); } else if (a == chrrt) { listener->panelChanged(Evlocallabchrrt, chrrt->getTextValue()); - } else if (a == circrad) { - listener->panelChanged(Evlocallabcircrad, circrad->getTextValue()); - } else if (a == thres) { - listener->panelChanged(Evlocallabthres, thres->getTextValue()); } else if (a == threshold) { listener->panelChanged(EvlocallabThresho, threshold->getTextValue()); } else if (a == chromacbdl) { @@ -4298,14 +4147,8 @@ void Locallab::adjusterChanged(Adjuster * a, double newval) listener->panelChanged(Evlocallabstruc, struc->getTextValue()); } else if (a == sensibn) { listener->panelChanged(Evlocallabsensibn, sensibn->getTextValue()); - } else if (a == proxi) { - listener->panelChanged(Evlocallabproxi, proxi->getTextValue()); } else if (a == adjblur) { listener->panelChanged(Evlocallabadjblur, adjblur->getTextValue()); - } else if (a == centerX || a == centerY) { - listener->panelChanged(EvlocallabCenter, Glib::ustring::compose("X=%1\nY=%2", centerX->getTextValue(), centerY->getTextValue())); - } else if (a == centerXbuf || a == centerYbuf) { - listener->panelChanged(EvlocallabCenterbuf, Glib::ustring::compose("X=%1\nY=%2", centerXbuf->getTextValue(), centerYbuf->getTextValue())); } else { listener->panelChanged(EvlocallabEqualizer, Glib::ustring::compose("%1, %2, %3, %4, %5", @@ -4679,3 +4522,89 @@ void Locallab::setListener(ToolPanelListener* tpl) this->listener = tpl; expsettings->setListener(tpl); } + +void Locallab::enableListener() +{ + printf("enableListener\n"); + + FoldableToolPanel::enableListener(); + // Color & Light + enablecolorConn.block(false); + curvactivConn.block(false); + qualitycurveMethodConn.block(false); + inversConn.block(false); + // Exposure +} + +void Locallab::disableListener() +{ + printf("disableListener\n"); + + FoldableToolPanel::disableListener(); + // Color & Light + enablecolorConn.block(true); + curvactivConn.block(true); + qualitycurveMethodConn.block(true); + inversConn.block(true); + // Exposure +} + +void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int index) +{ + printf("updateLocallabGUI\n"); + + // Update GUI values + if (index < pp->locallab.nbspot) { + // Color & Light + expcolor->setEnabled((bool)pp->locallab.expcolor.at(index)); + curvactiv->set_active((bool)pp->locallab.curvactiv.at(index)); + lightness->setValue(pp->locallab.lightness.at(index)); + contrast->setValue(pp->locallab.contrast.at(index)); + chroma->setValue(pp->locallab.chroma.at(index)); + + if (pp->locallab.qualitycurveMethod.at(index) == "none") { + qualitycurveMethod->set_active(0); + } else if (pp->locallab.qualitycurveMethod.at(index) == "std") { + qualitycurveMethod->set_active(1); + } else { + qualitycurveMethod->set_active(2); + } + + llshape->setCurve(pp->locallab.llcurve.at(index)); + ccshape->setCurve(pp->locallab.cccurve.at(index)); + LHshape->setCurve(pp->locallab.LHcurve.at(index)); + HHshape->setCurve(pp->locallab.HHcurve.at(index)); + invers->set_active((bool)pp->locallab.invers.at(index)); + + // Exposure + + } + + // Update Color & Light GUI according to invers button state + if (invers->get_active()) { + sensi->show(); + llCurveEditorG->hide(); + curvactiv->hide(); + qualitycurveMethod->hide(); + labqualcurv->hide(); + + } else { + sensi->show(); + llCurveEditorG->show(); + curvactiv->show(); + qualitycurveMethod->show(); + labqualcurv->show(); + + } +} + +void Locallab::autoOpenCurve() +{ + printf("autoOpenCurve\n"); + + // TODO autoOpenCurve only considers linearity state of selected spot curve + llshape->openIfNonlinear(); + ccshape->openIfNonlinear(); + LHshape->openIfNonlinear(); + HHshape->openIfNonlinear(); +} diff --git a/rtgui/locallab.h b/rtgui/locallab.h index 8d7477201..ddafd1ced 100644 --- a/rtgui/locallab.h +++ b/rtgui/locallab.h @@ -356,6 +356,7 @@ public: void read(const rtengine::procparams::ProcParams* pp, const ParamsEdited* pedited = nullptr); void write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited = nullptr); void setDefaults(const rtengine::procparams::ProcParams* defParams, const ParamsEdited* pedited = nullptr); + void updateLocallabGUI(const rtengine::procparams::ProcParams* pp, int index); void setBatchMode(bool batchMode); @@ -409,5 +410,7 @@ public: std::vector getCurvePoints(ThresholdSelector* tAdjuster) const; void setListener(ToolPanelListener* tpl); + void enableListener(); + void disableListener(); }; diff --git a/rtgui/paramsedited.cc b/rtgui/paramsedited.cc index a8a7b9c7f..10127e19a 100644 --- a/rtgui/paramsedited.cc +++ b/rtgui/paramsedited.cc @@ -324,9 +324,11 @@ void ParamsEdited::set(bool v) gradient.strength = v; gradient.centerX = v; gradient.centerY = v; + locallab.enabled = v; locallab.nbspot = v; locallab.selspot = v; + // Control spot settings locallab.id = v; locallab.name = v; locallab.isvisible = v; @@ -344,9 +346,22 @@ void ParamsEdited::set(bool v) locallab.transit = v; locallab.thresh = v; locallab.iter = v; + // Color & Light + locallab.expcolor = v; + locallab.curvactiv = v; + locallab.lightness = v; + locallab.contrast = v; + locallab.chroma = v; + locallab.sensi = v; + locallab.qualitycurveMethod = v; + locallab.llcurve = v; + locallab.cccurve = v; + locallab.LHcurve = v; + locallab.HHcurve = v; + locallab.invers = v; + // Exposure /* - locallab.expcolor = v; locallab.expexpose = v; locallab.expvibrance = v; locallab.expblur = v; @@ -355,31 +370,13 @@ void ParamsEdited::set(bool v) locallab.expsharp = v; locallab.expcbdl = v; locallab.expdenoi = v; - locallab.degree = v; - locallab.locY = v; - locallab.locX = v; - locallab.locYT = v; - locallab.locXL = v; - locallab.centerX = v; - locallab.centerY = v; - locallab.circrad = v; - locallab.centerXbuf = v; - locallab.centerYbuf = v; locallab.adjblur = v; - locallab.thres = v; - locallab.proxi = v; - locallab.qualityMethod = v; - locallab.qualitycurveMethod = v; - locallab.lightness = v; - locallab.contrast = v; - locallab.chroma = v; locallab.warm = v; locallab.expcomp = v; locallab.hlcompr = v; locallab.hlcomprthresh = v; locallab.black = v; locallab.shcompr = v; - locallab.noiselumf = v; locallab.noiselumc = v; locallab.noiselumdetail = v; @@ -393,7 +390,6 @@ void ParamsEdited::set(bool v) locallab.sharamount = v; locallab.shardamping = v; locallab.shariter = v; - locallab.sensi = v; locallab.sensiex = v; locallab.sensih = v; locallab.retrab = v; @@ -410,19 +406,13 @@ void ParamsEdited::set(bool v) locallab.estop = v; locallab.scaltm = v; locallab.rewei = v; - locallab.transit = v; locallab.chrrt = v; locallab.avoid = v; - locallab.Smethod = v; locallab.Exclumethod = v; locallab.shapemethod = v; locallab.retinexMethod = v; - locallab.blurMethod = v; - locallab.dustMethod = v; - locallab.invers = v; locallab.cutpast = v; locallab.lastdust = v; - locallab.curvactiv = v; locallab.activlum = v; locallab.inversrad = v; locallab.inversret = v; @@ -439,16 +429,10 @@ void ParamsEdited::set(bool v) locallab.vart = v; locallab.localTgaincurve = v; locallab.localTgaincurverab = v; - locallab.llcurve = v; - locallab.cccurve = v; - locallab.LHcurve = v; - locallab.HHcurve = v; locallab.excurve = v; - for (int i = 0; i < 5; i++) { locallab.mult[i] = v; } - locallab.threshold = v; locallab.chromacbdl = v; locallab.pastels = v; @@ -1040,49 +1024,38 @@ void ParamsEdited::initFrom(const std::vector& locallab.transit = locallab.transit && p.locallab.transit == other.locallab.transit; locallab.thresh = locallab.thresh && p.locallab.thresh == other.locallab.thresh; locallab.iter = locallab.iter && p.locallab.iter == other.locallab.iter; + // Color & Light + locallab.expcolor = locallab.expcolor && p.locallab.expcolor == other.locallab.expcolor; + locallab.curvactiv = locallab.curvactiv && p.locallab.curvactiv == other.locallab.curvactiv; + locallab.lightness = locallab.lightness && p.locallab.lightness == other.locallab.lightness; + locallab.contrast = locallab.contrast && p.locallab.contrast == other.locallab.contrast; + locallab.chroma = locallab.chroma && p.locallab.chroma == other.locallab.chroma; + locallab.sensi = locallab.sensi && p.locallab.sensi == other.locallab.sensi; + locallab.qualitycurveMethod = locallab.qualitycurveMethod && p.locallab.qualitycurveMethod == other.locallab.qualitycurveMethod; + locallab.llcurve = locallab.llcurve && p.locallab.llcurve == other.locallab.llcurve; + locallab.cccurve = locallab.cccurve && p.locallab.cccurve == other.locallab.cccurve; + locallab.LHcurve = locallab.LHcurve && p.locallab.LHcurve == other.locallab.LHcurve; + locallab.HHcurve = locallab.HHcurve && p.locallab.HHcurve == other.locallab.HHcurve; + locallab.invers = locallab.invers && p.locallab.invers == other.locallab.invers; + // Exposure /* locallab.avoid = locallab.avoid && p.locallab.avoid == other.locallab.avoid; - locallab.invers = locallab.invers && p.locallab.invers == other.locallab.invers; locallab.cutpast = locallab.cutpast && p.locallab.cutpast == other.locallab.cutpast; locallab.lastdust = locallab.lastdust && p.locallab.lastdust == other.locallab.lastdust; - locallab.curvactiv = locallab.curvactiv && p.locallab.curvactiv == other.locallab.curvactiv; locallab.activlum = locallab.activlum && p.locallab.activlum == other.locallab.activlum; locallab.inversrad = locallab.inversrad && p.locallab.inversrad == other.locallab.inversrad; locallab.inversret = locallab.inversret && p.locallab.inversret == other.locallab.inversret; locallab.inverssha = locallab.inverssha && p.locallab.inverssha == other.locallab.inverssha; - locallab.degree = locallab.degree && p.locallab.degree == other.locallab.degree; - locallab.locY = locallab.locY && p.locallab.locY == other.locallab.locY; - locallab.locX = locallab.locX && p.locallab.locX == other.locallab.locX; - locallab.locYT = locallab.locYT && p.locallab.locYT == other.locallab.locYT; - locallab.locXL = locallab.locXL && p.locallab.locXL == other.locallab.locXL; - locallab.Smethod = locallab.Smethod && p.locallab.Smethod == other.locallab.Smethod; - locallab.shapemethod = locallab.shapemethod && p.locallab.shapemethod == other.locallab.shapemethod; locallab.Exclumethod = locallab.Exclumethod && p.locallab.Exclumethod == other.locallab.Exclumethod; locallab.retinexMethod = locallab.retinexMethod && p.locallab.retinexMethod == other.locallab.retinexMethod; - locallab.blurMethod = locallab.blurMethod && p.locallab.blurMethod == other.locallab.blurMethod; - locallab.dustMethod = locallab.dustMethod && p.locallab.dustMethod == other.locallab.dustMethod; - locallab.centerX = locallab.centerX && p.locallab.centerX == other.locallab.centerX; - locallab.centerY = locallab.centerY && p.locallab.centerY == other.locallab.centerY; - locallab.circrad = locallab.circrad && p.locallab.circrad == other.locallab.circrad; - locallab.centerXbuf = locallab.centerXbuf && p.locallab.centerXbuf == other.locallab.centerXbuf; - locallab.centerYbuf = locallab.centerYbuf && p.locallab.centerYbuf == other.locallab.centerYbuf; locallab.adjblur = locallab.adjblur && p.locallab.adjblur == other.locallab.adjblur; - locallab.thres = locallab.thres && p.locallab.thres == other.locallab.thres; - locallab.proxi = locallab.proxi && p.locallab.proxi == other.locallab.proxi; - locallab.qualityMethod = locallab.qualityMethod && p.locallab.qualityMethod == other.locallab.qualityMethod; - locallab.qualitycurveMethod = locallab.qualitycurveMethod && p.locallab.qualitycurveMethod == other.locallab.qualitycurveMethod; - locallab.lightness = locallab.lightness && p.locallab.lightness == other.locallab.lightness; - locallab.contrast = locallab.contrast && p.locallab.contrast == other.locallab.contrast; - locallab.chroma = locallab.chroma && p.locallab.chroma == other.locallab.chroma; locallab.warm = locallab.warm && p.locallab.warm == other.locallab.warm; locallab.expcomp = locallab.expcomp && p.locallab.expcomp == other.locallab.expcomp; locallab.hlcompr = locallab.hlcompr && p.locallab.hlcompr == other.locallab.hlcompr; locallab.hlcomprthresh = locallab.hlcomprthresh && p.locallab.hlcomprthresh == other.locallab.hlcomprthresh; locallab.black = locallab.black && p.locallab.black == other.locallab.black; locallab.shcompr = locallab.shcompr && p.locallab.shcompr == other.locallab.shcompr; - - locallab.noiselumf = locallab.noiselumf && p.locallab.noiselumf == other.locallab.noiselumf; locallab.noiselumc = locallab.noiselumc && p.locallab.noiselumc == other.locallab.noiselumc; locallab.noiselumdetail = locallab.noiselumdetail && p.locallab.noiselumdetail == other.locallab.noiselumdetail; @@ -1095,7 +1068,6 @@ void ParamsEdited::initFrom(const std::vector& locallab.sharradius = locallab.sharradius && p.locallab.sharradius == other.locallab.sharradius; locallab.sharamount = locallab.sharamount && p.locallab.sharamount == other.locallab.sharamount; locallab.shariter = locallab.shariter && p.locallab.shariter == other.locallab.shariter; - locallab.sensi = locallab.sensi && p.locallab.sensi == other.locallab.sensi; locallab.sensiex = locallab.sensiex && p.locallab.sensiex == other.locallab.sensiex; locallab.sensih = locallab.sensih && p.locallab.sensih == other.locallab.sensih; locallab.retrab = locallab.retrab && p.locallab.retrab == other.locallab.retrab; @@ -1126,12 +1098,7 @@ void ParamsEdited::initFrom(const std::vector& locallab.vart = locallab.vart && p.locallab.vart == other.locallab.vart; locallab.localTgaincurve = locallab.localTgaincurve && p.locallab.localTgaincurve == other.locallab.localTgaincurve; locallab.localTgaincurverab = locallab.localTgaincurverab && p.locallab.localTgaincurverab == other.locallab.localTgaincurverab; - locallab.llcurve = locallab.llcurve && p.locallab.llcurve == other.locallab.llcurve; - locallab.cccurve = locallab.cccurve && p.locallab.cccurve == other.locallab.cccurve; - locallab.LHcurve = locallab.LHcurve && p.locallab.LHcurve == other.locallab.LHcurve; - locallab.HHcurve = locallab.HHcurve && p.locallab.HHcurve == other.locallab.HHcurve; locallab.excurve = locallab.excurve && p.locallab.excurve == other.locallab.excurve; - locallab.expcolor = locallab.expcolor && p.locallab.expcolor == other.locallab.expcolor; locallab.expexpose = locallab.expexpose && p.locallab.expexpose == other.locallab.expexpose; locallab.expvibrance = locallab.expvibrance && p.locallab.expvibrance == other.locallab.expvibrance; locallab.expblur = locallab.expblur && p.locallab.expblur == other.locallab.expblur; @@ -2586,11 +2553,58 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.iter = mods.locallab.iter; } - /* + // Color & Light if (locallab.expcolor) { toEdit.locallab.expcolor = mods.locallab.expcolor; } + if (locallab.curvactiv) { + toEdit.locallab.curvactiv = mods.locallab.curvactiv; + } + + if (locallab.lightness) { + toEdit.locallab.lightness = mods.locallab.lightness; + } + + if (locallab.contrast) { + toEdit.locallab.contrast = mods.locallab.contrast; + } + + if (locallab.chroma) { + toEdit.locallab.chroma = mods.locallab.chroma; + } + + if (locallab.sensi) { + toEdit.locallab.sensi = mods.locallab.sensi; + } + + if (locallab.qualitycurveMethod) { + toEdit.locallab.qualitycurveMethod = mods.locallab.qualitycurveMethod; + } + + if (locallab.llcurve) { + toEdit.locallab.llcurve = mods.locallab.llcurve; + } + + if (locallab.cccurve) { + toEdit.locallab.cccurve = mods.locallab.cccurve; + } + + if (locallab.LHcurve) { + toEdit.locallab.LHcurve = mods.locallab.LHcurve; + } + + if (locallab.HHcurve) { + toEdit.locallab.HHcurve = mods.locallab.HHcurve; + } + + if (locallab.invers) { + toEdit.locallab.invers = mods.locallab.invers; + } + + // Exposure + + /* if (locallab.expexpose) { toEdit.locallab.expexpose = mods.locallab.expexpose; } @@ -2627,10 +2641,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.avoid = mods.locallab.avoid; } - if (locallab.invers) { - toEdit.locallab.invers = mods.locallab.invers; - } - if (locallab.cutpast) { toEdit.locallab.cutpast = mods.locallab.cutpast; } @@ -2639,10 +2649,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.lastdust = mods.locallab.lastdust; } - if (locallab.curvactiv) { - toEdit.locallab.curvactiv = mods.locallab.curvactiv; - } - if (locallab.activlum) { toEdit.locallab.activlum = mods.locallab.activlum; } @@ -2659,78 +2665,14 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.inversret = mods.locallab.inversret; } - if (locallab.degree) { - toEdit.locallab.degree = mods.locallab.degree; //dontforceSet && options.baBehav[ADDSET_LOCALLAB_DEGREE] ? toEdit.locallab.degree + mods.locallab.degree : mods.locallab.degree; - } - - if (locallab.locY) { - toEdit.locallab.locY = mods.locallab.locY; - } - - if (locallab.locX) { - toEdit.locallab.locX = mods.locallab.locX; - } - - if (locallab.locYT) { - toEdit.locallab.locYT = mods.locallab.locYT; - } - - if (locallab.locXL) { - toEdit.locallab.locXL = mods.locallab.locXL; - } - - if (locallab.Smethod) { - toEdit.locallab.Smethod = mods.locallab.Smethod; - } - if (locallab.Exclumethod) { toEdit.locallab.Exclumethod = mods.locallab.Exclumethod; } - if (locallab.shapemethod) { - toEdit.locallab.shapemethod = mods.locallab.shapemethod; - } - if (locallab.retinexMethod) { toEdit.locallab.retinexMethod = mods.locallab.retinexMethod; } - if (locallab.blurMethod) { - toEdit.locallab.blurMethod = mods.locallab.blurMethod; - } - - if (locallab.dustMethod) { - toEdit.locallab.dustMethod = mods.locallab.dustMethod; - } - - if (locallab.qualityMethod) { - toEdit.locallab.qualityMethod = mods.locallab.qualityMethod; - } - - if (locallab.qualitycurveMethod) { - toEdit.locallab.qualitycurveMethod = mods.locallab.qualitycurveMethod; - } - - if (locallab.centerX) { - toEdit.locallab.centerX = mods.locallab.centerX; - } - - if (locallab.centerY) { - toEdit.locallab.centerY = mods.locallab.centerY; - } - - if (locallab.circrad) { - toEdit.locallab.circrad = mods.locallab.circrad; - } - - if (locallab.centerXbuf) { - toEdit.locallab.centerXbuf = mods.locallab.centerXbuf; - } - - if (locallab.centerYbuf) { - toEdit.locallab.centerYbuf = mods.locallab.centerYbuf; - } - if (locallab.adjblur) { toEdit.locallab.adjblur = mods.locallab.adjblur; } @@ -2743,18 +2685,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.proxi = mods.locallab.proxi; } - if (locallab.lightness) { - toEdit.locallab.lightness = mods.locallab.lightness; - } - - if (locallab.contrast) { - toEdit.locallab.contrast = mods.locallab.contrast; - } - - if (locallab.chroma) { - toEdit.locallab.chroma = mods.locallab.chroma; - } - if (locallab.warm) { toEdit.locallab.warm = mods.locallab.warm; } @@ -2811,10 +2741,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.sensiv = mods.locallab.sensiv; } - if (locallab.spotduplicated) { - toEdit.locallab.spotduplicated = mods.locallab.spotduplicated; - } - if (locallab.sensiex) { toEdit.locallab.sensiex = mods.locallab.sensiex; } @@ -2871,10 +2797,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.shariter = mods.locallab.shariter; } - if (locallab.sensi) { - toEdit.locallab.sensi = mods.locallab.sensi; - } - if (locallab.sensitm) { toEdit.locallab.sensitm = mods.locallab.sensitm; } @@ -2935,10 +2857,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.rewei = mods.locallab.rewei; } - if (locallab.transit) { - toEdit.locallab.transit = mods.locallab.transit; - } - if (locallab.chrrt) { toEdit.locallab.chrrt = mods.locallab.chrrt; } @@ -2951,14 +2869,6 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.neigh = mods.locallab.neigh; } - if (locallab.nbspot) { - toEdit.locallab.nbspot = mods.locallab.nbspot; - } - - if (locallab.anbspot) { - toEdit.locallab.anbspot = mods.locallab.anbspot; - } - if (locallab.hueref) { toEdit.locallab.hueref = mods.locallab.hueref; } @@ -2987,26 +2897,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng toEdit.locallab.localTgaincurve = mods.locallab.localTgaincurve; } - if (locallab.llcurve) { - toEdit.locallab.llcurve = mods.locallab.llcurve; - } - - if (locallab.cccurve) { - toEdit.locallab.cccurve = mods.locallab.cccurve; - } - - if (locallab.LHcurve) { - toEdit.locallab.LHcurve = mods.locallab.LHcurve; - } - if (locallab.excurve) { toEdit.locallab.excurve = mods.locallab.excurve; } - if (locallab.HHcurve) { - toEdit.locallab.HHcurve = mods.locallab.HHcurve; - } - if (locallab.localTgaincurverab) { toEdit.locallab.localTgaincurverab = mods.locallab.localTgaincurverab; } diff --git a/rtgui/paramsedited.h b/rtgui/paramsedited.h index 4673a0257..61e374222 100644 --- a/rtgui/paramsedited.h +++ b/rtgui/paramsedited.h @@ -455,7 +455,6 @@ public: }; class LocallabParamsEdited { -// TODO To be manage by vector public: bool enabled; bool nbspot; @@ -478,33 +477,29 @@ public: bool transit; bool thresh; bool iter; - - /* - bool degree; - bool locY; - bool locX; - bool locYT; - bool locXL; - bool centerX; - bool centerY; - bool circrad; - bool centerXbuf; - bool centerYbuf; - bool adjblur; - bool thres; - bool proxi; - bool qualityMethod; - bool qualitycurveMethod; + // Color & Light + bool expcolor; + bool curvactiv; bool lightness; bool contrast; bool chroma; + bool sensi; + bool qualitycurveMethod; + bool llcurve; + bool cccurve; + bool LHcurve; + bool HHcurve; + bool invers; + // Exposure + + /* + bool adjblur; bool warm; bool expcomp; bool hlcompr; bool hlcomprthresh; bool black; bool shcompr; - bool noiselumf; bool noiselumc; bool noiselumdetail; @@ -518,7 +513,6 @@ public: bool sharamount; bool shardamping; bool shariter; - bool sensi; bool sensiex; bool sensih; bool retrab; @@ -535,18 +529,13 @@ public: bool rewei; bool transit; bool avoid; - bool Smethod; bool Exclumethod; bool shapemethod; bool sensiexclu; bool struc; bool retinexMethod; - bool blurMethod; - bool dustMethod; bool str; bool neigh; - bool nbspot; - bool anbspot; bool hueref; bool huerefblur; bool chromaref; @@ -554,25 +543,18 @@ public: bool sobelref; bool vart; bool activlum; - bool invers; bool cutpast; bool lastdust; - bool curvactiv; bool inversrad; bool inversret; bool inverssha; bool localTgaincurve; bool localTgaincurverab; - bool llcurve; - bool cccurve; - bool LHcurve; - bool HHcurve; bool excurve; bool chrrt; bool mult[5]; bool threshold; bool chromacbdl; - bool expcolor; bool expexpose; bool expvibrance; bool expblur; @@ -589,10 +571,6 @@ public: bool pastsattog; bool skintonescurve; bool sensiv; - bool spotduplicated; - bool id; - bool name; - bool isvisible; */ };