[Bf-blender-cvs] [fd8f51d] master: GPencil: Removed the restriction of not subdividing strokes further if it exceeds GP_STROKE_BUFFER_MAX

Joshua Leung noreply at git.blender.org
Sun Mar 27 16:22:55 CEST 2016


Commit: fd8f51da0854eb280689adc690b61051f7bdac51
Author: Joshua Leung
Date:   Mon Mar 28 03:05:01 2016 +1300
Branches: master
https://developer.blender.org/rBfd8f51da0854eb280689adc690b61051f7bdac51

GPencil: Removed the restriction of not subdividing strokes further if it exceeds GP_STROKE_BUFFER_MAX

Assuming that this subdivision + smoothing mostly only happens at the end of a stroke
anyway, enforcing this max-points limit in some cases was resulting in strokes that
weren't quite getting subdivided properly as the others.

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

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 ac94977..8bbc10b 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -616,12 +616,6 @@ static void gp_stroke_newfrombuffer(tGPsdata *p)
 	int new_totpoints = gps->totpoints;
 	
 	for (i = 0; i < sublevel; i++) {
-		/* Avoid error if subdivide is too big (assume totpoints is right) */
-		if (new_totpoints + (new_totpoints - 1) > GP_STROKE_BUFFER_MAX) {
-			/* Reduce sublevel to avoid too-dense strokes */
-			sublevel = i;
-			break;
-		}
 		new_totpoints += new_totpoints - 1;
 	}
 	gps->points = MEM_callocN(sizeof(bGPDspoint) * new_totpoints, "gp_stroke_points");




More information about the Bf-blender-cvs mailing list