[Bf-blender-cvs] [bab6ede2868] master: Fix (unreported) (2d) paint cursor always drawing in half alpha

Philipp Oeser noreply at git.blender.org
Thu Sep 26 14:24:03 CEST 2019


Commit: bab6ede28687ff0b6f3cf579652224c7fdd79596
Author: Philipp Oeser
Date:   Thu Sep 26 14:17:25 2019 +0200
Branches: master
https://developer.blender.org/rBbab6ede28687ff0b6f3cf579652224c7fdd79596

Fix (unreported) (2d) paint cursor always drawing in half alpha

Own mistake in rB078fcc62534c (should only switch to half alpha if we
draw the second pressure circle as well...)

===================================================================

M	source/blender/editors/sculpt_paint/paint_cursor.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index a90f9d344a7..e30e1c7df72 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1297,9 +1297,9 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
     if (ups->stroke_active && BKE_brush_use_size_pressure(scene, brush)) {
       imm_draw_circle_wire_2d(
           pos, translation[0], translation[1], final_radius * ups->size_pressure_value, 40);
+      /* outer at half alpha */
+      immUniformColor3fvAlpha(outline_col, outline_alpha * 0.5f);
     }
-    /* outer at half alpha */
-    immUniformColor3fvAlpha(outline_col, outline_alpha * 0.5f);
 
     GPU_line_width(1.0f);
     imm_draw_circle_wire_2d(pos, translation[0], translation[1], final_radius, 40);



More information about the Bf-blender-cvs mailing list