diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-07-04 11:58:42 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-07-04 11:58:53 +0300 |
commit | 004913dd957b641eb1b283b469838220406d0787 (patch) | |
tree | 18caec876c6fcfc8a08fd2c288e92dd24de14daf /source/blender/editors/gpencil | |
parent | 3f5073a8e298c474fac36f7193d291e6f9579277 (diff) |
Fix T99381: GPencil Unable to Sculpt last point using Subdivide Modifier
The problem was the last point had the original point, but the previous one not, so the loop ends before checking last point.
The solution is avoid the loop exist if the function is checking the previous point before last one.
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_sculpt_paint.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_sculpt_paint.c b/source/blender/editors/gpencil/gpencil_sculpt_paint.c index b68240362c5..e27cd255217 100644 --- a/source/blender/editors/gpencil/gpencil_sculpt_paint.c +++ b/source/blender/editors/gpencil/gpencil_sculpt_paint.c @@ -1518,7 +1518,8 @@ static bool gpencil_sculpt_brush_do_stroke(tGP_BrushEditData *gso, /* To each point individually... */ pt = &gps->points[i]; - if ((pt->runtime.pt_orig == NULL) && (tool != GPSCULPT_TOOL_GRAB)) { + if ((i != gps->totpoints - 2) && (pt->runtime.pt_orig == NULL) && + (tool != GPSCULPT_TOOL_GRAB)) { continue; } pt_active = (pt->runtime.pt_orig) ? pt->runtime.pt_orig : pt; |