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:
authorJoshua Leung <aligorith@gmail.com>2016-03-16 15:12:30 +0300
committerJoshua Leung <aligorith@gmail.com>2016-03-16 15:12:30 +0300
commit23e608b6fbdfa9b5dce18803527a9cb92f3ed5b6 (patch)
tree7f2c197355b99b58bf06c49ca70295bc7300adfb /source/blender/editors/gpencil
parent386872b98b548fcd9cb753ec8d5f2e07136e4dda (diff)
Fix T47818: GPencil Sculpt Brush settings update when adjusted using scrollwheel while sculpting
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 5360f07fed7..95314445045 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1537,6 +1537,7 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
tGP_BrushEditData *gso = op->customdata;
const bool is_modal = RNA_boolean_get(op->ptr, "wait_for_input");
bool redraw_region = false;
+ bool redraw_toolsettings = false;
/* The operator can be in 2 states: Painting and Idling */
if (gso->is_painting) {
@@ -1575,8 +1576,9 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
gso->brush->size += 3;
CLAMP_MAX(gso->brush->size, 300);
}
-
+
redraw_region = true;
+ redraw_toolsettings = true;
break;
case WHEELDOWNMOUSE:
@@ -1591,8 +1593,9 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
gso->brush->size -= 3;
CLAMP_MIN(gso->brush->size, 1);
}
-
+
redraw_region = true;
+ redraw_toolsettings = true;
break;
/* Painting mbut release = Stop painting (back to idle) */
@@ -1664,8 +1667,9 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
gso->brush->size += 3;
CLAMP_MAX(gso->brush->size, 300);
}
-
+
redraw_region = true;
+ redraw_toolsettings = true;
break;
case WHEELDOWNMOUSE:
@@ -1680,8 +1684,9 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
gso->brush->size -= 3;
CLAMP_MIN(gso->brush->size, 1);
}
-
+
redraw_region = true;
+ redraw_toolsettings = true;
break;
/* Change Frame - Allowed */
@@ -1703,6 +1708,11 @@ static int gpsculpt_brush_modal(bContext *C, wmOperator *op, const wmEvent *even
ED_region_tag_redraw(ar);
}
+ /* Redraw toolsettings (brush settings)? */
+ if (redraw_toolsettings) {
+ WM_event_add_notifier(C, NC_SCENE | ND_TOOLSETTINGS, NULL);
+ }
+
return OPERATOR_RUNNING_MODAL;
}