From 117ccb56ad7a7047b335de9bb5d6ea6e0acf3133 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 14 Mar 2020 15:34:03 +1100 Subject: Cleanup: remove unused ARegion from bGPdata_Runtime --- source/blender/editors/gpencil/gpencil_paint.c | 4 ---- source/blender/editors/gpencil/gpencil_primitive.c | 2 -- source/blender/makesdna/DNA_gpencil_types.h | 3 --- 3 files changed, 9 deletions(-) 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. */ -- cgit v1.2.3