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.
This commit is contained in:
Antonio Vazquez
2019-09-22 13:16:02 +02:00
parent b3aa8f0fad
commit 22a478e5ee

View File

@@ -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;