[Bf-blender-cvs] [4a3fb26d34a] greasepencil-object: GPencil: More code reorganization

Antonioya noreply at git.blender.org
Sat May 4 10:59:50 CEST 2019


Commit: 4a3fb26d34ac1861f1509a961be830822a531751
Author: Antonioya
Date:   Sat May 4 10:59:35 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rB4a3fb26d34ac1861f1509a961be830822a531751

GPencil: More code reorganization

Part of the reorganization to implement modifiers in Edit mode.

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

M	source/blender/blenkernel/BKE_gpencil.h
M	source/blender/draw/engines/gpencil/gpencil_engine.h

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

diff --git a/source/blender/blenkernel/BKE_gpencil.h b/source/blender/blenkernel/BKE_gpencil.h
index 9429ce36830..993d4ee8386 100644
--- a/source/blender/blenkernel/BKE_gpencil.h
+++ b/source/blender/blenkernel/BKE_gpencil.h
@@ -71,6 +71,24 @@ typedef struct GpencilBatchCacheElem {
   int tot_vertex;
 } GpencilBatchCacheElem;
 
+/* Defines each batch group to define later the shgroup */
+typedef struct GpencilBatchGroup {
+  struct bGPDlayer *gpl;  /* reference to original layer */
+  struct bGPDframe *gpf;  /* reference to original frame */
+  struct bGPDstroke *gps; /* reference to original stroke */
+  short type;             /* type of element */
+  bool onion;             /* the group is part of onion skin */
+  int vertex_idx;         /* index of vertex data */
+} GpencilBatchGroup;
+
+typedef enum GpencilBatchGroup_Type {
+  eGpencilBatchGroupType_Stroke = 1,
+  eGpencilBatchGroupType_Point = 2,
+  eGpencilBatchGroupType_Fill = 3,
+  eGpencilBatchGroupType_Edit = 4,
+  eGpencilBatchGroupType_Edlin = 5,
+} GpencilBatchGroup_Type;
+
 /* Runtime data for GPU and derived frames after applying modifiers */
 typedef struct GpencilBatchCache {
   struct GpencilBatchCacheElem b_stroke;
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h
index ba5ee72fd95..6c673e92854 100644
--- a/source/blender/draw/engines/gpencil/gpencil_engine.h
+++ b/source/blender/draw/engines/gpencil/gpencil_engine.h
@@ -36,6 +36,7 @@ struct bGPDstroke;
 struct tGPspoint;
 struct GpencilBatchCache;
 struct GpencilBatchCacheElem;
+struct GpencilBatchGroup;
 
 #define GPENCIL_CACHE_BLOCK_SIZE 8
 #define GPENCIL_MAX_SHGROUPS 65536
@@ -347,23 +348,6 @@ typedef struct GPENCIL_e_data {
 
 } GPENCIL_e_data; /* Engine data */
 
-typedef struct GpencilBatchGroup {
-  bGPDlayer *gpl;  /* reference to original layer */
-  bGPDframe *gpf;  /* reference to original frame */
-  bGPDstroke *gps; /* reference to original stroke */
-  short type;      /* type of element */
-  bool onion;      /* the group is part of onion skin */
-  int vertex_idx;  /* index of vertex data */
-} GpencilBatchGroup;
-
-typedef enum GpencilBatchGroup_Type {
-  eGpencilBatchGroupType_Stroke = 1,
-  eGpencilBatchGroupType_Point = 2,
-  eGpencilBatchGroupType_Fill = 3,
-  eGpencilBatchGroupType_Edit = 4,
-  eGpencilBatchGroupType_Edlin = 5,
-} GpencilBatchGroup_Type;
-
 /* general drawing functions */
 struct DRWShadingGroup *DRW_gpencil_shgroup_stroke_create(struct GPENCIL_e_data *e_data,
                                                           struct GPENCIL_Data *vedata,



More information about the Bf-blender-cvs mailing list