Beep6581 / RawTherapee

A powerful cross-platform raw photo processing program
https://rawtherapee.com
GNU General Public License v3.0
2.79k stars 316 forks source link

Dev sets most batch options to ADD #4100

Closed Beep6581 closed 7 years ago

Beep6581 commented 7 years ago

I compiled into an empty build folder and deleted the cache and options file. The Batch Processing options in Preferences are mostly all set to ADD, except for:

They should all be SET.

I cancelled and examined the options file:

AdjusterBehavior=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;

I re-ran RT, went to Preferences again and hit OK,

AdjusterBehavior=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;0;0;0;0;0;0;

Six 0s but only 4 show up as "SET". Why?

This is a recurring issue: #2710, #2220, etc.

Beep6581 commented 7 years ago

This is also a quite serious problem as far as a usability is concerned since a clean installation starts "broken", so a v5.3 stopper.

Beep6581 commented 7 years ago

Another issue: the color of the radiobutton in the highlighted (selected) row is not visible as long as its selected. Theme needs fixing. imgur-2017_09_23-15 58 22

Beep6581 commented 7 years ago

6 new 0s:

  1. sharpening radius
  2. sharpening damping
  3. sharpening iterations
  4. ?
  5. ?
  6. resize scale
Beep6581 commented 7 years ago
diff --git a/rtgui/options.cc b/rtgui/options.cc
index 38be5193..26cdef36 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -623,6 +623,12 @@ void Options::setDefaults ()
         1, // ADDSET_RETI_GAM
         1, // ADDSET_RETI_SLO
         1, // ADDSET_WB_TEMPBIAS
+        1, // ADDSET_SHARP_RADIUS
+        1, // ADDSET_SHARP_DAMPING
+        1, // ADDSET_SHARP_ITER
+        1, // ADDSET_SHARP_EDGETOL
+        1, // ADDSET_SHARP_HALOCTRL
+        1  // ADDSET_RESIZE_SCALE
     };

     rtSettings.darkFramesPath = "";

Is there a more permanent solution? Failure to compile or crash on start would be best.

Beep6581 commented 7 years ago

With the above patch, when I delete my options file and run RT and close it and grep for AdjusterBehavior I get:

AdjusterBehavior=1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;

Then I run RT again, click "All to Set", ok, close RT, grep:

AdjusterBehavior=0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;1;1;0;

Three entries are still at 1! But in Preferences everything is visually on "Set", so we're not seeing three settings.

heckflosse commented 7 years ago

@Beep6581 Please try this patch for the setdefaults method

diff --git a/rtgui/options.cc b/rtgui/options.cc
index 38be5193..b7101f36 100644
--- a/rtgui/options.cc
+++ b/rtgui/options.cc
@@ -511,119 +511,8 @@ void Options::setDefaults ()
 #endif

     // Reminder: 0 = SET mode, 1 = ADD mode
