[Bf-blender-cvs] [bc99d6246ce] greasepencil-object: Missing in previous active smooth commit

Antonio Vazquez noreply at git.blender.org
Wed Mar 7 19:10:51 CET 2018


Commit: bc99d6246ceb0f3f8ea7fe0ba6f3eabfea07c36f
Author: Antonio Vazquez
Date:   Wed Mar 7 19:10:40 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rBbc99d6246ceb0f3f8ea7fe0ba6f3eabfea07c36f

Missing in previous active smooth commit

The parameter must be used when call smooth function.

Fix error in values too.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index eecc381b538..8d8182fd486 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -503,7 +503,7 @@ static void gp_smooth_buffer(tGPsdata *p, float inf)
 	short num_points = gpd->sbuffer_size;
 
 	/* Do nothing if not enough points to smooth out */
-	if ((num_points < 3) && (inf > 0.0f)) {
+	if ((num_points < 3) || (inf == 0.0f)) {
 		return;
 	}
 
@@ -710,7 +710,7 @@ static short gp_stroke_addpoint(
 		gpd->sbuffer_size++;
 
 		/* smooth while drawing previous point */
-		gp_smooth_buffer(p, 0.8f);
+		gp_smooth_buffer(p, brush->active_smooth);
 
 		/* check if another operation can still occur */
 		if (gpd->sbuffer_size == GP_STROKE_BUFFER_MAX)



More information about the Bf-blender-cvs mailing list