diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 03:37:47 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-01-17 03:37:47 +0400 |
commit | 6891c57e4c4b2389bd496b9b2af4404447cc840f (patch) | |
tree | af8454b47ef60d7a539d526dc8b127bbf6c735de /source/blender/editors/sculpt_paint | |
parent | 93b58752d2795f870ddd2078db21c6cbe38e5b70 (diff) |
change to own commit r53852. use existing pressure member of UnifiedPaintSettings.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index ec8d60ce62a..c92640c3ced 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -597,15 +597,11 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) glTranslatef(translation[0], translation[1], 0); /* draw an inner brush */ - if (BKE_brush_use_size_pressure(scene, brush)) { - const wmWindow *win = CTX_wm_window(C); - const float pressure = WM_cursor_pressure(win); - if (pressure != -1.0f && pressure != 0.0f) { - /* inner at full alpha */ - glutil_draw_lined_arc(0.0, M_PI * 2.0, final_radius * pressure, 40); - /* outer at half alpha */ - glColor4f(outline_col[0], outline_col[1], outline_col[2], outline_alpha * 0.5f); - } + if (ups->draw_pressure) { + /* inner at full alpha */ + glutil_draw_lined_arc(0.0, M_PI * 2.0, final_radius * ups->pressure_value, 40); + /* outer at half alpha */ + glColor4f(outline_col[0], outline_col[1], outline_col[2], outline_alpha * 0.5f); } glutil_draw_lined_arc(0.0, M_PI * 2.0, final_radius, 40); glTranslatef(-translation[0], -translation[1], 0); |