Fix sculpt curve stroke paint
This commit is contained in:
parent
96bc69b117
commit
ff9e0b6781
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue