[Bf-blender-cvs] [8c82d4cbf61] blender-v3.4-release: Fix T102684: GPencil Crash when trying to sculpt with Dot Dash

Antonio Vazquez noreply at git.blender.org
Tue Nov 22 10:48:16 CET 2022


Commit: 8c82d4cbf61b78bb0a52148a15912b870ece9f47
Author: Antonio Vazquez
Date:   Tue Nov 22 10:47:58 2022 +0100
Branches: blender-v3.4-release
https://developer.blender.org/rB8c82d4cbf61b78bb0a52148a15912b870ece9f47

Fix T102684: GPencil Crash when trying to sculpt with Dot Dash

The problem was the original pointer was not set.

There is a technical limitation with dots of 1 point
because it cannot assign orig pointer.

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

M	source/blender/gpencil_modifiers/intern/MOD_gpencildash.c

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

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
index 68a4b39a21e..52b0eb79978 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencildash.c
@@ -146,6 +146,7 @@ static bool stroke_dash(const bGPDstroke *gps,
 
     bGPDstroke *stroke = BKE_gpencil_stroke_new(
         ds->mat_nr < 0 ? gps->mat_nr : ds->mat_nr, size, gps->thickness);
+    stroke->runtime.gps_orig = gps->runtime.gps_orig;
     if (ds->flag & GP_DASH_USE_CYCLIC) {
       stroke->flag |= GP_STROKE_CYCLIC;
     }
@@ -157,6 +158,9 @@ static bool stroke_dash(const bGPDstroke *gps,
       stroke->points[is].z = p->z;
       stroke->points[is].pressure = p->pressure * ds->radius;
       stroke->points[is].strength = p->strength * ds->opacity;
+      /* Assign original point pointers. */
+      stroke->points[is].runtime.idx_orig = p->runtime.idx_orig;
+      stroke->points[is].runtime.pt_orig = p->runtime.pt_orig;
       copy_v4_v4(stroke->points[is].vert_color, p->vert_color);
     }
     BLI_addtail(r_strokes, stroke);



More information about the Bf-blender-cvs mailing list