Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2020-03-15 21:22:33 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-03-15 21:22:33 +0300
commit22925d0dd31e75feefde792da55a1fd1b77f53f2 (patch)
tree280a5b750e0f6e86145ffa7a201c19aeb47cae66
parent8022fc322068687b7f8c2bcd7e65acf679912554 (diff)
GPencil: Remove Keep parameter from Select Vertex Color
Also changed range of threshold from 0 to 10
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c23
1 files changed, 4 insertions, 19 deletions
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);
}
/** \} */