GPencil: Cleanup unused code

This commit is contained in:
2019-03-19 10:54:27 +01:00
parent da373c1f0d
commit 8aeb1dbb27
2 changed files with 0 additions and 68 deletions

View File

@@ -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);
}
}

View File

@@ -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,