Add short circuit for L curves mask - allow mix image with original

This commit is contained in:
Desmis 2019-10-23 17:02:38 +02:00
parent 922db3fe12
commit c74e2d206e
12 changed files with 106 additions and 13 deletions

View File

@ -1028,6 +1028,7 @@ HISTORY_MSG_787;Local - Equalizer multiplier
HISTORY_MSG_788;Local - Equalizer detail
HISTORY_MSG_789;Local - SH mask amount
HISTORY_MSG_790;Local - SH mask anchor
HISTORY_MSG_791;Local - Mask Short L curves
HISTORY_MSG_CLAMPOOG;Clip out-of-gamut colors
HISTORY_MSG_COLORTONING_LABGRID_VALUE;CT - Color correction
HISTORY_MSG_COLORTONING_LABREGION_AB;CT - Color correction
@ -2325,6 +2326,8 @@ TP_LOCALLAB_SENSIBN;Scope
TP_LOCALLAB_SENSIS_TOOLTIP;Adjust scope of action:\nSmall values limit action to colors very similar to those under the center spot.\nHigh values let the tool act upon a wider range of colors.\nValues smaller than 20 lead to a better algorithm.
TP_LOCALLAB_SETTINGS;Settings
TP_LOCALLAB_ENABLE_MASK;Enable mask
TP_LOCALLAB_SHORTC;Short Curves 'L' Mask
TP_LOCALLAB_SHORTCMASK_TOOLTIP;Short circuit the 2 curves L(L) and L(H).\nAllows you to mix the current image with the original image modified by the mask job.\nUsable with masks 2, 3, 4, 6, 7
TP_LOCALLAB_SHOWCB;2+ - Mask and modifications
TP_LOCALLAB_SHOWT;3 - Mask and modifications
TP_LOCALLAB_SHOWS;4+* - Mask and modifications

View File

