[Bf-blender-cvs] [571e7b5a17a] temp-gpencil-io: Remove unused function

Antonio Vazquez noreply at git.blender.org
Thu Mar 18 12:46:28 CET 2021


Commit: 571e7b5a17a405fcdd2ed98527a2029a1b191330
Author: Antonio Vazquez
Date:   Thu Mar 18 12:46:22 2021 +0100
Branches: temp-gpencil-io
https://developer.blender.org/rB571e7b5a17a405fcdd2ed98527a2029a1b191330

Remove unused function

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

M	source/blender/io/gpencil/intern/gpencil_io_base.cc
M	source/blender/io/gpencil/intern/gpencil_io_base.h

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

diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.cc b/source/blender/io/gpencil/intern/gpencil_io_base.cc
index 054dd24a879..5b08078add4 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_base.cc
+++ b/source/blender/io/gpencil/intern/gpencil_io_base.cc
@@ -358,15 +358,6 @@ std::string GpencilIO::rgb_to_hexstr(float color[3])
   return hexstr;
 }
 
-/** Convert a color to grayscale. */
-void GpencilIO::rgb_to_grayscale(float color[3])
-{
-  float grayscale = ((0.3f * color[0]) + (0.59f * color[1]) + (0.11f * color[2]));
-  color[0] = grayscale;
-  color[1] = grayscale;
-  color[2] = grayscale;
-}
-
 void GpencilIO::gpl_matrix_set(struct Object *ob, struct bGPDlayer *gpl)
 {
   BKE_gpencil_layer_transform_matrix_get(depsgraph_, ob, gpl, diff_mat_);
diff --git a/source/blender/io/gpencil/intern/gpencil_io_base.h b/source/blender/io/gpencil/intern/gpencil_io_base.h
index a0f7753e811..39f0aa69adc 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_base.h
+++ b/source/blender/io/gpencil/intern/gpencil_io_base.h
@@ -89,7 +89,6 @@ class GpencilIO {
   float stroke_color_[4], fill_color_[4];
 
   static std::string rgb_to_hexstr(float color[3]);
-  static void rgb_to_grayscale(float color[3]);
   static float stroke_average_pressure_get(struct bGPDstroke *gps);
   static bool is_stroke_thickness_constant(struct bGPDstroke *gps);



More information about the Bf-blender-cvs mailing list