[Bf-blender-cvs] [019365698a5] greasepencil-object: More tweaks to samples algorithm

Antonio Vazquez noreply at git.blender.org
Tue Feb 27 17:13:05 CET 2018


Commit: 019365698a50f3a09d10d0404ed44c4c588ba6e6
Author: Antonio Vazquez
Date:   Tue Feb 27 17:12:56 2018 +0100
Branches: greasepencil-object
https://developer.blender.org/rB019365698a50f3a09d10d0404ed44c4c588ba6e6

More tweaks to samples algorithm

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

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 d2b43bcc5e0..e22762827ee 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -2659,7 +2659,7 @@ static void gpencil_add_missing_events(bContext *C, wmOperator *op, const wmEven
 	b[1] = event->mval[1] + 1;
 	float dist = len_v2v2(a, b);
 	if (dist >= factor) {
-		int slices = 1 + (int)((dist - 1.0) / factor);
+		int slices = 2 + (int)((dist - 1.0) / factor);
 		float n = 1.0f / slices;
 		for (int i = 1; i < slices; i++) {
 			interp_v2_v2v2(pt, a, b, n * i);



More information about the Bf-blender-cvs mailing list