@ -194,7 +194,7 @@ public:
bool multiThread, bool enaMask, bool showmaske, bool deltaE, bool modmask, bool zero, bool modif, float chrom, float rad, float lap, float gamma, float slope, float blendm, int shado, float amountcd, float anchorcd,
LUTf & lmasklocalcurve, bool & localmaskutili,
const LocwavCurve & loclmasCurvecolwav, bool & lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
bool delt, const float hueref, const float chromaref, const float lumaref,
bool shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope);
void deltaEforMask(float **rdE, int bfw, int bfh, LabImage* bufcolorig, const float hueref, const float chromaref, const float lumaref,

View File

@ -3140,7 +3140,7 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int
bool multiThread, bool enaMask, bool showmaske, bool deltaE, bool modmask, bool zero, bool modif, float chrom, float rad, float lap, float gamma, float slope, float blendm, int shado, float amountcd, float anchorcd,
LUTf & lmasklocalcurve, bool & localmaskutili,
const LocwavCurve & loclmasCurvecolwav, bool & lmasutilicolwav, int level_bl, int level_hl, int level_br, int level_hr,
bool delt, const float hueref, const float chromaref, const float lumaref,
bool shortcu, bool delt, const float hueref, const float chromaref, const float lumaref,
float maxdE, float mindE, float maxdElim, float mindElim, float iterat, float limscope, int scope
)
{
@ -3237,6 +3237,10 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int
bufmaskblurcol->L[ir][jr] = CLIPLOC(kmaskL + kmaskHL);
bufmaskblurcol->a[ir][jr] = CLIPC(kmaskC + kmaskH);
bufmaskblurcol->b[ir][jr] = CLIPC(kmaskC + kmaskH);
if(shortcu){//short circuit all L curve
bufmaskblurcol->L[ir][jr] = 32768.f - bufcolorig->L[ir][jr];
}
ble[ir][jr] = bufmaskblurcol->L[ir][jr] / 32768.f;
float X, Y, Z;
float L = bufcolorig->L[ir][jr];
@ -3260,7 +3264,6 @@ void ImProcFunctions::maskcalccol(bool invmask, bool pde, int bfw, int bfh, int
LUTf lutTonemaskexp(65536);
calcGammaLut(gamma, slope, lutTonemaskexp);
#ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16)
#endif
@ -8242,10 +8245,12 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
float amountcd = 0.f;
float anchorcd = 50.f;
bool shortcu = params->locallab.spots.at(sp).shortc;
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, loctemp.get(), bufmaskorigcb.get(), originalmaskcb.get(), original, inv, lp,
locccmascbCurve, lcmascbutili, locllmascbCurve, llmascbutili, lochhmascbCurve, lhmascbutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmaskcblocalcurve, localmaskcbutili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -8519,6 +8524,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
float blendm = lp.blendmatm;
float lap = params->locallab.spots.at(sp).lapmasktm;
float pde = params->locallab.spots.at(sp).laplac;
bool shortcu = params->locallab.spots.at(sp).shortc;
if (!params->locallab.spots.at(sp).enatmMaskaft) {
LocwavCurve dummy;
@ -8538,7 +8544,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufgbm.get(), bufmaskorigtm.get(), originalmasktm.get(), original, inv, lp,
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -8564,6 +8570,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -8577,7 +8584,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, tmp1.get(), bufmaskorigtm.get(), originalmasktm.get(), original, inv, lp,
locccmastmCurve, lcmastmutili, locllmastmCurve, llmastmutili, lochhmastmCurve, lhmastmutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasktmlocalcurve, localmasktmutili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -8752,6 +8759,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool lmasutilicolwav = false;
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -8765,7 +8773,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskorigSH.get(), originalmaskSH.get(), original, inv, lp,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -8909,6 +8917,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
// bool delt = params->locallab.spots.at(sp).deltae;
bool delt = false;
int sco = params->locallab.spots.at(sp).scopemask;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -8922,7 +8931,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufcolorig.get(), bufmaskblurcol.get(), originalmaskSH.get(), original, inv, lp,
locccmasSHCurve, lcmasSHutili, locllmasSHCurve, llmasSHutili, lochhmasSHCurve, lhmasSHutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmaskSHlocalcurve, localmaskSHutili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -10921,6 +10930,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool delt = params->locallab.spots.at(sp).deltae;
int sco = params->locallab.spots.at(sp).scopemask;
int shado = 0;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -10933,7 +10943,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, bfw, bfh, xstart, ystart, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, inv, lp,
locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -11204,6 +11214,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
bool delt = false;
int sco = params->locallab.spots.at(sp).scopemask;
int shado = 0;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -11216,7 +11227,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
maskcalccol(false, pde, GW, GH, 0, 0, sk, cx, cy, bufexporig.get(), bufmaskblurexp.get(), originalmaskexp.get(), original, inv, lp,
locccmasexpCurve, lcmasexputili, locllmasexpCurve, llmasexputili, lochhmasexpCurve, lhmasexputili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmaskexplocalcurve, localmaskexputili, dummy, lmasutilicolwav, 1, 1, 5, 5,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -11462,6 +11473,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
int level_hl = params->locallab.spots.at(sp).csthresholdcol.getTopLeft();
int level_br = params->locallab.spots.at(sp).csthresholdcol.getBottomRight();
int level_hr = params->locallab.spots.at(sp).csthresholdcol.getTopRight();
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -11475,7 +11487,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav,
level_bl, level_hl, level_br, level_hr,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);
@ -11685,6 +11697,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
// bool delt = params->locallab.spots.at(sp).deltae;
bool delt = false;
int sco = params->locallab.spots.at(sp).scopemask;
bool shortcu = params->locallab.spots.at(sp).shortc;
const int limscope = 80;
const float mindE = 2.f + MINSCOPE * sco * lp.thr;
@ -11698,7 +11711,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
locccmasCurve, lcmasutili, locllmasCurve, llmasutili, lochhmasCurve, lhmasutili, multiThread,
enaMask, showmaske, deltaE, modmask, zero, modif, chrom, rad, lap, gamma, slope, blendm, shado, amountcd, anchorcd, lmasklocalcurve, localmaskutili, loclmasCurvecolwav, lmasutilicolwav,
level_bl, level_hl, level_br, level_hr,
delt, hueref, chromaref, lumaref,
shortcu, delt, hueref, chromaref, lumaref,
maxdE, mindE, maxdElim, mindElim, lp.iterat, limscope, sco
);

View File

@ -817,6 +817,7 @@ enum ProcEventCode {
EvlocallabdetailSH = 787,
EvlocallabfatamountSH = 788,
EvlocallabfatanchorSH = 789,
Evlocallabshortc = 790,
NUMOFEVENTS
};

View File

@ -2434,6 +2434,7 @@ LocallabParams::LocallabSpot::LocallabSpot() :
avoid(false),
laplac(false),
deltae(true),
shortc(false),
scopemask(60),
// Color & Light
expcolor(false),
@ -2737,6 +2738,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
&& avoid == other.avoid
&& laplac == other.laplac
&& deltae == other.deltae
&& shortc == other.shortc
&& scopemask == other.scopemask
// Color & Light
&& expcolor == other.expcolor
@ -4035,6 +4037,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).avoid, "Locallab", "Avoid_" + std::to_string(i), spot.avoid, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).laplac, "Locallab", "Laplac_" + std::to_string(i), spot.laplac, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).deltae, "Locallab", "Deltae_" + std::to_string(i), spot.deltae, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).shortc, "Locallab", "Shortc_" + std::to_string(i), spot.shortc, keyFile);
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).scopemask, "Locallab", "Scopemask_" + std::to_string(i), spot.scopemask, keyFile);
// Color & Light
saveToKeyfile(!pedited || pedited->locallab.spots.at(i).expcolor, "Locallab", "Expcolor_" + std::to_string(i), spot.expcolor, keyFile);
@ -5441,6 +5444,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
assignFromKeyfile(keyFile, "Locallab", "Avoid_" + std::to_string(i), pedited, spot.avoid, spotEdited.avoid);
assignFromKeyfile(keyFile, "Locallab", "Laplac_" + std::to_string(i), pedited, spot.laplac, spotEdited.laplac);
assignFromKeyfile(keyFile, "Locallab", "Deltae_" + std::to_string(i), pedited, spot.deltae, spotEdited.deltae);
assignFromKeyfile(keyFile, "Locallab", "Shortc_" + std::to_string(i), pedited, spot.shortc, spotEdited.shortc);
assignFromKeyfile(keyFile, "Locallab", "Scopemask_" + std::to_string(i), pedited, spot.scopemask, spotEdited.scopemask);
// Color & Light
assignFromKeyfile(keyFile, "Locallab", "Expcolor_" + std::to_string(i), pedited, spot.expcolor, spotEdited.expcolor);

