[Bf-blender-cvs] [934db6a8201] master: Fix T94409: GPencil smooth stroke thickness operator weird result

Antonio Vazquez noreply at git.blender.org
Mon Jan 10 12:23:57 CET 2022


Commit: 934db6a8201afe9b137ff41a3bf3f1da6b32ca02
Author: Antonio Vazquez
Date:   Mon Jan 10 12:23:44 2022 +0100
Branches: master
https://developer.blender.org/rB934db6a8201afe9b137ff41a3bf3f1da6b32ca02

Fix T94409: GPencil smooth stroke thickness operator weird result

The smooth was not working "smoothly" and any change in the factor produced a weird result.

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

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

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

diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 2a656ac3aad..e71a56894d0 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -3956,8 +3956,8 @@ static void gpencil_smooth_stroke(bContext *C, wmOperator *op)
           }
           if (smooth_thickness) {
             /* thickness need to repeat process several times */
-            for (int r2 = 0; r2 < 20; r2++) {
-              BKE_gpencil_stroke_smooth_thickness(gps, i, factor);
+            for (int r2 = 0; r2 < repeat * 2; r2++) {
+              BKE_gpencil_stroke_smooth_thickness(gps, i, 1.0f - factor);
             }
           }
           if (smooth_uv) {



More information about the Bf-blender-cvs mailing list