Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFalk David <falkdavid@gmx.de>2021-03-31 15:18:41 +0300
committerFalk David <falkdavid@gmx.de>2021-03-31 15:19:01 +0300
commit8d45a9678955694cdd44aa709b5175308821dbba (patch)
tree7c8ca9ea3ddfe4e054e3a38291583ba10521e02c /source/blender
parentf02e1a77c93c6fa55d557498da76f0f818418cca (diff)
Fix T87082: Smooth thickness not working
When using the smooth operator, the thickness would not be smoothed on the first iteration. This was becasue the inner loop was set to run `r * 20` times but `r` starts at 0. The fix makes sure that "Smooth Thickness" works on the first iteration by using a fixed value of `20` as the loop limit. This makes sure that for every iteration, we run the smoothing of the thickness 20 more times. Reviewed By: antoniov Maniphest Tasks: T87082 Differential Revision: https://developer.blender.org/D10867
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 99c9bfa3a56..66beb74d566 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -3951,7 +3951,7 @@ static void gpencil_smooth_stroke(bContext *C, wmOperator *op)
}
if (smooth_thickness) {
/* thickness need to repeat process several times */
- for (int r2 = 0; r2 < r * 20; r2++) {
+ for (int r2 = 0; r2 < 20; r2++) {
BKE_gpencil_stroke_smooth_thickness(gps, i, factor);
}
}