[Bf-blender-cvs] [ff756d9523f] greasepencil-edit-curve: GPencil: Remove unused function

Falk David noreply at git.blender.org
Mon Sep 28 10:57:37 CEST 2020


Commit: ff756d9523f7dec3afaaf652580b4211c0e0f543
Author: Falk David
Date:   Mon Sep 28 10:56:48 2020 +0200
Branches: greasepencil-edit-curve
https://developer.blender.org/rBff756d9523f7dec3afaaf652580b4211c0e0f543

GPencil: Remove unused function

===================================================================

M	source/blender/blenloader/intern/writefile.c

===================================================================

diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 5fda7f3cae5..1e7af7e95a2 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1762,54 +1762,6 @@ static void write_scene(BlendWriter *writer, Scene *sce, const void *id_address)
   BLI_assert(sce->layer_properties == NULL);
 }
 
-static void write_gpencil(BlendWriter *writer, bGPdata *gpd, const void *id_address)
-{
-  if (gpd->id.us > 0 || BLO_write_is_undo(writer)) {
-    /* Clean up, important in undo case to reduce false detection of changed data-blocks. */
-    /* XXX not sure why the whole run-time data is not cleared in reading code,
-     * for now mimicking it here. */
-    gpd->runtime.sbuffer = NULL;
-    gpd->runtime.sbuffer_used = 0;
-    gpd->runtime.sbuffer_size = 0;
-    gpd->runtime.tot_cp_points = 0;
-
-    /* write gpd data block to file */
-    BLO_write_id_struct(writer, bGPdata, id_address, &gpd->id);
-    BKE_id_blend_write(writer, &gpd->id);
-
-    if (gpd->adt) {
-      BKE_animdata_blend_write(writer, gpd->adt);
-    }
-
-    BLO_write_pointer_array(writer, gpd->totcol, gpd->mat);
-
-    /* write grease-pencil layers to file */
-    BLO_write_struct_list(writer, bGPDlayer, &gpd->layers);
-    LISTBASE_FOREACH (bGPDlayer *, gpl, &gpd->layers) {
-      /* Write mask list. */
-      BLO_write_struct_list(writer, bGPDlayer_Mask, &gpl->mask_layers);
-      /* write this layer's frames to file */
-      BLO_write_struct_list(writer, bGPDframe, &gpl->frames);
-      LISTBASE_FOREACH (bGPDframe *, gpf, &gpl->frames) {
-        /* write strokes */
-        BLO_write_struct_list(writer, bGPDstroke, &gpf->strokes);
-        LISTBASE_FOREACH (bGPDstroke *, gps, &gpf->strokes) {
-          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,
-                                   bGPDcurve_point,
-                                   gps->editcurve->tot_curve_points,
-                                   gps->editcurve->curve_points);
-          }
-          BKE_defvert_blend_write(writer, gps->totpoints, gps->dvert);
-        }
-      }
-    }
-  }
-}
-
 static void write_wm_xr_data(BlendWriter *writer, wmXrData *xr_data)
 {
   write_view3dshading(writer, &xr_data->session_settings.shading);



More information about the Bf-blender-cvs mailing list