Improve GUI for merge file

This commit is contained in:
Desmis 2019-11-20 12:53:29 +01:00
parent 3251905964
commit 6ebc03b638
3 changed files with 82 additions and 27 deletions

View File

@ -12387,7 +12387,9 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
} }
} }
} }
float kd = 1.f;//correction to ctoning float kd = 1.f;//correction to ctoning
if (lp.mergemet >= 2) { if (lp.mergemet >= 2) {
kd = 10.f * 0.01f * lp.strengrid; kd = 10.f * 0.01f * lp.strengrid;
} }
@ -12640,6 +12642,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
} }
} }
#ifdef _OPENMP #ifdef _OPENMP
#pragma omp parallel for schedule(dynamic,16) #pragma omp parallel for schedule(dynamic,16)
#endif #endif
@ -13110,6 +13113,10 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
} }
if (lp.softradiuscol > 0.f) {
softproc(bufcolreserv.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0);
}
if (nottransit) { if (nottransit) {
//special only transition //special only transition
//may be we can add preview... //may be we can add preview...
@ -13146,6 +13153,8 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
} }
if (!nottransit) {
if (lp.softradiuscol > 0.f) { if (lp.softradiuscol > 0.f) {
softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0); softproc(bufcolorig.get(), bufcolfin.get(), lp.softradiuscol, bfh, bfw, 0.0001, 0.00001, 0.1f, sk, multiThread, 0);
} }
@ -13158,6 +13167,7 @@ void ImProcFunctions::Lab_Local(int call, int sp, float** shbuffer, LabImage * o
for (int jr = 0; jr < bfw; jr++) { for (int jr = 0; jr < bfw; jr++) {
buflight[ir][jr] = CLIPRET((bufcolfin->L[ir][jr] - bufcolorig->L[ir][jr]) / 328.f); buflight[ir][jr] = CLIPRET((bufcolfin->L[ir][jr] - bufcolorig->L[ir][jr]) / 328.f);
} }
}
} }

View File

