Commit: a37a93dc52e210d3a78fff4baa255a87394aa2e2
Author: Falk David
Date: Fri Jun 5 16:14:36 2020 +0200
Branches: soc-2020-greasepencil-curve
https://developer.blender.org/rBa37a93dc52e210d3a78fff4baa255a87394aa2e2
GPencil: Fix writing of bGPDcurve struct.
Previously, the bGPDcurve struct itself was not written,
only the data that is referenced inside the struct
===================================================================
M source/blender/blenloader/intern/writefile.c
===================================================================
diff --git a/source/blender/blenloader/intern/writefile.c
b/source/blender/blenloader/intern/writefile.c
index 275f219edea..6c5705ddd11 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -2905,8 +2905,15 @@ static void write_gpencil(BlendWriter *writer, bGPdata
*gpd, const void *id_addr
/* write strokes */
BLO_write_struct_list(writer, bGPDstroke, &gpf->strokes);
LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
- BLO_write_struct(writer, bGPDspoint, gps->points);
- BLO_write_struct(writer, bGPDtriangle, gps->triangles);
+ BLO_write_struct_array(writer, bGPDspoint, gps->totpoints,
gps->points);
+ BLO_write_struct_array(writer, bGPDtriangle, gps->tot_triangles,
gps->triangles);
+ if (gps->editcurve != NULL) {
+ BLO_write_struct(writer, bGPDcurve, gps->editcurve);
+ BLO_write_struct_array(
+ writer, BezTriple, gps->editcurve->tot_curve_points,
gps->editcurve->curve_points);
+ BLO_write_int32_array(
+ writer, gps->editcurve->tot_curve_points,
gps->editcurve->point_index_array);
+ }
write_dverts(writer->wd, gps->totpoints, gps->dvert);
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs