[Bf-blender-cvs] [b0566422875] greasepencil-object: GPencil: Fix last missing point in active Subdivide

Antonio Vazquez noreply at git.blender.org
Mon Aug 19 10:28:10 CEST 2019


Commit: b05664228750bd65d9301d0d39cc726c83f05c93
Author: Antonio Vazquez
Date:   Mon Aug 19 10:28:00 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBb05664228750bd65d9301d0d39cc726c83f05c93

GPencil: Fix last missing point in active Subdivide

The last subdivision point was missing and there was a gap in the point distribution.

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

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 0e8d99cafdc..85b1f6cb2e8 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -647,7 +647,7 @@ static void gp_subdivide_buffer(tGPsdata *p, int step)
   pt_last->uv_rot = pt_cur->uv_fac;
 
   /* Interpolate points in the midle. */
-  float const ifactor = 1.0f / (float)(step + 1);
+  float const ifactor = 1.0f / (float)(step);
   for (int i = 0; i < step; i++) {
     pt_cur = ((tGPspoint *)(gpd->runtime.sbuffer) + idx + i);
     float f = ifactor * (i + 1);



More information about the Bf-blender-cvs mailing list