[Bf-blender-cvs] [0984218adb2] greasepencil-object: WIP: Add fixed simplify

Antonio Vazquez noreply at git.blender.org
Sat Dec 30 19:44:21 CET 2017


Commit: 0984218adb2a869999eeef5583a2b635adb03590
Author: Antonio Vazquez
Date:   Sat Dec 30 19:11:38 2017 +0100
Branches: greasepencil-object
https://developer.blender.org/rB0984218adb2a869999eeef5583a2b635adb03590

WIP: Add fixed simplify

The RDP simplify is not working fine, so the simple mode is used now.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c
index 4cb2c7aa629..24981127b29 100644
--- a/source/blender/editors/gpencil/gpencil_fill.c
+++ b/source/blender/editors/gpencil/gpencil_fill.c
@@ -602,11 +602,6 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
 		reduce += 0.25f;  // reduce the factor
 	}
 
-#if 0
-	/* simplify stroke using Ramer-Douglas-Peucker algorithm */
-	BKE_gpencil_simplify_stroke(tgpf->gpl, gps, 0.2f);
-#endif
-
 	/* if axis locked, reproject to plane locked */
 	if (tgpf->lock_axis > GP_LOCKAXIS_NONE) {
 		float origin[3];
@@ -623,6 +618,9 @@ static void gpencil_stroke_from_stack(tGPDfill *tgpf)
 		gp_apply_parent_point(tgpf->ob, tgpf->gpd, tgpf->gpl, pt);
 	}
 
+	/* simplify stroke */
+	BKE_gpencil_simplify_fixed(tgpf->gpl, gps);
+
 }
 
 /* ----------------------- */



More information about the Bf-blender-cvs mailing list