Commit: 61293eed151704a0379e5faafd1f6f4ed8e4a82a
Author: Antonio Vazquez
Date:   Sun Sep 22 13:16:02 2019 +0200
Branches: temp-lanpr-cleanup
https://developer.blender.org/rB61293eed151704a0379e5faafd1f6f4ed8e4a82a

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;

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to