@ -159,6 +159,7 @@ Locallab::Locallab():
// Color & Light // Color & Light
llCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_LUM"))), llCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_LUM"))),
HCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))), HCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))),
H2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))),
rgbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_RGB"))), rgbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_RGB"))),
maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))), maskCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASK"))),
maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))), maskHCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_MASKH"))),
@ -171,7 +172,7 @@ Locallab::Locallab():
toneMethod(Gtk::manage(new MyComboBoxText())), toneMethod(Gtk::manage(new MyComboBoxText())),
rgbshape(static_cast<DiagonalCurveEditor*>(rgbCurveEditorG->addCurve(CT_Diagonal, "", toneMethod))), rgbshape(static_cast<DiagonalCurveEditor*>(rgbCurveEditorG->addCurve(CT_Diagonal, "", toneMethod))),
LHshape(static_cast<FlatCurveEditor*>(HCurveEditorG->addCurve(CT_Flat, "L(H)", nullptr, false, true))), LHshape(static_cast<FlatCurveEditor*>(HCurveEditorG->addCurve(CT_Flat, "L(H)", nullptr, false, true))),
HHshape(static_cast<FlatCurveEditor*>(HCurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))), HHshape(static_cast<FlatCurveEditor*>(H2CurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))),
CCmaskshape(static_cast<FlatCurveEditor*>(maskCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))), CCmaskshape(static_cast<FlatCurveEditor*>(maskCurveEditorG->addCurve(CT_Flat, "C(C)", nullptr, false, false))),
LLmaskshape(static_cast<FlatCurveEditor*>(maskCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))), LLmaskshape(static_cast<FlatCurveEditor*>(maskCurveEditorG->addCurve(CT_Flat, "L(L)", nullptr, false, false))),
HHmaskshape(static_cast<FlatCurveEditor *>(maskCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))), HHmaskshape(static_cast<FlatCurveEditor *>(maskCurveEditorG->addCurve(CT_Flat, "LC(H)", nullptr, false, true))),
@ -777,6 +778,8 @@ pe(nullptr)
const std::vector<GradientMilestone>& mLHshape = six_shape; const std::vector<GradientMilestone>& mLHshape = six_shape;
LHshape->setBottomBarBgGradient(mLHshape); LHshape->setBottomBarBgGradient(mLHshape);
HCurveEditorG->curveListComplete();
H2CurveEditorG->setCurveListener(this);
HHshape->setIdentityValue(0.); HHshape->setIdentityValue(0.);
HHshape->setResetCurve(FlatCurveType(defSpot.HHcurve.at(0)), defSpot.HHcurve); HHshape->setResetCurve(FlatCurveType(defSpot.HHcurve.at(0)), defSpot.HHcurve);
@ -790,7 +793,7 @@ pe(nullptr)
const std::vector<GradientMilestone>& mHHshape = six_shape; const std::vector<GradientMilestone>& mHHshape = six_shape;
HHshape->setBottomBarBgGradient(mHHshape); HHshape->setBottomBarBgGradient(mHHshape);
HCurveEditorG->curveListComplete(); H2CurveEditorG->curveListComplete();
rgbCurveEditorG->setCurveListener(this); rgbCurveEditorG->setCurveListener(this);
@ -978,6 +981,7 @@ pe(nullptr)
colorBox->pack_start(*qualcurvbox); colorBox->pack_start(*qualcurvbox);
colorBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*llCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*H2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor colorBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
colorBox->pack_start(*special); colorBox->pack_start(*special);
colorBox->pack_start(*invers); colorBox->pack_start(*invers);
@ -5534,12 +5538,20 @@ void Locallab::merMethodChanged()
sensi->set_sensitive(true); sensi->set_sensitive(true);
structcol->set_sensitive(true); structcol->set_sensitive(true);
blurcolde->set_sensitive(true); blurcolde->set_sensitive(true);
H2CurveEditorG->set_sensitive(true);
rgbCurveEditorG->set_sensitive(true);
special->set_sensitive(true);
invers->set_sensitive(true);
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 1) { } else if (merMethod->get_active_row_number() == 1) {
mask7->hide(); mask7->hide();
sensi->set_sensitive(true); sensi->set_sensitive(true);
structcol->set_sensitive(true); structcol->set_sensitive(true);
blurcolde->set_sensitive(true); blurcolde->set_sensitive(true);
H2CurveEditorG->set_sensitive(true);
rgbCurveEditorG->set_sensitive(true);
special->set_sensitive(true);
invers->set_sensitive(true);
// conthrcol->hide(); // conthrcol->hide();
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 2) { } else if (merMethod->get_active_row_number() == 2) {
@ -5547,12 +5559,20 @@ void Locallab::merMethodChanged()
sensi->set_sensitive(false); sensi->set_sensitive(false);
structcol->set_sensitive(false); structcol->set_sensitive(false);
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
// conthrcol->show(); // conthrcol->show();
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) { } else if (merMethod->get_active_row_number() == 3) {
sensi->set_sensitive(false); sensi->set_sensitive(false);
structcol->set_sensitive(false); structcol->set_sensitive(false);
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
mask7->show(); mask7->show();
// conthrcol->show(); // conthrcol->show();
gridmerFrame->hide(); gridmerFrame->hide();
@ -5562,6 +5582,10 @@ void Locallab::merMethodChanged()
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
sensi->set_sensitive(false); sensi->set_sensitive(false);
structcol->set_sensitive(false); structcol->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
gridmerFrame->show(); gridmerFrame->show();
} }
@ -10297,12 +10321,20 @@ void Locallab::updateSpecificGUIState()
structcol->set_sensitive(true); structcol->set_sensitive(true);
sensi->set_sensitive(true); sensi->set_sensitive(true);
blurcolde->set_sensitive(true); blurcolde->set_sensitive(true);
H2CurveEditorG->set_sensitive(true);
rgbCurveEditorG->set_sensitive(true);
special->set_sensitive(true);
invers->set_sensitive(true);
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 1) { } else if (merMethod->get_active_row_number() == 1) {
mask7->hide(); mask7->hide();
structcol->set_sensitive(true); structcol->set_sensitive(true);
sensi->set_sensitive(true); sensi->set_sensitive(true);
blurcolde->set_sensitive(true); blurcolde->set_sensitive(true);
H2CurveEditorG->set_sensitive(true);
rgbCurveEditorG->set_sensitive(true);
special->set_sensitive(true);
invers->set_sensitive(true);
// conthrcol->hide(); // conthrcol->hide();
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 2) { } else if (merMethod->get_active_row_number() == 2) {
@ -10310,6 +10342,10 @@ void Locallab::updateSpecificGUIState()
structcol->set_sensitive(false); structcol->set_sensitive(false);
sensi->set_sensitive(false); sensi->set_sensitive(false);
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
// conthrcol->show(); // conthrcol->show();
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) { } else if (merMethod->get_active_row_number() == 3) {
@ -10317,6 +10353,10 @@ void Locallab::updateSpecificGUIState()
structcol->set_sensitive(false); structcol->set_sensitive(false);
sensi->set_sensitive(false); sensi->set_sensitive(false);
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
mask7->show(); mask7->show();
gridmerFrame->hide(); gridmerFrame->hide();
} else if (merMethod->get_active_row_number() == 3) { } else if (merMethod->get_active_row_number() == 3) {
@ -10324,6 +10364,10 @@ void Locallab::updateSpecificGUIState()
structcol->set_sensitive(false); structcol->set_sensitive(false);
sensi->set_sensitive(false); sensi->set_sensitive(false);
blurcolde->set_sensitive(false); blurcolde->set_sensitive(false);
H2CurveEditorG->set_sensitive(false);
rgbCurveEditorG->set_sensitive(false);
special->set_sensitive(false);
invers->set_sensitive(false);
// conthrcol->hide(); // conthrcol->hide();
gridmerFrame->show(); gridmerFrame->show();
} }

View File

@ -77,6 +77,7 @@ private:
// Color & Light // Color & Light
CurveEditorGroup* const llCurveEditorG; CurveEditorGroup* const llCurveEditorG;
CurveEditorGroup* const HCurveEditorG; CurveEditorGroup* const HCurveEditorG;
CurveEditorGroup* const H2CurveEditorG;
CurveEditorGroup* const rgbCurveEditorG; CurveEditorGroup* const rgbCurveEditorG;
CurveEditorGroup* const maskCurveEditorG; CurveEditorGroup* const maskCurveEditorG;
CurveEditorGroup* const maskHCurveEditorG; CurveEditorGroup* const maskHCurveEditorG;