[Bf-blender-cvs] [17fd81fb9be] blender-v3.3-release: Fix T102684: GPencil Crash when trying to sculpt with Dot Dash

Antonio Vazquez noreply at git.blender.org
Thu Jan 12 15:31:55 CET 2023


Commit: 17fd81fb9be6a3705f161a79427dd6754f949a97
Author: Antonio Vazquez
Date:   Tue Nov 22 10:47:58 2022 +0100
Branches: blender-v3.3-release
https://developer.blender.org/rB17fd81fb9be6a3705f161a79427dd6754f949a97

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 5033e67d52e..119665ebbef 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