Commit: 117ccb56ad7a7047b335de9bb5d6ea6e0acf3133
Author: Campbell Barton
Date:   Sat Mar 14 15:34:03 2020 +1100
Branches: master
https://developer.blender.org/rB117ccb56ad7a7047b335de9bb5d6ea6e0acf3133

Cleanup: remove unused ARegion from bGPdata_Runtime

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

M       source/blender/editors/gpencil/gpencil_paint.c
M       source/blender/editors/gpencil/gpencil_primitive.c
M       source/blender/makesdna/DNA_gpencil_types.h

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

diff --git a/source/blender/editors/gpencil/gpencil_paint.c 
b/source/blender/editors/gpencil/gpencil_paint.c
index 46788eba370..e7586d95d29 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -1653,9 +1653,6 @@ static void gp_session_validatebuffer(tGPsdata *p)
   /* reset flags */
   gpd->runtime.sbuffer_sflag = 0;
 
-  /* reset region */
-  gpd->runtime.ar = NULL;
-
   /* reset inittime */
   p->inittime = 0.0;
 
@@ -1884,7 +1881,6 @@ static bool gp_session_initdata(bContext *C, wmOperator 
*op, tGPsdata *p)
 
   /* setup active color */
   /* region where paint was originated */
-  p->gpd->runtime.ar = CTX_wm_region(C);
   int totcol = p->ob->totcol;
   gp_init_colors(p);
 
diff --git a/source/blender/editors/gpencil/gpencil_primitive.c 
b/source/blender/editors/gpencil/gpencil_primitive.c
index 96522d1750c..66c0131cd61 100644
--- a/source/blender/editors/gpencil/gpencil_primitive.c
+++ b/source/blender/editors/gpencil/gpencil_primitive.c
@@ -1157,8 +1157,6 @@ static void gpencil_primitive_init(bContext *C, 
wmOperator *op)
 
   /* set GP datablock */
   tgpi->gpd = gpd;
-  /* region where paint was originated */
-  tgpi->gpd->runtime.ar = tgpi->region;
 
   /* if brush doesn't exist, create a new set (fix damaged files from old 
versions) */
   if ((paint->brush == NULL) || (paint->brush->gpencil_settings == NULL)) {
diff --git a/source/blender/makesdna/DNA_gpencil_types.h 
b/source/blender/makesdna/DNA_gpencil_types.h
index 6059df6f886..909d65fb5ed 100644
--- a/source/blender/makesdna/DNA_gpencil_types.h
+++ b/source/blender/makesdna/DNA_gpencil_types.h
@@ -28,7 +28,6 @@
 #include "DNA_ID.h"
 #include "DNA_brush_types.h"
 
-struct ARegion;
 struct AnimData;
 struct MDeformVert;
 
@@ -481,8 +480,6 @@ typedef enum eGPLayerBlendModes {
 
 /* Runtime temp data for bGPdata */
 typedef struct bGPdata_Runtime {
-  /** Last region where drawing was originated. */
-  struct ARegion *ar;
   /** Stroke buffer. */
   void *sbuffer;
   /** Temp batches cleared after drawing. */

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

Reply via email to