Commit: 1321be0af9f67b40f8c481ee6a9d42482215bbb5 Author: Antonio Vazquez Date: Fri Nov 29 16:27:19 2019 +0100 Branches: master https://developer.blender.org/rB1321be0af9f67b40f8c481ee6a9d42482215bbb5
GPencil: Fix error when interpolate sequence strokes with weights When the final stroke was smaller than original stroke, the weights array must be resized, but by error the function used the original stroke pointer instead of the new stroke pointer and this corrupted the pointers. =================================================================== M source/blender/editors/gpencil/gpencil_interpolate.c =================================================================== diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index 3c4d43b5f53..ec26006eb06 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -1052,8 +1052,8 @@ static int gpencil_interpolate_seq_exec(bContext *C, wmOperator *op) /* if destination stroke is smaller, resize new_stroke to size of gps_to stroke */ if (gps_from->totpoints > gps_to->totpoints) { /* free weights of removed points */ - if (gps_from->dvert != NULL) { - BKE_defvert_array_free_elems(gps_from->dvert + gps_to->totpoints, + if (new_stroke->dvert != NULL) { + BKE_defvert_array_free_elems(new_stroke->dvert + gps_to->totpoints, gps_from->totpoints - gps_to->totpoints); } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs