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:
authorDalai Felinto <dfelinto@gmail.com>2018-10-17 03:36:22 +0300
committerDalai Felinto <dfelinto@gmail.com>2018-10-17 03:41:29 +0300
commitff9e0b67812afcfd4d2843dfa0d8ff0cb496a2de (patch)
treebfb99832fb8276cafd8c5e706ce07f583a5f4c0d /source/blender
parent96bc69b117539b3446360812b1c92e96c575b70f (diff)
Fix sculpt curve stroke paint
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c8
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;
}