[Bf-blender-cvs] [601041794a4] greasepencil-object: GPencil: Don't apply smooth to position for guides

Antonio Vazquez noreply at git.blender.org
Wed Oct 16 18:34:09 CEST 2019


Commit: 601041794a4e7a1c5dfd2fbc79eabfecb9d428ac
Author: Antonio Vazquez
Date:   Wed Oct 16 18:33:59 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB601041794a4e7a1c5dfd2fbc79eabfecb9d428ac

GPencil: Don't apply smooth to position for guides

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

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 85eb606b92f..d4904c5de3f 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -579,6 +579,7 @@ static void gp_brush_angle(bGPdata *gpd, Brush *brush, tGPspoint *pt, const floa
 static void gp_smooth_buffer(tGPsdata *p, float inf, int idx)
 {
   bGPdata *gpd = p->gpd;
+  GP_Sculpt_Guide *guide = &p->scene->toolsettings->gp_sculpt.guide;
   const short num_points = gpd->runtime.sbuffer_used;
 
   /* Do nothing if not enough points to smooth out */
@@ -626,9 +627,12 @@ static void gp_smooth_buffer(tGPsdata *p, float inf, int idx)
     strength += ptd->strength * average_fac;
   }
 
-  /* Based on influence factor, blend between original and optimal smoothed coordinate. */
-  interp_v2_v2v2(c, c, sco, inf);
-  copy_v2_v2(&ptc->x, c);
+  /* Based on influence factor, blend between original and optimal smoothed coordinate but not
+   * for Guide mode. */
+  if (!guide->use_guide) {
+    interp_v2_v2v2(c, c, sco, inf);
+    copy_v2_v2(&ptc->x, c);
+  }
   /* Interpolate pressure. */
   ptc->pressure = interpf(ptc->pressure, pressure, inf);
   /* Interpolate strength. */



More information about the Bf-blender-cvs mailing list