[Bf-blender-cvs] [8a62fa98551] master: GPencil: Cleanup of unused code a arguments
Antonio Vazquez
noreply at git.blender.org
Fri Mar 27 12:36:29 CET 2020
Commit: 8a62fa9855124dbfa4001eccc073cb0ee65f9212
Author: Antonio Vazquez
Date: Fri Mar 27 12:31:30 2020 +0100
Branches: master
https://developer.blender.org/rB8a62fa9855124dbfa4001eccc073cb0ee65f9212
GPencil: Cleanup of unused code a arguments
===================================================================
M source/blender/draw/intern/draw_cache_impl_gpencil.c
M source/blender/editors/gpencil/annotate_draw.c
M source/blender/editors/gpencil/annotate_paint.c
M source/blender/editors/gpencil/drawgpencil.c
M source/blender/editors/gpencil/gpencil_convert.c
M source/blender/editors/gpencil/gpencil_edit.c
M source/blender/editors/gpencil/gpencil_fill.c
M source/blender/editors/gpencil/gpencil_intern.h
M source/blender/editors/gpencil/gpencil_paint.c
M source/blender/editors/gpencil/gpencil_primitive.c
M source/blender/editors/gpencil/gpencil_sculpt_paint.c
M source/blender/editors/gpencil/gpencil_select.c
M source/blender/editors/gpencil/gpencil_utils.c
M source/blender/editors/gpencil/gpencil_vertex_paint.c
M source/blender/editors/gpencil/gpencil_weight_paint.c
M source/blender/editors/include/ED_gpencil.h
===================================================================
diff --git a/source/blender/draw/intern/draw_cache_impl_gpencil.c b/source/blender/draw/intern/draw_cache_impl_gpencil.c
index 349eb6b00ae..502bc1a3967 100644
--- a/source/blender/draw/intern/draw_cache_impl_gpencil.c
+++ b/source/blender/draw/intern/draw_cache_impl_gpencil.c
@@ -544,7 +544,7 @@ static void gpencil_sbuffer_stroke_ensure(bGPdata *gpd, bool do_stroke, bool do_
float origin[3];
bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd);
ToolSettings *ts = scene->toolsettings;
- ED_gpencil_drawing_reference_get(scene, ob, gpl, ts->gpencil_v3d_align, origin);
+ ED_gpencil_drawing_reference_get(scene, ob, ts->gpencil_v3d_align, origin);
for (int i = 0; i < vert_len; i++) {
ED_gpencil_tpoint_to_point(region, origin, &tpoints[i], &gps->points[i]);
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
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c
index 9f2c4070b18..8d3770d3971 100644
--- a/source/blender/editors/gpencil/annotate_paint.c
+++ b/source/blender/editors/gpencil/annotate_paint.c
@@ -885,7 +885,7 @@ static void gp_stroke_eraser_dostroke(tGPsdata *p,
* eraser region (either within stroke painted, or on its lines)
* - this assumes that linewidth is irrelevant
*/
- if (gp_stroke_inside_circle(mval, mvalo, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
+ if (gp_stroke_inside_circle(mval, radius, pc1[0], pc1[1], pc2[0], pc2[1])) {
if ((gp_stroke_eraser_is_occluded(p, pt1, pc1[0], pc1[1]) == false) ||
(gp_stroke_eraser_is_occluded(p, pt2, pc2[0], pc2[1]) == false)) {
/* Edge is affected - Check individual points now */
diff --git a/source/blender/editors/gpencil/drawgpencil.c b/source/blender/editors/gpencil/drawgpencil.c
index 7107aacad37..7b1e985fb7d 100644
--- a/source/blender/editors/gpencil/drawgpencil.c
+++ b/source/blender/editors/gpencil/drawgpencil.c
@@ -160,48 +160,6 @@ static void gp_calc_2d_stroke_fxy(
}
/* ----------- Volumetric Strokes --------------- */
-/* draw a 2D strokes in "volumetric" style */
-static void gp_draw_stroke_volumetric_2d(const bGPDspoint *points,
- int totpoints,
- short thickness,
- short UNUSED(dflag),
-
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list