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:
authorAntonio Vazquez <blendergit@gmail.com>2019-09-22 14:16:02 +0300
committerAntonio Vazquez <blendergit@gmail.com>2019-09-22 14:16:02 +0300
commit22a478e5ee6cf5dfcc9dfe22d4d912868ce2c141 (patch)
tree23f30ea218ee36e5e9a7f4d7b32c7cda9bba903e
parentb3aa8f0fad72f6197d82ee359e78d5e8f066eaf0 (diff)
GPencil: Fix missing last point when sculpt in Multiframe
This was a mistake when fixed the problem with multiframe sculpt. I missed change the index and use active point in the check.
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index 7c9a04bef65..0f76d1421cf 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1666,8 +1666,8 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso,
if (i + 1 == gps->totpoints - 1) {
pt = &gps->points[i + 1];
pt_active = (!is_multiedit) ? pt->runtime.pt_orig : pt;
- index = (!is_multiedit) ? pt->runtime.idx_orig : i;
- if (pt->runtime.pt_orig != NULL) {
+ index = (!is_multiedit) ? pt->runtime.idx_orig : i + 1;
+ if (pt_active != NULL) {
rot_eval = gpsculpt_rotation_eval_get(gso, gps, pt, i + 1);
ok |= apply(gso, gps_active, rot_eval, index, radius, pc2);
include_last = false;
@@ -1688,7 +1688,7 @@ static bool gpsculpt_brush_do_stroke(tGP_BrushEditData *gso,
pt = &gps->points[i];
pt_active = (!is_multiedit) ? pt->runtime.pt_orig : pt;
index = (!is_multiedit) ? pt->runtime.idx_orig : i;
- if (pt->runtime.pt_orig != NULL) {
+ if (pt_active != NULL) {
rot_eval = gpsculpt_rotation_eval_get(gso, gps, pt, i);
changed |= apply(gso, gps_active, rot_eval, index, radius, pc1);
include_last = false;