[Bf-blender-cvs] [fce610eeedc] greasepencil-object: WIP: First test for smooth thickness
Antonio Vazquez
noreply at git.blender.org
Fri Nov 10 20:12:25 CET 2017
Commit: fce610eeedc663badb52d310ab8410d6ebfb2a22
Author: Antonio Vazquez
Date: Fri Nov 10 20:08:51 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rBfce610eeedc663badb52d310ab8410d6ebfb2a22
WIP: First test for smooth thickness
===================================================================
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 8d74748f447..ab7e8d0ea05 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -585,6 +585,12 @@ static void gp_smooth_buffer_point(bGPdata *gpd, bGPDbrush *brush)
gpd->sbuffer_size--;
}
+ /* smooth the thickness 20%-60%-20% */
+ float press = pt->pressure * 0.25f;
+ press += pta->pressure * 0.25f;
+ press += ptb->pressure * 0.60f;
+ interpf(ptb->pressure, ptb->pressure, press, 0.5f);
+
return;
}
More information about the Bf-blender-cvs
mailing list