[Bf-blender-cvs] [cfef9632b63] greasepencil-object: GPencil: Remove unused functions

Antonio Vazquez noreply at git.blender.org
Fri Sep 27 23:21:21 CEST 2019


Commit: cfef9632b63af7cbe4268242d62258a63da1ad81
Author: Antonio Vazquez
Date:   Fri Sep 27 23:21:07 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBcfef9632b63af7cbe4268242d62258a63da1ad81

GPencil: Remove unused functions

These functions were moved to a separated patch for modifiers: https://developer.blender.org/D5795

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

M	source/blender/blenkernel/BKE_gpencil.h
M	source/blender/blenkernel/intern/gpencil.c

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

diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 2c4eb49a16f..d09917a9e41 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -227,19 +227,9 @@ void BKE_gpencil_stroke_2d_flat_ref(const struct bGPDspoint *ref_points,
                                     float (*points2d)[2],
                                     const float scale,
                                     int *r_direction);
-float BKE_gpencil_stroke_length(const struct bGPDstroke *gps, bool use_3d);
 
 void BKE_gpencil_transform(struct bGPdata *gpd, float mat[4][4]);
 
-bool BKE_gpencil_stretch_stroke(struct bGPDstroke *gps, const float dist);
-bool BKE_gpencil_trim_stroke_points(struct bGPDstroke *gps,
-                                    const int index_from,
-                                    const int index_to);
-bool BKE_gpencil_shrink_stroke(struct bGPDstroke *gps, const float dist);
-bool BKE_gpencil_split_stroke(struct bGPDframe *gpf,
-                              struct bGPDstroke *gps,
-                              const int before_index,
-                              struct bGPDstroke **remaining_gps);
 bool BKE_gpencil_sample_stroke(struct bGPDstroke *gps, const float dist, const bool select);
 bool BKE_gpencil_smooth_stroke(struct bGPDstroke *gps, int i, float inf);
 bool BKE_gpencil_smooth_stroke_strength(struct bGPDstroke *gps, int point_index, float influence);
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c
index 32ac7a6eb34..4f2b7615410 100644
--- a/source/blender/blenkernel/intern/gpencil.c
+++ b/source/blender/blenkernel/intern/gpencil.c
@@ -1428,9 +1428,7 @@ void BKE_gpencil_vgroup_remove(Object *ob, bDeformGroup *defgroup)
 
   /* Remove the group */
   BLI_freelinkN(&ob->defbase, defgroup);
-  if (gpd) {
-    DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
-  }
+  DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY);
 }
 
 void BKE_gpencil_dvert_ensure(bGPDstroke *gps)
@@ -2274,28 +2272,6 @@ void BKE_gpencil_stroke_2d_flat_ref(const bGPDspoint *ref_points,
   *r_direction = (int)locy[2];
 }
 
-float BKE_gpencil_stroke_length(const bGPDstroke *gps, bool use_3d)
-{
-  if (!gps->points || gps->totpoints < 2) {
-    return 0;
-  }
-  float *last_pt = &gps->points[0].x;
-  int i;
-  bGPDspoint *pt;
-  float total_length = 0;
-  for (i = 1; i < gps->totpoints; i++) {
-    pt = &gps->points[i];
-    if (use_3d) {
-      total_length += len_v3v3(&pt->x, last_pt);
-    }
-    else {
-      total_length += len_v2v2(&pt->x, last_pt);
-    }
-    last_pt = &pt->x;
-  }
-  return total_length;
-}
-
 /**
  * Trim stroke to the first intersection or loop
  * \param gps: Stroke data



More information about the Bf-blender-cvs mailing list