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.
This commit is contained in:
parent
77e66d630a
commit
17fd81fb9b
Notes:
blender-bot
2023-02-14 08:33:26 +01:00
Referenced by issue #100749, Blender LTS: Maintenance Task 3.3 Referenced by issue #102684, Grease Pencil: Crash when trying to sculpt on object with Dot Dash modifier
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue