[Bf-blender-cvs] [a98369e6a6a] greasepencil-object: GPencil: More tweaks to arc function

Antonio Vazquez noreply at git.blender.org
Mon Oct 14 17:07:21 CEST 2019


Commit: a98369e6a6a360cee150e8d271dfeaa5ac7ea649
Author: Antonio Vazquez
Date:   Mon Oct 14 17:07:02 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa98369e6a6a360cee150e8d271dfeaa5ac7ea649

GPencil: More tweaks to arc function

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

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 01778d74870..2d494ffeab6 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -744,7 +744,7 @@ static void gp_smooth_fake_segments(tGPsdata *p)
 static void gp_add_arc_segments(tGPsdata *p)
 {
   const int segments = 4;
-  const float minlen = 20.0f * 20.0f;
+  const float minlen_sq = 20.0f * 20.0f;
   bGPdata *gpd = p->gpd;
   // Brush *brush = p->brush;
   if (gpd->runtime.sbuffer_used < 3) {
@@ -764,7 +764,7 @@ static void gp_add_arc_segments(tGPsdata *p)
   float v_prev[2], v_cur[2], v_half[2];
   sub_v2_v2v2(v_cur, &pt_cur->x, &pt_prev->x);
   /* Do not add points to very short segments. */
-  if (len_squared_v2(v_cur) < minlen) {
+  if (len_squared_v2(v_cur) < minlen_sq) {
     return;
   }



More information about the Bf-blender-cvs mailing list