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:
authorCampbell Barton <ideasman42@gmail.com>2013-01-17 03:37:47 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-01-17 03:37:47 +0400
commit6891c57e4c4b2389bd496b9b2af4404447cc840f (patch)
treeaf8454b47ef60d7a539d526dc8b127bbf6c735de /source/blender/editors/sculpt_paint
parent93b58752d2795f870ddd2078db21c6cbe38e5b70 (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.c14
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);