From 8aeb1dbb27aca735efe0df651710c8523212780d Mon Sep 17 00:00:00 2001 From: Antonioya Date: Tue, 19 Mar 2019 10:54:27 +0100 Subject: GPencil: Cleanup unused code --- source/blender/editors/gpencil/drawgpencil.c | 60 ---------------------------- source/blender/editors/include/ED_gpencil.h | 8 ---- 2 files changed, 68 deletions(-) diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c index b9b50ac207d..8d642e82208 100644 --- a/source/blender/editors/gpencil/drawgpencil.c +++ b/source/blender/editors/gpencil/drawgpencil.c @@ -1691,63 +1691,3 @@ void ED_gpencil_draw_view3d( /* draw it! */ gp_draw_data_all(view_layer, rv3d, scene, gpd, offsx, offsy, winx, winy, CFRA, dflag, v3d->spacetype); } - -/* draw grease-pencil sketches to specified 3d-view for gp object - * assuming that matrices are already set correctly - */ -void ED_gpencil_draw_view3d_object(wmWindowManager *wm, Scene *scene, Depsgraph *depsgraph, Object *ob, View3D *v3d, ARegion *ar, bool only3d) -{ - int dflag = 0; - RegionView3D *rv3d = ar->regiondata; - int offsx, offsy, winx, winy; - - /* check that we have grease-pencil stuff to draw */ - bGPdata *gpd = ob->data; - if (gpd == NULL) return; - - /* when rendering to the offscreen buffer we don't want to - * deal with the camera border, otherwise map the coords to the camera border. */ - if ((rv3d->persp == RV3D_CAMOB) && !(G.f & G_FLAG_RENDER_VIEWPORT)) { - rctf rectf; - ED_view3d_calc_camera_border(scene, depsgraph, ar, v3d, rv3d, &rectf, true); /* no shift */ - - offsx = round_fl_to_int(rectf.xmin); - offsy = round_fl_to_int(rectf.ymin); - winx = round_fl_to_int(rectf.xmax - rectf.xmin); - winy = round_fl_to_int(rectf.ymax - rectf.ymin); - } - else { - offsx = 0; - offsy = 0; - winx = ar->winx; - winy = ar->winy; - } - - /* set flags */ - if (only3d) { - /* 3D strokes/3D space: - * - only 3D space points - * - don't status text either (as it's the wrong space) - */ - dflag |= (GP_DRAWDATA_ONLY3D | GP_DRAWDATA_NOSTATUS); - } - - if (v3d->flag2 & V3D_HIDE_OVERLAYS) { - /* don't draw status text when "only render" flag is set */ - dflag |= GP_DRAWDATA_NOSTATUS; - } - - if ((wm == NULL) || ED_screen_animation_playing(wm)) { - /* don't show onion-skins during animation playback/scrub (i.e. it obscures the poses) - * OpenGL Renders (i.e. final output), or depth buffer (i.e. not real strokes) - */ - dflag |= GP_DRAWDATA_NO_ONIONS; - } - - /* draw it! */ - ToolSettings *ts = scene->toolsettings; - Brush *brush = BKE_paint_brush(&ts->gp_paint->paint); - if (brush != NULL) { - gp_draw_data(rv3d, brush, 1.0f, ob, gpd, offsx, offsy, winx, winy, CFRA, dflag); - } -} diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index 4c2ffa01bcc..46aca340ea9 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -149,14 +149,6 @@ void ED_gpencil_draw_view3d_annotations( struct Scene *scene, struct Depsgraph *depsgraph, struct View3D *v3d, struct ARegion *ar, bool only3d); -void ED_gpencil_draw_view3d_object( - struct wmWindowManager *wm, - struct Scene *scene, - struct Depsgraph *depsgraph, - struct Object *ob, - struct View3D *v3d, - struct ARegion *ar, - bool only3d); void ED_annotation_draw_ex( struct Scene *scene, struct bGPdata *gpd, int winx, int winy, -- cgit v1.2.3