[Bf-blender-cvs] [203fcf70141] greasepencil-object: GPencil: Fix strength error in Tint Tool

Antonio Vazquez noreply at git.blender.org
Wed Nov 6 16:18:51 CET 2019


Commit: 203fcf70141bda757fd6ae9ac1e4d73bfeae706c
Author: Antonio Vazquez
Date:   Wed Nov 6 16:18:38 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rB203fcf70141bda757fd6ae9ac1e4d73bfeae706c

GPencil: Fix strength error in Tint Tool

The value must not be clamped.

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

M	source/blender/editors/gpencil/gpencil_tint.c

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

diff --git a/source/blender/editors/gpencil/gpencil_tint.c b/source/blender/editors/gpencil/gpencil_tint.c
index 18ccede4d12..9a1b1b2dec0 100644
--- a/source/blender/editors/gpencil/gpencil_tint.c
+++ b/source/blender/editors/gpencil/gpencil_tint.c
@@ -240,8 +240,9 @@ static bool brush_tint_apply(tGP_BrushTintData *gso,
   Brush *brush = gso->brush;
 
   /* Attenuate factor to get a smoother tinting. */
-  float inf = brush_influence_calc(gso, radius, co) / 100.0f;
-  float inf_fill = gso->pressure / 1000.0f;
+  float inf = (brush_influence_calc(gso, radius, co) * brush->gpencil_settings->draw_strength) /
+              100.0f;
+  float inf_fill = (gso->pressure * brush->gpencil_settings->draw_strength) / 1000.0f;
 
   bGPDspoint *pt = &gps->points[pt_index];
 
@@ -255,9 +256,6 @@ static bool brush_tint_apply(tGP_BrushTintData *gso,
   else {
     alpha += inf;
     alpha_fill += inf_fill;
-    /* Limit max strength target. */
-    CLAMP_MAX(alpha, brush->gpencil_settings->draw_strength);
-    CLAMP_MAX(alpha_fill, brush->gpencil_settings->draw_strength);
   }
 
   /* Apply color to Stroke point. */



More information about the Bf-blender-cvs mailing list