Fix T94620: GPencil AutoMerge does not work when Draw On Back is enabled
The problem was the stroke was added to head and the `prev` pointer was NULL. Now check if there is the list is empty`next`.
This commit is contained in:
parent
cd804fb2e9
commit
29c4c78a38
Notes:
blender-bot
2023-02-13 22:37:44 +01:00
Referenced by issue #94620, Grease Pencil AutoMerge does not work when Draw Strokes On Back is enabled Referenced by issue #93479, 3.0 Potential candidates for corrective releases
|
@ -1276,7 +1276,7 @@ static void gpencil_stroke_newfrombuffer(tGPsdata *p)
|
|||
|
||||
/* Join with existing strokes. */
|
||||
if (ts->gpencil_flags & GP_TOOL_FLAG_AUTOMERGE_STROKE) {
|
||||
if (gps->prev != NULL) {
|
||||
if ((gps->prev != NULL) || (gps->next != NULL)) {
|
||||
BKE_gpencil_stroke_boundingbox_calc(gps);
|
||||
float diff_mat[4][4], ctrl1[2], ctrl2[2];
|
||||
BKE_gpencil_layer_transform_matrix_get(depsgraph, p->ob, gpl, diff_mat);
|
||||
|
|
Loading…
Reference in New Issue