diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2022-05-30 16:41:07 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2022-05-30 16:42:08 +0300 |
commit | 70171cdfdfd80329f31844bf2b31cfc4dc1376ca (patch) | |
tree | b3d6a387095a0e3a22a610dbb4d725eb4964e586 /source/blender/blenkernel/intern/gpencil.c | |
parent | 24e74f8bef813820076cce08635e7c4cb3f2da13 (diff) |
Fix T98488: GPencil weightpaint not visible if first point is no weight
The problem was because the check was done with the total weights of the first element of the array and if this was null or 0, the weights were not duplicated.
As this bug was introduced fixing T97150 due a problem in the weight data, now instead to duplicate all stroke data to create the perimeter for the PDF/SVG, only the points are duplicated because the weights are not needed. This fix the original bug and also reduce the memory used by the export process.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index 84621be1960..699f8b356bd 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -867,7 +867,7 @@ bGPDstroke *BKE_gpencil_stroke_duplicate(bGPDstroke *gps_src, if (dup_points) { gps_dst->points = MEM_dupallocN(gps_src->points); - if ((gps_src->dvert != NULL) && (gps_src->dvert->totweight > 0)) { + if (gps_src->dvert != NULL) { gps_dst->dvert = MEM_dupallocN(gps_src->dvert); BKE_gpencil_stroke_weights_duplicate(gps_src, gps_dst); } |