-    baBehav = {
-        1, // ADDSET_TC_EXPCOMP
-        1, // ADDSET_TC_BRIGHTNESS
-        1, // ADDSET_TC_BLACKLEVEL
-        1, // ADDSET_TC_CONTRAST
-        1, // ADDSET_SH_HIGHLIGHTS
-        1, // ADDSET_SH_SHADOWS
-        1, // ADDSET_SH_LOCALCONTRAST
-        1, // ADDSET_LC_BRIGHTNESS
-        1, // ADDSET_LC_CONTRAST
-        1, // ADDSET_SHARP_AMOUNT
-        1, // ADDSET_WB_TEMPERATURE
-        1, // ADDSET_WB_GREEN
-        1, // ADDSET_ROTATE_DEGREE
-        1, // ADDSET_DIST_AMOUNT
-        1, // ADDSET_PERSPECTIVE
-        1, // ADDSET_CA
-        1, // ADDSET_VIGN_AMOUNT
-        1, // ADDSET_VIGN_RADIUS
-        1, // ADDSET_VIGN_STRENGTH
-        1, // ADDSET_VIGN_CENTER
-        1, // ADDSET_LC_CHROMATICITY
-        1, // ADDSET_TC_SATURATION
-        1, // ADDSET_TC_HLCOMPAMOUNT
-        1, // ADDSET_TC_HLCOMPTHRESH
-        1, // ADDSET_TC_SHCOMP
-        1, // ADDSET_DIRPYREQ
-        1, // ADDSET_DIRPYRDN_LUMA
-        1, // ADDSET_DIRPYRDN_LUDET
-        1, // ADDSET_DIRPYRDN_CHROMA
-        1, // ADDSET_DIRPYRDN_CHROMARED
-        1, // ADDSET_DIRPYRDN_CHROMABLUE
-        1, // ADDSET_DIRPYRDN_GAMMA
-        1, // ADDSET_CHMIXER
-        1, // ADDSET_PREPROCESS_GREENEQUIL
-        1, // ADDSET_PREPROCESS_LINEDENOISE
-        1, // ADDSET_RAWCACORR
-        1, // ADDSET_RAWEXPOS_LINEAR
-        1, // ADDSET_RAWEXPOS_PRESER
-        1, // ADDSET_RAWEXPOS_BLACKS
-        1, // ADDSET_SHARPENEDGE_AMOUNT
-        1, // ADDSET_SHARPENMICRO_AMOUNT
-        1, // ADDSET_SHARPENEDGE_PASS
-        1, // ADDSET_SHARPENMICRO_UNIFORMITY
-        1, // ADDSET_VIBRANCE_PASTELS
-        1, // ADDSET_VIBRANCE_SATURATED
-        1, // ADDSET_FREE_OUPUT_GAMMA
-        1, // ADDSET_FREE_OUTPUT_SLOPE
-        1, // ADDSET_CAT_DEGREE
-        1, // ADDSET_CAT_ADAPSCEN
-        1, // ADDSET_CAT_ADAPLUM
-        1, // ADDSET_CAT_LIGHT
-        1, // ADDSET_CAT_RSTPRO
-        1, // ADDSET_CAT_BADPIX
-        1, // ADDSET_CAT_JLIGHT
-        1, // ADDSET_CAT_CHROMA
-        1, // ADDSET_CAT_CONTRAST
-        1, // ADDSET_CAT_CHROMA_S
-        1, // ADDSET_CAT_CHROMA_M
-        1, // ADDSET_CAT_HUE
-        1, // ADDSET_CAT_BADPIX
-        1, // ADDSET_WB_EQUAL
-        1, // ADDSET_GRADIENT_DEGREE
-        1, // ADDSET_GRADIENT_FEATHER
-        1, // ADDSET_GRADIENT_STRENGTH
-        1, // ADDSET_GRADIENT_CENTER
-        1, // ADDSET_PCVIGNETTE_STRENGTH
-        1, // ADDSET_PCVIGNETTE_FEATHER
-        1, // ADDSET_PCVIGNETTE_ROUNDNESS
-        1, // ADDSET_BLACKWHITE_HUES
-        1, // ADDSET_BLACKWHITE_GAMMA
-        1, // ADDSET_DIRPYREQ_THRESHOLD
-        1, // ADDSET_DIRPYREQ_SKINPROTECT
-        1, // ADDSET_COLORTONING_SPLIT
-        1, // ADDSET_COLORTONING_SATTHRESHOLD
-        1, // ADDSET_COLORTONING_SATOPACITY
-        1, // ADDSET_COLORTONING_BALANCE
-        1, // ADDSET_COLORTONING_STRENGTH
-        1, // ADDSET_DIRPYRDN_PASSES
-        1, // ADDSET_RAWFFCLIPCONTROL
-        1, // ADDSET_FILMSIMULATION_STRENGTH
-        1, // ADDSET_WA
-        1, // ADDSET_WA_SKINPROTECT
-        1, // ADDSET_WA_THRESHOLD2
-        1, // ADDSET_WA_THRR
-        1, // ADDSET_WA_THRRH
-        1, // ADDSET_WA_THRESHOLD
-        1, // ADDSET_WA_THRESHOLD2
-        1, // ADDSET_WA_CHRO
-        1, // ADDSET_WA_CHROMA
-        1, // ADDSET_WA_CONTRAST
-        1, // ADDSET_WA_RESCON
-        1, // ADDSET_WA_RESCONH
-        1, // ADDSET_WA_RESCHRO
-        1, // ADDSET_WA_SKYPROTECT
-        1, // ADDSET_WA_EDGRAD
-        1, // ADDSET_WA_EDGVAL
-        1, // ADDSET_WA_STRENGTH
-        1, // ADDSET_WA_EDGEDETECT
-        1, // ADDSET_WA_EDGEDETECTTHR
-        1, // ADDSET_WA_EDGEDETECTTHR2
-        1, // ADDSET_WA_TMRS
-        1, // ADDSET_WA_GAMMA
-        1, // ADDSET_RETI_STR
-        1, // ADDSET_RETI_NEIGH
-        1, // ADDSET_RETI_LIMD
-        1, // ADDSET_RETI_GAIN
-        1, // ADDSET_RETI_OFFS
-        1, // ADDSET_RETI_VART
-        1, // ADDSET_RETI_GAM
-        1, // ADDSET_RETI_SLO
-        1, // ADDSET_WB_TEMPBIAS
-    };
+    baBehav.clear();
+    baBehav.resize(ADDSET_PARAM_NUM, 1);

     rtSettings.darkFramesPath = "";
     rtSettings.flatFieldsPath = "";
Beep6581 commented 7 years ago

Branch fixaddset hopefully fixes this issue. One thing I'm uncertain about is whether ADDSET_WA, should be deleted or not from rtgui/addsetids.h, but I'm out of time for today. If anyone feels like testing that and committing, +1

heckflosse commented 7 years ago

@Beep6581 I will take a look later in the evening

heckflosse commented 7 years ago

@Beep6581 I don't understand why you removed ADDSET_WA

heckflosse commented 7 years ago

@Beep6581 scratch my last comment

heckflosse commented 7 years ago

@Beep6581 In 31af093 I made some minor changes. Please test.

Beep6581 commented 7 years ago

I found what looks like a GTK+ bug. Open Preferences > Batch Processing, flip the settings by clicking either "All to Set" or "All to Add", then scroll down (or up). The first two radiobuttons which appear when you scroll have the wrong option selected, but this is only a graphical glitch. If you scroll them out of view and scroll them back into view, they are correct. Screencast: https://filebin.net/674g6ne1pmosj94c/rt_4100.mp4

Beep6581 commented 7 years ago

@heckflosse thank you, fix confirmed, merged.

Beep6581 commented 7 years ago

I opened an issue for the treeview radiobutton bug: https://bugzilla.gnome.org/show_bug.cgi?id=788105