[Bf-blender-cvs] [004913dd957] master: Fix T99381: GPencil Unable to Sculpt last point using Subdivide Modifier
Antonio Vazquez
noreply at git.blender.org
Mon Jul 4 10:58:57 CEST 2022
Commit: 004913dd957b641eb1b283b469838220406d0787
Author: Antonio Vazquez
Date: Mon Jul 4 10:58:42 2022 +0200
Branches: master
https://developer.blender.org/rB004913dd957b641eb1b283b469838220406d0787
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.
===================================================================
M source/blender/editors/gpencil/gpencil_sculpt_paint.c
===================================================================
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;
More information about the Bf-blender-cvs
mailing list