diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-12-30 18:41:20 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-12-30 18:42:25 +0300 |
commit | 03145616843e06ee215d9a06973a2655eb0d486a (patch) | |
tree | eb6959f567966030e78e776a015e23b40f426426 /source/blender/editors/sculpt_paint/paint_cursor.c | |
parent | 394b48029c5335381f774f83524ad6ee5cb986da (diff) |
Sculpt: Add color alpha controls to the brush cursor
Previously the alpha was hardcoded to 0.7. Now it is possible to control
the cursor alpha by changing the alpha color of the cursor color
property. New alpha default is 0.9. This, with the new saturated colors,
should make the cursor more visible on highdpi screens.
I also removed the cache location preview as it is too visible right now
with the new alpha and color values.
Reviewed By: billreynish
Differential Revision: https://developer.blender.org/D6433
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_cursor.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_cursor.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c index 856072ec47a..9021666c001 100644 --- a/source/blender/editors/sculpt_paint/paint_cursor.c +++ b/source/blender/editors/sculpt_paint/paint_cursor.c @@ -1329,7 +1329,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) /* set various defaults */ const float *outline_col = brush->add_col; - const float outline_alpha = 0.7f; + const float outline_alpha = brush->add_col[3]; float translation[2] = {x, y}; float final_radius = (BKE_brush_size_get(scene, brush) * zoomx); @@ -1547,16 +1547,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused)) } else { if (vc.obact->sculpt->cache && !vc.obact->sculpt->cache->first_time) { - /* Draw cursor location preview when the stroke is active using the data from StrokeCache - */ - float cursor_location[3]; wmViewport(&ar->winrct); - copy_v3_v3(cursor_location, ss->cache->true_location); - if (ss->cache->brush->sculpt_tool == SCULPT_TOOL_GRAB) { - add_v3_v3(cursor_location, ss->cache->grab_delta); - } - cursor_draw_point_with_symmetry( - pos, ar, cursor_location, sd, vc.obact, ss->cache->radius); /* Draw cached dynamic mesh preview lines */ if (brush->sculpt_tool == SCULPT_TOOL_GRAB && (brush->flag & BRUSH_GRAB_ACTIVE_VERTEX) && |