GUI part CH curve
This commit is contained in:
parent
8af287aa8c
commit
b6b03fd975
@ -1194,6 +1194,7 @@ HISTORY_MSG_952;Local - Mask Common soft radius
|
||||
HISTORY_MSG_953;Local - Mask Common blend chroma
|
||||
HISTORY_MSG_954;Local - Show-hide tools
|
||||
HISTORY_MSG_955;Local - Enable Spot
|
||||
HISTORY_MSG_956;Local - CH Curve
|
||||
HISTORY_MSG_BLSHAPE;Blur by level
|
||||
HISTORY_MSG_BLURCWAV;Blur chroma
|
||||
HISTORY_MSG_BLURWAV;Blur luminance
|
||||
|
@ -978,7 +978,7 @@ enum ProcEventCode {
|
||||
Evlocallabblendmaskab = 952,
|
||||
EvLocallabSpotprevMethod = 953,
|
||||
Evlocallabactiv = 954,
|
||||
|
||||
EvlocallabCHshape = 955,
|
||||
NUMOFEVENTS
|
||||
};
|
||||
|
||||
|
@ -2777,6 +2777,33 @@ LocallabParams::LocallabSpot::LocallabSpot() :
|
||||
0.35,
|
||||
0.35
|
||||
},
|
||||
CHcurve{
|
||||
static_cast<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
|
||||
},
|
||||
invers(false),
|
||||
special(false),
|
||||
toolcol(true),
|
||||
@ -3926,6 +3953,7 @@ bool LocallabParams::LocallabSpot::operator ==(const LocallabSpot& other) const
|
||||
&& rgbcurve == other.rgbcurve
|
||||
&& LHcurve == other.LHcurve
|
||||
&& HHcurve == other.HHcurve
|
||||
&& CHcurve == other.CHcurve
|
||||
&& invers == other.invers
|
||||
&& special == other.special
|
||||
&& toolcol == other.toolcol
|
||||
@ -5448,6 +5476,7 @@ int ProcParams::save(const Glib::ustring& fname, const Glib::ustring& fname2, bo
|
||||
saveToKeyfile(!pedited || spot_edited->rgbcurve, "Locallab", "RGBCurve_" + index_str, spot.rgbcurve, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->LHcurve, "Locallab", "LHCurve_" + index_str, spot.LHcurve, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->HHcurve, "Locallab", "HHCurve_" + index_str, spot.HHcurve, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->CHcurve, "Locallab", "CHCurve_" + index_str, spot.CHcurve, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->invers, "Locallab", "Invers_" + index_str, spot.invers, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->special, "Locallab", "Special_" + index_str, spot.special, keyFile);
|
||||
saveToKeyfile(!pedited || spot_edited->toolcol, "Locallab", "Toolcol_" + index_str, spot.toolcol, keyFile);
|
||||
@ -7119,6 +7148,7 @@ int ProcParams::load(const Glib::ustring& fname, ParamsEdited* pedited)
|
||||
assignFromKeyfile(keyFile, "Locallab", "RGBCurve_" + index_str, pedited, spot.rgbcurve, spotEdited.rgbcurve);
|
||||
assignFromKeyfile(keyFile, "Locallab", "LHCurve_" + index_str, pedited, spot.LHcurve, spotEdited.LHcurve);
|
||||
assignFromKeyfile(keyFile, "Locallab", "HHCurve_" + index_str, pedited, spot.HHcurve, spotEdited.HHcurve);
|
||||
assignFromKeyfile(keyFile, "Locallab", "CHCurve_" + index_str, pedited, spot.CHcurve, spotEdited.CHcurve);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Invers_" + index_str, pedited, spot.invers, spotEdited.invers);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Special_" + index_str, pedited, spot.special, spotEdited.special);
|
||||
assignFromKeyfile(keyFile, "Locallab", "Toolcol_" + index_str, pedited, spot.toolcol, spotEdited.toolcol);
|
||||
|
@ -50,6 +50,7 @@ class LocretigainCurve;
|
||||
class LocretigainCurverab;
|
||||
class LocLHCurve;
|
||||
class LocHHCurve;
|
||||
class LocCHCurve;
|
||||
class LocLLmaskCurve;
|
||||
class LocCCmaskCurve;
|
||||
class LocHHmaskCurve;
|
||||
@ -1056,6 +1057,7 @@ struct LocallabParams {
|
||||
std::vector<double> rgbcurve;
|
||||
std::vector<double> LHcurve;
|
||||
std::vector<double> HHcurve;
|
||||
std::vector<double> CHcurve;
|
||||
bool invers;
|
||||
bool special;
|
||||
bool toolcol;
|
||||
|
@ -981,8 +981,8 @@ int refreshmap[rtengine::NUMOFEVENTS] = {
|
||||
LUMINANCECURVE, // Evlocallabsoftradiusmask
|
||||
LUMINANCECURVE, // Evlocallabblendmaskab
|
||||
LUMINANCECURVE, // EvLocallabSpotprevMethod
|
||||
LUMINANCECURVE // Evlocallabactiv
|
||||
|
||||
LUMINANCECURVE, // Evlocallabactiv
|
||||
LUMINANCECURVE // EvlocallabCHshape
|
||||
};
|
||||
|
||||
|
||||
|
@ -420,6 +420,8 @@ LocallabColor::LocallabColor():
|
||||
LHshape(static_cast<FlatCurveEditor*>(HCurveEditorG->addCurve(CT_Flat, "L(H)", nullptr, false, true))),
|
||||
H2CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))),
|
||||
HHshape(static_cast<FlatCurveEditor*>(H2CurveEditorG->addCurve(CT_Flat, "H(H)", nullptr, false, true))),
|
||||
H3CurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_HLH"))),
|
||||
CHshape(static_cast<FlatCurveEditor*>(H3CurveEditorG->addCurve(CT_Flat, "C(H)", nullptr, false, true))),
|
||||
rgbCurveEditorG(new CurveEditorGroup(options.lastlocalCurvesDir, M("TP_LOCALLAB_RGB"))),
|
||||
toneMethod(Gtk::manage(new MyComboBoxText())),
|
||||
rgbshape(static_cast<DiagonalCurveEditor*>(rgbCurveEditorG->addCurve(CT_Diagonal, "", toneMethod))),
|
||||
@ -574,6 +576,16 @@ LocallabColor::LocallabColor():
|
||||
|
||||
H2CurveEditorG->curveListComplete();
|
||||
|
||||
H3CurveEditorG->setCurveListener(this);
|
||||
|
||||
CHshape->setIdentityValue(0.);
|
||||
CHshape->setResetCurve(FlatCurveType(defSpot.CHcurve.at(0)), defSpot.CHcurve);
|
||||
CHshape->setTooltip(M("TP_LOCALLAB_CURVEEDITOR_LL_TOOLTIP"));
|
||||
CHshape->setCurveColorProvider(this, 3);
|
||||
CHshape->setBottomBarBgGradient(six_shape);
|
||||
|
||||
H3CurveEditorG->curveListComplete();
|
||||
|
||||
rgbCurveEditorG->setCurveListener(this);
|
||||
|
||||
toneMethod->append(M("TP_EXPOSURE_TCMODE_STANDARD"));
|
||||
@ -769,6 +781,7 @@ LocallabColor::LocallabColor():
|
||||
curvBox->pack_start(*clCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
|
||||
curvBox->pack_start(*HCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
|
||||
curvBox->pack_start(*H2CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
|
||||
curvBox->pack_start(*H3CurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
|
||||
curvBox->pack_start(*rgbCurveEditorG, Gtk::PACK_SHRINK, 4); // Padding is mandatory to correct behavior of curve editor
|
||||
curvBox->pack_start(*special);
|
||||
expcurvcol->add(*curvBox, false);
|
||||
@ -840,6 +853,7 @@ LocallabColor::~LocallabColor()
|
||||
delete clCurveEditorG;
|
||||
delete HCurveEditorG;
|
||||
delete H2CurveEditorG;
|
||||
delete H3CurveEditorG;
|
||||
delete rgbCurveEditorG;
|
||||
delete maskCurveEditorG;
|
||||
delete maskHCurveEditorG;
|
||||
@ -1017,6 +1031,7 @@ void LocallabColor::read(const rtengine::procparams::ProcParams* pp, const Param
|
||||
lcshape->setCurve(spot.lccurve);
|
||||
LHshape->setCurve(spot.LHcurve);
|
||||
HHshape->setCurve(spot.HHcurve);
|
||||
CHshape->setCurve(spot.CHcurve);
|
||||
|
||||
if (spot.toneMethod == "one") {
|
||||
toneMethod->set_active(0);
|
||||
@ -1188,6 +1203,7 @@ void LocallabColor::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pe
|
||||
spot.lccurve = lcshape->getCurve();
|
||||
spot.LHcurve = LHshape->getCurve();
|
||||
spot.HHcurve = HHshape->getCurve();
|
||||
spot.CHcurve = CHshape->getCurve();
|
||||
|
||||
if (toneMethod->get_active_row_number() == 0) {
|
||||
spot.toneMethod = "one";
|
||||
@ -1580,6 +1596,13 @@ void LocallabColor::curveChanged(CurveEditor* ce)
|
||||
}
|
||||
}
|
||||
|
||||
if (ce == CHshape) {
|
||||
if (listener) {
|
||||
listener->panelChanged(EvlocallabCHshape,
|
||||
M("HISTORY_CUSTOMCURVE") + " (" + escapeHtmlChars(spotName) + ")");
|
||||
}
|
||||
}
|
||||
|
||||
if (ce == HHshape) {
|
||||
if (listener) {
|
||||
listener->panelChanged(EvlocallabHHshape,
|
||||
@ -1670,6 +1693,7 @@ void LocallabColor::convertParamToNormal()
|
||||
lcshape->setCurve(defSpot.lccurve);
|
||||
LHshape->setCurve(defSpot.LHcurve);
|
||||
HHshape->setCurve(defSpot.HHcurve);
|
||||
CHshape->setCurve(defSpot.CHcurve);
|
||||
|
||||
if (defSpot.toneMethod == "one") {
|
||||
toneMethod->set_active(0);
|
||||
@ -1782,6 +1806,7 @@ void LocallabColor::updateGUIToMode(const modeType new_type)
|
||||
clCurveEditorG->hide();
|
||||
HCurveEditorG->hide();
|
||||
H2CurveEditorG->hide();
|
||||
H3CurveEditorG->hide();
|
||||
rgbCurveEditorG->hide();
|
||||
special->hide();
|
||||
expmaskcol1->hide();
|
||||
@ -1810,6 +1835,7 @@ void LocallabColor::updateGUIToMode(const modeType new_type)
|
||||
if (!invers->get_active()) { // Keep widgets hidden when invers is toggled
|
||||
clCurveEditorG->show();
|
||||
HCurveEditorG->show();
|
||||
H3CurveEditorG->show();
|
||||
}
|
||||
|
||||
H2CurveEditorG->show();
|
||||
@ -2047,6 +2073,7 @@ void LocallabColor::updateColorGUI1()
|
||||
qualitycurveMethod->hide();
|
||||
clCurveEditorG->hide();
|
||||
HCurveEditorG->hide();
|
||||
H3CurveEditorG->hide();
|
||||
expmaskcol1->hide();
|
||||
showmaskcolMethod->hide();
|
||||
// Reset hidden mask combobox
|
||||
@ -2072,6 +2099,7 @@ void LocallabColor::updateColorGUI1()
|
||||
if (mode == Normal) { // Keep widgets hidden in Normal mode
|
||||
clCurveEditorG->show();
|
||||
HCurveEditorG->show();
|
||||
H3CurveEditorG->show();
|
||||
expmaskcol1->show();
|
||||
}
|
||||
|
||||
|
@ -206,6 +206,8 @@ private:
|
||||
FlatCurveEditor* const LHshape;
|
||||
CurveEditorGroup* const H2CurveEditorG;
|
||||
FlatCurveEditor* const HHshape;
|
||||
CurveEditorGroup* const H3CurveEditorG;
|
||||
FlatCurveEditor* const CHshape;
|
||||
CurveEditorGroup* const rgbCurveEditorG;
|
||||
MyComboBoxText* const toneMethod;
|
||||
DiagonalCurveEditor* const rgbshape;
|
||||
|
@ -1104,6 +1104,7 @@ void ParamsEdited::initFrom(const std::vector<rtengine::procparams::ProcParams>&
|
||||
locallab.spots.at(j).rgbcurve = locallab.spots.at(j).rgbcurve && pSpot.rgbcurve == otherSpot.rgbcurve;
|
||||
locallab.spots.at(j).LHcurve = locallab.spots.at(j).LHcurve && pSpot.LHcurve == otherSpot.LHcurve;
|
||||
locallab.spots.at(j).HHcurve = locallab.spots.at(j).HHcurve && pSpot.HHcurve == otherSpot.HHcurve;
|
||||
locallab.spots.at(j).CHcurve = locallab.spots.at(j).CHcurve && pSpot.CHcurve == otherSpot.CHcurve;
|
||||
locallab.spots.at(j).invers = locallab.spots.at(j).invers && pSpot.invers == otherSpot.invers;
|
||||
locallab.spots.at(j).special = locallab.spots.at(j).special && pSpot.special == otherSpot.special;
|
||||
locallab.spots.at(j).toolcol = locallab.spots.at(j).toolcol && pSpot.toolcol == otherSpot.toolcol;
|
||||
@ -3381,6 +3382,10 @@ void ParamsEdited::combine(rtengine::procparams::ProcParams& toEdit, const rteng
|
||||
toEdit.locallab.spots.at(i).HHcurve = mods.locallab.spots.at(i).HHcurve;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).CHcurve) {
|
||||
toEdit.locallab.spots.at(i).CHcurve = mods.locallab.spots.at(i).CHcurve;
|
||||
}
|
||||
|
||||
if (locallab.spots.at(i).invers) {
|
||||
toEdit.locallab.spots.at(i).invers = mods.locallab.spots.at(i).invers;
|
||||
}
|
||||
@ -6138,6 +6143,7 @@ LocallabParamsEdited::LocallabSpotEdited::LocallabSpotEdited(bool v) :
|
||||
rgbcurve(v),
|
||||
LHcurve(v),
|
||||
HHcurve(v),
|
||||
CHcurve(v),
|
||||
invers(v),
|
||||
special(v),
|
||||
toolcol(v),
|
||||
@ -6622,6 +6628,7 @@ void LocallabParamsEdited::LocallabSpotEdited::set(bool v)
|
||||
rgbcurve = v;
|
||||
LHcurve = v;
|
||||
HHcurve = v;
|
||||
CHcurve = v;
|
||||
invers = v;
|
||||
special = v;
|
||||
toolcol = v;
|
||||
|
@ -470,6 +470,7 @@ public:
|
||||
bool rgbcurve;
|
||||
bool LHcurve;
|
||||
bool HHcurve;
|
||||
bool CHcurve;
|
||||
bool invers;
|
||||
bool special;
|
||||
bool toolcol;
|
||||
|
Loading…
x
Reference in New Issue
Block a user