diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2018-10-17 03:36:22 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2018-10-17 03:41:29 +0300 |
commit | ff9e0b67812afcfd4d2843dfa0d8ff0cb496a2de (patch) | |
tree | bfb99832fb8276cafd8c5e706ce07f583a5f4c0d /source/blender | |
parent | 96bc69b117539b3446360812b1c92e96c575b70f (diff) |
Fix sculpt curve stroke paint
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 0ee55f0f062..7d94e63e2bc 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -922,8 +922,11 @@ BLI_INLINE void draw_bezier_handle_lines(unsigned int pos, float sel_col[4], Bez immEnd(); } -static void paint_draw_curve_cursor(Brush *brush) +static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc) { + GPU_matrix_push(); + GPU_matrix_translate_2f(vc->ar->winrct.xmin, vc->ar->winrct.ymin); + if (brush->paint_curve && brush->paint_curve->points) { int i; PaintCurve *pc = brush->paint_curve; @@ -990,6 +993,7 @@ static void paint_draw_curve_cursor(Brush *brush) immUnbindProgram(); } + GPU_matrix_pop(); } /* Special actions taken when paint cursor goes over mesh */ @@ -1060,7 +1064,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* skip everything and draw brush here */ if (brush->flag & BRUSH_CURVE) { - paint_draw_curve_cursor(brush); + paint_draw_curve_cursor(brush, &vc); return; } |