diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-03-27 14:31:30 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-03-27 14:36:24 +0300 |
commit | 8a62fa9855124dbfa4001eccc073cb0ee65f9212 (patch) | |
tree | 97392d5331bf1a7485f20a1986ddde05482d2b97 /source/blender/editors/gpencil/annotate_draw.c | |
parent | 25e8550739ef6e14b1496931228138533e3944bb (diff) |
GPencil: Cleanup of unused code a arguments
Diffstat (limited to 'source/blender/editors/gpencil/annotate_draw.c')
-rw-r--r-- | source/blender/editors/gpencil/annotate_draw.c | 53 |
1 files changed, 16 insertions, 37 deletions
diff --git a/source/blender/editors/gpencil/annotate_draw.c b/source/blender/editors/gpencil/annotate_draw.c index 5c396ca9041..fc62defd757 100644 --- a/source/blender/editors/gpencil/annotate_draw.c +++ b/source/blender/editors/gpencil/annotate_draw.c @@ -209,7 +209,6 @@ static void annotation_calc_2d_stroke_fxy( /* draw a given stroke - just a single dot (only one point) */ static void annotation_draw_stroke_point(const bGPDspoint *points, short thickness, - short UNUSED(dflag), short sflag, int offsx, int offsy, @@ -252,12 +251,8 @@ static void annotation_draw_stroke_point(const bGPDspoint *points, } /* draw a given stroke in 3d (i.e. in 3d-space), using simple ogl lines */ -static void annotation_draw_stroke_3d(const bGPDspoint *points, - int totpoints, - short thickness, - short UNUSED(sflag), - const float ink[4], - bool cyclic) +static void annotation_draw_stroke_3d( + const bGPDspoint *points, int totpoints, short thickness, const float ink[4], bool cyclic) { float curpressure = points[0].pressure; float cyclic_fpt[3]; @@ -550,9 +545,7 @@ static bool annotation_can_draw_stroke(const bGPDstroke *gps, const int dflag) } /* draw a set of strokes */ -static void annotation_draw_strokes(bGPdata *UNUSED(gpd), - bGPDlayer *UNUSED(gpl), - const bGPDframe *gpf, +static void annotation_draw_strokes(const bGPDframe *gpf, int offsx, int offsy, int winx, @@ -587,11 +580,11 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd), /* 3D Lines - OpenGL primitives-based */ if (gps->totpoints == 1) { annotation_draw_stroke_point( - gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy, color); + gps->points, lthick, gps->flag, offsx, offsy, winx, winy, color); } else { annotation_draw_stroke_3d( - gps->points, gps->totpoints, lthick, gps->flag, color, gps->flag & GP_STROKE_CYCLIC); + gps->points, gps->totpoints, lthick, color, gps->flag & GP_STROKE_CYCLIC); } if (no_xray) { @@ -605,7 +598,7 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd), /* 2D Strokes... */ if (gps->totpoints == 1) { annotation_draw_stroke_point( - gps->points, lthick, dflag, gps->flag, offsx, offsy, winx, winy, color); + gps->points, lthick, gps->flag, offsx, offsy, winx, winy, color); } else { annotation_draw_stroke_2d(gps->points, @@ -626,15 +619,13 @@ static void annotation_draw_strokes(bGPdata *UNUSED(gpd), } /* Draw selected verts for strokes being edited */ -static void annotation_draw_strokes_edit(bGPdata *UNUSED(gpd), - bGPDlayer *gpl, +static void annotation_draw_strokes_edit(bGPDlayer *gpl, const bGPDframe *gpf, int offsx, int offsy, int winx, int winy, short dflag, - short UNUSED(lflag), float alpha) { /* if alpha 0 do not draw */ @@ -754,15 +745,8 @@ static void annotation_draw_strokes_edit(bGPdata *UNUSED(gpd), /* ----- General Drawing ------ */ /* draw onion-skinning for a layer */ -static void annotation_draw_onionskins(bGPdata *gpd, - bGPDlayer *gpl, - bGPDframe *gpf, - int offsx, - int offsy, - int winx, - int winy, - int UNUSED(cfra), - int dflag) +static void annotation_draw_onionskins( + bGPDlayer *gpl, bGPDframe *gpf, int offsx, int offsy, int winx, int winy, int dflag) { const float alpha = 1.0f; float color[4]; @@ -781,8 +765,7 @@ static void annotation_draw_onionskins(bGPdata *gpd, /* alpha decreases with distance from curframe index */ fac = 1.0f - ((float)(gpf->framenum - gf->framenum) / (float)(gpl->gstep + 1)); color[3] = alpha * fac * 0.66f; - annotation_draw_strokes( - gpd, gpl, gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color); + annotation_draw_strokes(gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color); } else { break; @@ -793,8 +776,7 @@ static void annotation_draw_onionskins(bGPdata *gpd, /* draw the strokes for the ghost frames (at half of the alpha set by user) */ if (gpf->prev) { color[3] = (alpha / 7); - annotation_draw_strokes( - gpd, gpl, gpf->prev, offsx, offsy, winx, winy, dflag, gpl->thickness, color); + annotation_draw_strokes(gpf->prev, offsx, offsy, winx, winy, dflag, gpl->thickness, color); } } else { @@ -815,8 +797,7 @@ static void annotation_draw_onionskins(bGPdata *gpd, /* alpha decreases with distance from curframe index */ fac = 1.0f - ((float)(gf->framenum - gpf->framenum) / (float)(gpl->gstep_next + 1)); color[3] = alpha * fac * 0.66f; - annotation_draw_strokes( - gpd, gpl, gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color); + annotation_draw_strokes(gf, offsx, offsy, winx, winy, dflag, gpl->thickness, color); } else { break; @@ -827,8 +808,7 @@ static void annotation_draw_onionskins(bGPdata *gpd, /* draw the strokes for the ghost frames (at half of the alpha set by user) */ if (gpf->next) { color[3] = (alpha / 4); - annotation_draw_strokes( - gpd, gpl, gpf->next, offsx, offsy, winx, winy, dflag, gpl->thickness, color); + annotation_draw_strokes(gpf->next, offsx, offsy, winx, winy, dflag, gpl->thickness, color); } } else { @@ -875,11 +855,11 @@ static void annotation_draw_data_layers( /* Draw 'onionskins' (frame left + right) */ if (gpl->onion_flag & GP_LAYER_ONIONSKIN) { - annotation_draw_onionskins(gpd, gpl, gpf, offsx, offsy, winx, winy, cfra, dflag); + annotation_draw_onionskins(gpl, gpf, offsx, offsy, winx, winy, dflag); } /* draw the strokes already in active frame */ - annotation_draw_strokes(gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, lthick, ink); + annotation_draw_strokes(gpf, offsx, offsy, winx, winy, dflag, lthick, ink); /* Draw verts of selected strokes: * - when doing OpenGL renders, we don't want to be showing these, as that ends up flickering @@ -892,8 +872,7 @@ static void annotation_draw_data_layers( /* XXX: perhaps we don't want to show these when users are drawing... */ if ((G.f & G_FLAG_RENDER_VIEWPORT) == 0 && (gpl->flag & GP_LAYER_LOCKED) == 0 && (gpd->flag & GP_DATA_STROKE_EDITMODE)) { - annotation_draw_strokes_edit( - gpd, gpl, gpf, offsx, offsy, winx, winy, dflag, gpl->flag, alpha); + annotation_draw_strokes_edit(gpl, gpf, offsx, offsy, winx, winy, dflag, alpha); } /* Check if may need to draw the active stroke cache, only if this layer is the active layer |