diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/gpencil/drawgpencil.c | 57 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 10 |
3 files changed, 0 insertions, 71 deletions
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index c83c81732c7..888d78e4434 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -994,63 +994,6 @@ static void gp_draw_strokes(tGPDdraw *tgpw) /* ----- General Drawing ------ */ -/* draw interpolate strokes (used only while operator is running) */ -void ED_gp_draw_interpolation(const bContext *C, tGPDinterpolate *tgpi, const int type) -{ - tGPDdraw tgpw; - ARegion *ar = CTX_wm_region(C); - RegionView3D *rv3d = ar->regiondata; - tGPDinterpolate_layer *tgpil; - Object *obact = CTX_data_active_object(C); - /* Drawing code is expected to run with fully evaluated depsgraph. */ - Depsgraph *depsgraph = CTX_data_expect_evaluated_depsgraph(C); - - float color[4]; - - UI_GetThemeColor3fv(TH_GP_VERTEX_SELECT, color); - color[3] = 0.6f; - int dflag = 0; - /* if 3d stuff, enable flags */ - if (type == REGION_DRAW_POST_VIEW) { - dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS); - } - - tgpw.rv3d = rv3d; - tgpw.depsgraph = depsgraph; - tgpw.ob = obact; - tgpw.gpd = tgpi->gpd; - tgpw.offsx = 0; - tgpw.offsy = 0; - tgpw.winx = tgpi->ar->winx; - tgpw.winy = tgpi->ar->winy; - tgpw.dflag = dflag; - - /* turn on alpha-blending */ - GPU_blend(true); - for (tgpil = tgpi->ilayers.first; tgpil; tgpil = tgpil->next) { - /* calculate parent position */ - BKE_gpencil_parent_matrix_get(depsgraph, obact, tgpil->gpl, tgpw.diff_mat); - if (tgpil->interFrame) { - tgpw.gpl = tgpil->gpl; - tgpw.gpf = tgpil->interFrame; - tgpw.t_gpf = tgpil->interFrame; - tgpw.gps = NULL; - - tgpw.lthick = tgpil->gpl->line_change; - tgpw.opacity = 1.0; - copy_v4_v4(tgpw.tintcolor, color); - tgpw.onion = true; - tgpw.custonion = true; - if (obact->totcol == 0) { - tgpw.gpd->mat = NULL; - } - - gp_draw_strokes(&tgpw); - } - } - GPU_blend(false); -} - /* wrapper to draw strokes for filling operator */ void ED_gp_draw_fill(tGPDdraw *tgpw) { diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h index ace768d7f05..4f6aedf8495 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -231,10 +231,6 @@ typedef struct tGPDprimitive { } tGPDprimitive; /* Modal Operator Drawing Callbacks ------------------------ */ - -void ED_gp_draw_interpolation(const struct bContext *C, - struct tGPDinterpolate *tgpi, - const int type); void ED_gp_draw_fill(struct tGPDdraw *tgpw); /* ***************************************************** */ diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c index ce6a7d0454e..05d5b8d6eee 100644 --- a/source/blender/editors/gpencil/gpencil_interpolate.c +++ b/source/blender/editors/gpencil/gpencil_interpolate.c @@ -341,16 +341,6 @@ static void gp_interpolate_set_points(bContext *C, tGPDinterpolate *tgpi) } /* ----------------------- */ -/* Drawing Callbacks */ - -/* Drawing callback for modal operator in 3d mode */ -static void gpencil_interpolate_draw_3d(const bContext *C, ARegion *UNUSED(ar), void *arg) -{ - tGPDinterpolate *tgpi = (tGPDinterpolate *)arg; - ED_gp_draw_interpolation(C, tgpi, REGION_DRAW_POST_VIEW); -} - -/* ----------------------- */ /* Helper: calculate shift based on position of mouse (we only use x-axis for now. * since this is more convenient for users to do), and store new shift value |