Commit: 22925d0dd31e75feefde792da55a1fd1b77f53f2
Author: Antonio Vazquez
Date:   Sun Mar 15 19:22:33 2020 +0100
Branches: master
https://developer.blender.org/rB22925d0dd31e75feefde792da55a1fd1b77f53f2

GPencil: Remove Keep parameter from Select Vertex Color

Also changed range of threshold from 0 to 10

===================================================================

M       source/blender/editors/gpencil/gpencil_select.c

===================================================================

diff --git a/source/blender/editors/gpencil/gpencil_select.c 
b/source/blender/editors/gpencil/gpencil_select.c
index f479905f0d7..e5813611915 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -1661,7 +1661,7 @@ static void gpencil_selected_hue_table(bContext *C,
                                        const int threshold,
                                        GHash *hue_table)
 {
-  const float range = pow(10, 7 - threshold);
+  const float range = pow(10, 10 - threshold);
   float hsv[3];
 
   /* Extract all colors. */
@@ -1727,10 +1727,9 @@ static int gpencil_select_vertex_color_exec(bContext *C, 
wmOperator *op)
   Object *ob = CTX_data_active_object(C);
 
   const float threshold = RNA_int_get(op->ptr, "threshold");
-  const bool keep = RNA_boolean_get(op->ptr, "keep");
   const int selectmode = 
gpencil_select_mode_from_vertex(ts->gpencil_selectmode_vertex);
   bGPdata *gpd = (bGPdata *)ob->data;
-  const float range = pow(10, 7 - threshold);
+  const float range = pow(10, 10 - threshold);
 
   bool done = false;
 
@@ -1749,18 +1748,8 @@ static int gpencil_select_vertex_color_exec(bContext *C, 
wmOperator *op)
     bGPDspoint *pt;
     int i;
     bool gps_selected = false;
-    /* If clear unselect stroke. */
-    if (!keep) {
-      gps->flag &= ~GP_STROKE_SELECT;
-    }
-
     /* Check all stroke points. */
     for (i = 0, pt = gps->points; i < gps->totpoints; i++, pt++) {
-      /* Clear any previous point selected. */
-      if (!keep) {
-        pt->flag &= ~GP_SPOINT_SELECT;
-      }
-
       if (pt->vert_color[3] == 0.0f) {
         continue;
       }
@@ -1834,17 +1823,13 @@ void GPENCIL_OT_select_vertex_color(wmOperatorType *ot)
       "threshold",
       0,
       0,
-      6,
+      10,
       "Threshold",
       "Tolerance of the selection. Higher values select a wider range of 
similar colors",
       0,
-      6);
+      10);
   /* avoid re-using last var */
   RNA_def_property_flag(prop, PROP_SKIP_SAVE);
-
-  prop = RNA_def_boolean(
-      ot->srna, "keep", true, "Keep Previous Selection", "Keep any previous 
selection");
-  RNA_def_property_flag(prop, PROP_SKIP_SAVE);
 }
 
 /** \} */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to