View File

@ -981,6 +981,7 @@ struct LocallabParams {
bool avoid;
bool laplac;
bool deltae;
bool shortc;
int scopemask;
// Color & Light
bool expcolor;

View File

@ -816,7 +816,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
LUMINANCECURVE, //EvlocallabEqualizersh
LUMINANCECURVE, // EvlocallabdetailSH
LUMINANCECURVE, //EvlocallabfatamountSH
LUMINANCECURVE //EvlocallabfatanchorSH
LUMINANCECURVE, //EvlocallabfatanchorSH
LUMINANCECURVE //Evlocallabshortc
};
namespace rtengine

View File

@ -73,6 +73,7 @@ ControlSpotPanel::ControlSpotPanel():
avoid_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_AVOID")))),
laplac_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_LAPLACC")))),
deltae_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_DELTAEC")))),
shortc_(Gtk::manage(new Gtk::CheckButton(M("TP_LOCALLAB_SHORTC")))),
lastObject_(-1),
nbSpotChanged_(false),
@ -247,6 +248,7 @@ ControlSpotPanel::ControlSpotPanel():
if(showtooltip) transitweak_->set_tooltip_text(M("TP_LOCALLAB_TRANSITWEAK_TOOLTIP"));
if(showtooltip) transitgrad_->set_tooltip_text(M("TP_LOCALLAB_TRANSITGRAD_TOOLTIP"));
if(showtooltip) scopemask_->set_tooltip_text(M("TP_LOCALLAB_SCOPEMASK_TOOLTIP"));
if(showtooltip) shortc_->set_tooltip_text(M("TP_LOCALLAB_SHORTCMASK_TOOLTIP"));
transit_->setAdjusterListener(this);
transitweak_->setAdjusterListener(this);
transitgrad_->setAdjusterListener(this);
@ -287,8 +289,11 @@ ControlSpotPanel::ControlSpotPanel():
maskBox->pack_start(*laplac_);
deltaeConn_ = deltae_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::deltaeChanged));
shortcConn_ = shortc_->signal_toggled().connect(
sigc::mem_fun(*this, &ControlSpotPanel::shortcChanged));
maskBox->pack_start(*deltae_);
maskBox->pack_start(*scopemask_);
maskBox->pack_start(*shortc_);
maskFrame->add(*maskBox);
pack_start(*maskFrame);
@ -598,6 +603,7 @@ void ControlSpotPanel::load_ControlSpot_param()
avoid_->set_active(row[spots_.avoid]);
laplac_->set_active(row[spots_.laplac]);
deltae_->set_active(row[spots_.deltae]);
shortc_->set_active(row[spots_.shortc]);
}
void ControlSpotPanel::controlspotChanged()
@ -1142,6 +1148,41 @@ void ControlSpotPanel::deltaeChanged()
}
}
void ControlSpotPanel::shortcChanged()
{
// Get selected control spot
const auto s = treeview_->get_selection();
if (!s->count_selected_rows()) {
return;
}
const auto iter = s->get_selected();
Gtk::TreeModel::Row row = *iter;
if (multiImage) {
if (shortc_->get_inconsistent()) {
shortc_->set_inconsistent(false);
shortcConn_.block(true);
shortc_->set_active(false);
shortcConn_.block(false);
}
}
row[spots_.shortc] = shortc_->get_active();
// Raise event
if (listener) {
if (shortc_->get_active()) {
listener->panelChanged(Evlocallabshortc, M("GENERAL_ENABLED"));
} else {
listener->panelChanged(Evlocallabshortc, M("GENERAL_DISABLED"));
}
}
}
void ControlSpotPanel::disableParamlistener(bool cond)
{
// printf("disableParamlistener: %d\n", cond);
@ -1176,6 +1217,7 @@ void ControlSpotPanel::disableParamlistener(bool cond)
avoidConn_.block(cond);
laplacConn_.block(cond);
deltaeConn_.block(cond);
shortcConn_.block(cond);
}
void ControlSpotPanel::setParamEditable(bool cond)
@ -1206,6 +1248,7 @@ void ControlSpotPanel::setParamEditable(bool cond)
avoid_->set_sensitive(cond);
laplac_->set_sensitive(cond);
deltae_->set_sensitive(cond);
shortc_->set_sensitive(cond);
}
void ControlSpotPanel::addControlSpotCurve(Gtk::TreeModel::Row& row)
@ -1842,6 +1885,7 @@ ControlSpotPanel::SpotRow* ControlSpotPanel::getSpot(const int id)
r->avoid = row[spots_.avoid];
r->laplac = row[spots_.laplac];
r->deltae = row[spots_.deltae];
r->shortc = row[spots_.shortc];
return r;
}
@ -1971,6 +2015,7 @@ void ControlSpotPanel::addControlSpot(SpotRow* newSpot)
row[spots_.avoid] = newSpot->avoid;
row[spots_.laplac] = newSpot->laplac;
row[spots_.deltae] = newSpot->deltae;
row[spots_.shortc] = newSpot->shortc;
updateParamVisibility();
disableParamlistener(false);
@ -2019,6 +2064,7 @@ int ControlSpotPanel::updateControlSpot(SpotRow* spot)
row[spots_.avoid] = spot->avoid;
row[spots_.laplac] = spot->laplac;
row[spots_.deltae] = spot->deltae;
row[spots_.shortc] = spot->shortc;
updateControlSpotCurve(row);
updateParamVisibility();
@ -2113,6 +2159,7 @@ ControlSpotPanel::SpotEdited* ControlSpotPanel::getEditedStates()
se->avoid = !avoid_->get_inconsistent();
se->laplac = !laplac_->get_inconsistent();
se->deltae = !deltae_->get_inconsistent();
se->shortc = !shortc_->get_inconsistent();
return se;
}
@ -2185,6 +2232,7 @@ void ControlSpotPanel::setEditedStates(SpotEdited* se)
avoid_->set_inconsistent(multiImage && !se->avoid);
laplac_->set_inconsistent(multiImage && !se->laplac);
deltae_->set_inconsistent(multiImage && !se->deltae);
shortc_->set_inconsistent(multiImage && !se->shortc);
// Update Control Spot GUI according to widgets edited states
updateParamVisibility();
@ -2342,6 +2390,7 @@ ControlSpotPanel::ControlSpots::ControlSpots()
add(avoid);
add(laplac);
add(deltae);
add(shortc);
}
//-----------------------------------------------------------------------------

