From 2ea7b02f2a05d2da3ad7b30692b03e81295e8ade Mon Sep 17 00:00:00 2001 From: Desmis Date: Sun, 17 Jan 2021 08:51:37 +0100 Subject: [PATCH] Local adjustments - GUI 'full image' - allows you to use the local adjustment tools on the whole image (#6063) * Init Full image auto mode * Add tooltip for full image * Change tootip * Added tooltip to Full image * Slighly change tooltip --- rtdata/languages/default | 3 ++- rtengine/iplocallab.cc | 2 ++ rtgui/controlspotpanel.cc | 47 ++++++++++++++++++++++++++++++++++++--- rtgui/locallab.cc | 16 +++++++++---- 4 files changed, 60 insertions(+), 8 deletions(-) diff --git a/rtdata/languages/default b/rtdata/languages/default index 5b7a358db..c0483e1ec 100644 --- a/rtdata/languages/default +++ b/rtdata/languages/default @@ -2632,9 +2632,10 @@ TP_LOCALLAB_EV_VIS_ALL;Show all TP_LOCALLAB_EXCLUF;Excluding TP_LOCALLAB_EXCLUF_TOOLTIP;‘Excluding’ mode prevents adjacent spots from influencing certain parts of the image. Adjusting ‘Scope’ will extend the range of colors.\n You can also add tools to an Excluding spot and use them in the same way as for a normal spot. TP_LOCALLAB_EXCLUTYPE;Spot method -TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Normal spot uses recursive data.\n\nExcluding spot reinitializes all local adjustment data.\nCan be used to totally or partially cancel a previous action or to carry out operations in Inverse mode +TP_LOCALLAB_EXCLUTYPE_TOOLTIP;Normal spot uses recursive data.\n\nExcluding spot reinitializes all local adjustment data.\nCan be used to totally or partially cancel a previous action or to carry out operations in Inverse mode.\n\n‘Full image’ allows you to use the local adjustment tools on the whole image.\n The RT Spot delimiters are set beyond the image preview boundaries.\n The transition is set to 100.\nNote, you may have to reposition the RT Spot slightly and adjust the Spot size to get the desired effect.\nPlease note: using Denoise or Wavelet or FFTW in full-image mode uses large amounts of memory and may cause the application to crash on lower capacity systems. TP_LOCALLAB_EXECLU;Excluding spot TP_LOCALLAB_EXNORM;Normal spot +TP_LOCALLAB_EXFULL;Full image TP_LOCALLAB_EXPCBDL_TOOLTIP;Can be used to remove marks on the sensor or lens by reducing the contrast on the appropriate detail level(s). TP_LOCALLAB_EXPCHROMA;Chroma compensation TP_LOCALLAB_EXPCHROMA_TOOLTIP;Use in association with ‘Exposure compensation f’ and ‘Contrast Attenuator f’ to avoid desaturating colors. diff --git a/rtengine/iplocallab.cc b/rtengine/iplocallab.cc index 820e8c352..306c5609e 100644 --- a/rtengine/iplocallab.cc +++ b/rtengine/iplocallab.cc @@ -945,6 +945,8 @@ static void calcLocalParams(int sp, int oW, int oH, const LocallabParams& locall lp.excmet = 0; } else if (locallab.spots.at(sp).spotMethod == "exc") { lp.excmet = 1; + } else if (locallab.spots.at(sp).spotMethod == "full") { + lp.excmet = 2; } if (locallab.spots.at(sp).merMethod == "mone") { diff --git a/rtgui/controlspotpanel.cc b/rtgui/controlspotpanel.cc index 9ed4c95ee..87f6985c7 100644 --- a/rtgui/controlspotpanel.cc +++ b/rtgui/controlspotpanel.cc @@ -223,6 +223,7 @@ ControlSpotPanel::ControlSpotPanel(): spotMethod_->append(M("TP_LOCALLAB_EXNORM")); spotMethod_->append(M("TP_LOCALLAB_EXECLU")); + spotMethod_->append(M("TP_LOCALLAB_EXFULL")); spotMethod_->set_active(0); spotMethodconn_ = spotMethod_->signal_changed().connect( sigc::mem_fun( @@ -942,7 +943,6 @@ void ControlSpotPanel::prevMethodChanged() void ControlSpotPanel::spotMethodChanged() { - // printf("spotMethodChanged\n"); // Get selected control spot const auto s = treeview_->get_selection(); @@ -961,8 +961,47 @@ void ControlSpotPanel::spotMethodChanged() excluFrame->show(); } else if (spotMethod_->get_active_row_number() == 0) { // Normal case excluFrame->hide(); - } else { // Excluding case + locX_->setValue(150.); + adjusterChanged(locX_, 1.); + locXL_->setValue(150.); + adjusterChanged(locXL_, 1.); + locY_->setValue(150.); + adjusterChanged(locY_, 1.); + locYT_->setValue(150.); + adjusterChanged(locYT_, 1.); + shape_->set_active(0); + shapeChanged(); + transit_->setValue(60.); + adjusterChanged(transit_, 1.); + } else if (spotMethod_->get_active_row_number() == 1) { // Excluding case excluFrame->show(); + locX_->setValue(150.); + adjusterChanged(locX_, 1.); + locXL_->setValue(150.); + adjusterChanged(locXL_, 1.); + locY_->setValue(150.); + adjusterChanged(locY_, 1.); + locYT_->setValue(150.); + adjusterChanged(locYT_, 1.); + shape_->set_active(0); + shapeChanged(); + transit_->setValue(60.); + adjusterChanged(transit_, 1.); + } else if (spotMethod_->get_active_row_number() == 2) { // Full image case + excluFrame->hide(); + locX_->setValue(3000.); + adjusterChanged(locX_, 1.); + locXL_->setValue(3000.); + adjusterChanged(locXL_, 1.); + locY_->setValue(3000.); + adjusterChanged(locY_, 1.); + locYT_->setValue(3000.); + adjusterChanged(locYT_, 1.); + shape_->set_active(1); + shapeChanged(); + transit_->setValue(100.); + adjusterChanged(transit_, 1.); + } // Raise event @@ -1181,8 +1220,10 @@ void ControlSpotPanel::updateParamVisibility() excluFrame->show(); } else if (spotMethod_->get_active_row_number() == 0) { // Normal case excluFrame->hide(); - } else { // Excluding case + } else if (spotMethod_->get_active_row_number() == 1) { // Excluding case excluFrame->show(); + } else if (spotMethod_->get_active_row_number() == 2) {//full image + excluFrame->hide(); } /* diff --git a/rtgui/locallab.cc b/rtgui/locallab.cc index 886fbaf64..0ea5394bf 100644 --- a/rtgui/locallab.cc +++ b/rtgui/locallab.cc @@ -269,8 +269,10 @@ void Locallab::read(const rtengine::procparams::ProcParams* pp, const ParamsEdit if (pp->locallab.spots.at(i).spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if(pp->locallab.spots.at(i).spotMethod == "exc"){ r->spotMethod = 1; + } else if (pp->locallab.spots.at(i).spotMethod == "full"){ + r->spotMethod = 2; } r->sensiexclu = pp->locallab.spots.at(i).sensiexclu; @@ -426,8 +428,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (newSpot->spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if(newSpot->spotMethod == "exc") { r->spotMethod = 1; + } else if(newSpot->spotMethod == "full") { + r->spotMethod = 2; } r->sensiexclu = newSpot->sensiexclu; @@ -711,8 +715,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (newSpot->spotMethod == "norm") { r->spotMethod = 0; - } else { + } else if (newSpot->spotMethod == "exc") { r->spotMethod = 1; + } else if (newSpot->spotMethod == "full") { + r->spotMethod = 2; } r->sensiexclu = newSpot->sensiexclu; @@ -878,8 +884,10 @@ void Locallab::write(rtengine::procparams::ProcParams* pp, ParamsEdited* pedited if (r->spotMethod == 0) { pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "norm"; - } else { + } else if (r->spotMethod == 1){ pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "exc"; + } else if (r->spotMethod == 2) { + pp->locallab.spots.at(pp->locallab.selspot).spotMethod = "full"; } pp->locallab.spots.at(pp->locallab.selspot).sensiexclu = r->sensiexclu;