Commit: ea01c7fab0c1e481b910feaa2d9f789433e9153d
Author: Antonio Vazquez
Date:   Sat Aug 15 19:57:22 2020 +0200
Branches: greasepencil-object
https://developer.blender.org/rBea01c7fab0c1e481b910feaa2d9f789433e9153d

GPencil: Make some functions static

These functions are not using object data

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

M       source/blender/io/gpencil/intern/gpencil_io_export_base.h
M       source/blender/io/gpencil/intern/gpencil_io_export_svg.h

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

diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_base.h 
b/source/blender/io/gpencil/intern/gpencil_io_export_base.h
index c9125bebd06..f8d7e18ecb3 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_export_base.h
+++ b/source/blender/io/gpencil/intern/gpencil_io_export_base.h
@@ -95,22 +95,22 @@ class GpencilExporter {
 
   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 std::string to_lower_string(char *input_text);
+  static float stroke_average_pressure_get(struct bGPDstroke *gps);
+  static bool is_stroke_thickness_constant(struct bGPDstroke *gps);
+
   /* Geometry functions. */
   bool gpencil_3d_point_to_screen_space(const float co[3], float r_co[2]);
 
-  float stroke_average_pressure_get(struct bGPDstroke *gps);
   float stroke_point_radius_get(struct bGPDstroke *gps);
   void create_object_list(void);
 
-  std::string rgb_to_hexstr(float color[3]);
-  void rgb_to_grayscale(float color[3]);
-  std::string to_lower_string(char *input_text);
-
   struct MaterialGPencilStyle *gp_style_current_get(void);
   bool material_is_stroke(void);
   bool material_is_fill(void);
 
-  bool is_stroke_thickness_constant(struct bGPDstroke *gps);
   bool is_camera_mode(void);
 
   float stroke_average_opacity_get(void);
diff --git a/source/blender/io/gpencil/intern/gpencil_io_export_svg.h 
b/source/blender/io/gpencil/intern/gpencil_io_export_svg.h
index 104da5bb820..60935e5ee63 100644
--- a/source/blender/io/gpencil/intern/gpencil_io_export_svg.h
+++ b/source/blender/io/gpencil/intern/gpencil_io_export_svg.h
@@ -40,20 +40,20 @@ class GpencilExporterSVG : public GpencilExporter {
   bool write(std::string subfix);
 
  protected:
-  void add_rect(pugi::xml_node node,
-                float x,
-                float y,
-                float width,
-                float height,
-                float thickness,
-                std::string hexcolor);
-
-  void add_text(pugi::xml_node node,
-                float x,
-                float y,
-                std::string text,
-                const float size,
-                std::string hexcolor);
+  static void add_rect(pugi::xml_node node,
+                       float x,
+                       float y,
+                       float width,
+                       float height,
+                       float thickness,
+                       std::string hexcolor);
+
+  static void add_text(pugi::xml_node node,
+                       float x,
+                       float y,
+                       std::string text,
+                       const float size,
+                       std::string hexcolor);
 
  private:
   /* XML doc. */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to