View File

@ -69,6 +69,7 @@ public:
bool avoid;
bool laplac;
bool deltae;
bool shortc;
};
/**
@ -103,6 +104,7 @@ public:
bool avoid;
bool laplac;
bool deltae;
bool shortc;
};
/**
@ -271,6 +273,7 @@ private:
void avoidChanged();
void laplacChanged();
void deltaeChanged();
void shortcChanged();
void disableParamlistener(bool cond);
@ -321,6 +324,7 @@ private:
Gtk::TreeModelColumn<bool> avoid;
Gtk::TreeModelColumn<bool> laplac;
Gtk::TreeModelColumn<bool> deltae;
Gtk::TreeModelColumn<bool> shortc;
};
class RenameDialog:
@ -392,6 +396,8 @@ private:
sigc::connection laplacConn_;
Gtk::CheckButton* const deltae_;
sigc::connection deltaeConn_;
Gtk::CheckButton* const shortc_;
sigc::connection shortcConn_;
// Internal variables
int lastObject_;

View File

@ -2873,6 +2873,7 @@ void Locallab::read(const ProcParams* pp, const ParamsEdited* pedited)
r->avoid = pp->locallab.spots.at(i).avoid;
r->laplac = pp->locallab.spots.at(i).laplac;
r->deltae = pp->locallab.spots.at(i).deltae;
r->shortc = pp->locallab.spots.at(i).shortc;
expsettings->addControlSpot(r);
}
@ -3003,6 +3004,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
r->avoid = newSpot->avoid;
r->laplac = newSpot->laplac;
r->deltae = newSpot->deltae;
r->shortc = newSpot->shortc;
expsettings->addControlSpot(r);
// ProcParams update
@ -3222,6 +3224,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
r->avoid = newSpot->avoid;
r->laplac = newSpot->laplac;
r->deltae = newSpot->deltae;
r->shortc = newSpot->shortc;
expsettings->addControlSpot(r);
// ProcParams update
@ -3339,6 +3342,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pp->locallab.spots.at(pp->locallab.selspot).avoid = r->avoid;
pp->locallab.spots.at(pp->locallab.selspot).laplac = r->laplac;
pp->locallab.spots.at(pp->locallab.selspot).deltae = r->deltae;
pp->locallab.spots.at(pp->locallab.selspot).shortc = r->shortc;
// Color & Light
pp->locallab.spots.at(pp->locallab.selspot).expcolor = expcolor->getEnabled();
pp->locallab.spots.at(pp->locallab.selspot).curvactiv = curvactiv->get_active();
@ -3735,6 +3739,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pe->locallab.spots.at(pp->locallab.selspot).avoid = pe->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid;
pe->locallab.spots.at(pp->locallab.selspot).laplac = pe->locallab.spots.at(pp->locallab.selspot).laplac || se->laplac;
pe->locallab.spots.at(pp->locallab.selspot).deltae = pe->locallab.spots.at(pp->locallab.selspot).deltae || se->deltae;
pe->locallab.spots.at(pp->locallab.selspot).shortc = pe->locallab.spots.at(pp->locallab.selspot).shortc || se->shortc;
// Color & Light
pe->locallab.spots.at(pp->locallab.selspot).expcolor = pe->locallab.spots.at(pp->locallab.selspot).expcolor || !expcolor->get_inconsistent();
pe->locallab.spots.at(pp->locallab.selspot).curvactiv = pe->locallab.spots.at(pp->locallab.selspot).curvactiv || !curvactiv->get_inconsistent();
@ -4047,6 +4052,7 @@ void Locallab::write(ProcParams* pp, ParamsEdited* pedited)
pedited->locallab.spots.at(pp->locallab.selspot).avoid = pedited->locallab.spots.at(pp->locallab.selspot).avoid || se->avoid;
pedited->locallab.spots.at(pp->locallab.selspot).laplac = pedited->locallab.spots.at(pp->locallab.selspot).laplac || se->laplac;
pedited->locallab.spots.at(pp->locallab.selspot).deltae = pedited->locallab.spots.at(pp->locallab.selspot).deltae || se->deltae;
pedited->locallab.spots.at(pp->locallab.selspot).shortc = pedited->locallab.spots.at(pp->locallab.selspot).shortc || se->shortc;
// Color & Light
pedited->locallab.spots.at(pp->locallab.selspot).expcolor = pedited->locallab.spots.at(pp->locallab.selspot).expcolor || !expcolor->get_inconsistent();
pedited->locallab.spots.at(pp->locallab.selspot).curvactiv = pedited->locallab.spots.at(pp->locallab.selspot).curvactiv || !curvactiv->get_inconsistent();
@ -8743,6 +8749,7 @@ void Locallab::updateLocallabGUI(const rtengine::procparams::ProcParams* pp, con
se->avoid = spotState->avoid;
se->laplac = spotState->laplac;
se->deltae = spotState->deltae;
se->shortc = spotState->shortc;
expsettings->setEditedStates(se);
// Color & Light

View File

@ -975,6 +975,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
locallab.spots.at(j).avoid = locallab.spots.at(j).avoid && pSpot.avoid == otherSpot.avoid;
locallab.spots.at(j).laplac = locallab.spots.at(j).laplac && pSpot.laplac == otherSpot.laplac;
locallab.spots.at(j).deltae = locallab.spots.at(j).deltae && pSpot.deltae == otherSpot.deltae;
locallab.spots.at(j).shortc = locallab.spots.at(j).shortc && pSpot.shortc == otherSpot.shortc;
locallab.spots.at(j).scopemask = locallab.spots.at(j).scopemask && pSpot.scopemask == otherSpot.scopemask;
// Color & Light
locallab.spots.at(j).expcolor = locallab.spots.at(j).expcolor && pSpot.expcolor == otherSpot.expcolor;
@ -2818,6 +2819,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
toEdit.locallab.spots.at(i).deltae = mods.locallab.spots.at(i).deltae;
}
if (locallab.spots.at(i).shortc) {
toEdit.locallab.spots.at(i).shortc = mods.locallab.spots.at(i).shortc;
}
// Color & Light
if (locallab.spots.at(i).expcolor) {
toEdit.locallab.spots.at(i).expcolor = mods.locallab.spots.at(i).expcolor;
@ -4851,6 +4856,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
avoid(v),
laplac(v),
deltae(v),
shortc(v),
scopemask(v),
// Color & Light
expcolor(v),
@ -5151,6 +5157,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
avoid = v;
laplac = v;
deltae = v;
shortc = v;
scopemask = v;
// Color & Light
expcolor = v;

View File

@ -393,6 +393,7 @@ public:
bool avoid;
bool laplac;
bool deltae;
bool shortc;
bool scopemask;
// Color & Light
bool expcolor;