[Bf-blender-cvs] [22a478e5ee6] master: GPencil: Fix missing last point when sculpt in Multiframe

Antonio Vazquez noreply at git.blender.org
Sun Sep 22 13:16:10 CEST 2019


Commit: 22a478e5ee6cf5dfcc9dfe22d4d912868ce2c141
Author: Antonio Vazquez
Date:   Sun Sep 22 13:16:02 2019 +0200
Branches: master
https://developer.blender.org/rB22a478e5ee6cf5dfcc9dfe22d4d912868ce2c141

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.

===================================================================

M	source/blender/editors/gpencil/gpencil_brush.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list