Added new "Preprocess WB" parameter in the Raw toolpanel, just below "Raw White Points" tool. Allows to choose between "Camera" and "Auto" (average-based) raw channel multipliers, and to apply custom compesation factors.

Fixes #5616
This commit is contained in:
rom9
2020-02-24 21:00:51 +01:00
parent 12b1d8f767
commit d4fc4dc083
13 changed files with 361 additions and 17 deletions

View File

@@ -138,6 +138,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
filmNegative = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_FILMNEGATIVE")) );
//---
captureSharpening = Gtk::manage (new Gtk::CheckButton (M("TP_PDSHARPENING_LABEL")) );
//---
raw_preprocwb = Gtk::manage (new Gtk::CheckButton (M("PARTIALPASTE_PREPROCWB")));
Gtk::VBox* vboxes[8];
Gtk::HSeparator* hseps[8];
@@ -240,6 +242,7 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0);
vboxes[7]->pack_start (*raw_expos, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*raw_black, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*raw_preprocwb, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*Gtk::manage (new Gtk::HSeparator ()), Gtk::PACK_SHRINK, 0);
vboxes[7]->pack_start (*df_file, Gtk::PACK_SHRINK, 2);
vboxes[7]->pack_start (*df_AutoSelect, Gtk::PACK_SHRINK, 2);
@@ -407,6 +410,8 @@ PartialPasteDlg::PartialPasteDlg (const Glib::ustring &title, Gtk::Window* paren
filmNegativeConn = filmNegative->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
//---
captureSharpeningConn = captureSharpening->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
//---
raw_preprocwbConn = raw_preprocwb->signal_toggled().connect (sigc::bind (sigc::mem_fun(*raw, &Gtk::CheckButton::set_inconsistent), true));
add_button (M("GENERAL_OK"), Gtk::RESPONSE_OK);
add_button (M("GENERAL_CANCEL"), Gtk::RESPONSE_CANCEL);
@@ -480,6 +485,7 @@ void PartialPasteDlg::rawToggled ()
ConnectionBlocker raw_ca_avoid_colourshiftBlocker(raw_ca_avoid_colourshiftconn);
ConnectionBlocker filmNegativeBlocker(filmNegativeConn);
ConnectionBlocker captureSharpeningBlocker(captureSharpeningConn);
ConnectionBlocker raw_preprocwbBlocker(raw_preprocwbConn);
raw->set_inconsistent (false);
@@ -510,6 +516,7 @@ void PartialPasteDlg::rawToggled ()
raw_ca_avoid_colourshift->set_active (raw->get_active ());
filmNegative->set_active (raw->get_active());
captureSharpening->set_active (raw->get_active());
raw_preprocwb->set_active (raw->get_active());
}
void PartialPasteDlg::basicToggled ()
@@ -999,6 +1006,12 @@ void PartialPasteDlg::applyPaste (rtengine::procparams::ProcParams* dstPP, Param
filterPE.pdsharpening.deconvitercheck = falsePE.pdsharpening.deconvitercheck;
}
if (!raw_preprocwb->get_active ()) {
filterPE.raw.preprocessWB.mode = falsePE.raw.preprocessWB.mode;
filterPE.raw.preprocessWB.red = falsePE.raw.preprocessWB.red;
filterPE.raw.preprocessWB.blue = falsePE.raw.preprocessWB.blue;
}
if (dstPE) {
*dstPE = filterPE;
}