diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 06:13:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-18 06:13:06 +0300 |
commit | 317cb1dd6507be3e043e32eb1ddaece509bbbbb5 (patch) | |
tree | 4fca876d6b13da8cbd21ddc848f79811a3ca1796 /source/blender/editors/gpencil | |
parent | 6c0240e84a2c06af506697242e0ba42fa4998ee5 (diff) |
Cleanup: style, duplicate include
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_fill.c | 16 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_primitive.c | 14 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 12 |
5 files changed, 27 insertions, 25 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index f14ba3b4f27..e45fedd12e4 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -3337,7 +3337,7 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op) /* Project stroke in one axis */ if (ELEM(mode, GP_REPROJECT_FRONT, GP_REPROJECT_SIDE, - GP_REPROJECT_TOP, GP_REPROJECT_CURSOR)) + GP_REPROJECT_TOP, GP_REPROJECT_CURSOR)) { if (mode != GP_REPROJECT_CURSOR) { ED_gp_get_drawing_reference( @@ -3378,8 +3378,8 @@ static int gp_strokes_reproject_exec(bContext *C, wmOperator *op) } ED_gp_project_point_to_plane( - scene, ob, rv3d, origin, - axis, &pt2); + scene, ob, rv3d, origin, + axis, &pt2); copy_v3_v3(&pt->x, &pt2.x); diff --git a/source/blender/editors/gpencil/gpencil_fill.c b/source/blender/editors/gpencil/gpencil_fill.c index 32833250d49..c8c57c8ffbf 100644 --- a/source/blender/editors/gpencil/gpencil_fill.c +++ b/source/blender/editors/gpencil/gpencil_fill.c @@ -291,8 +291,8 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4]) /* normal strokes */ if (((tgpf->fill_draw_mode == GP_FILL_DMODE_STROKE) || - (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH)) && - !textured_stroke) + (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH)) && + !textured_stroke) { ED_gp_draw_fill(&tgpw); } @@ -300,7 +300,7 @@ static void gp_draw_datablock(tGPDfill *tgpf, const float ink[4]) /* 3D Lines with basic shapes and invisible lines */ if ((tgpf->fill_draw_mode == GP_FILL_DMODE_CONTROL) || (tgpf->fill_draw_mode == GP_FILL_DMODE_BOTH) || - textured_stroke) + textured_stroke) { gp_draw_basic_stroke( tgpf, gps, tgpw.diff_mat, gps->flag & GP_STROKE_CYCLIC, ink, @@ -321,7 +321,7 @@ static bool gp_render_offscreen(tGPDfill *tgpf) if (!tgpf->gpd) { return false; } - + /* set temporary new size */ tgpf->bwinx = tgpf->ar->winx; tgpf->bwiny = tgpf->ar->winy; @@ -348,7 +348,7 @@ static bool gp_render_offscreen(tGPDfill *tgpf) char err_out[256] = "unknown"; GPUOffScreen *offscreen = GPU_offscreen_create(tgpf->sizex, tgpf->sizey, 0, true, false, err_out); if (offscreen == NULL) { - printf("GPencil - Fill - Unable to create fill buffer\n"); + printf("GPencil - Fill - Unable to create fill buffer\n"); return false; } @@ -589,7 +589,7 @@ static void gpencil_boundaryfill_area(tGPDfill *tgpf) */ while (!BLI_stack_is_empty(stack)) { int v; - + BLI_stack_pop(stack, &v); get_pixel(ibuf, v, rgba); @@ -1213,8 +1213,8 @@ static tGPDfill *gp_session_init_fill(bContext *C, wmOperator *UNUSED(op)) tgpf->fill_threshold = brush->gpencil_settings->fill_threshold; tgpf->fill_simplylvl = brush->gpencil_settings->fill_simplylvl; tgpf->fill_draw_mode = brush->gpencil_settings->fill_draw_mode; - tgpf->fill_factor = (short)max_ii(1, min_ii((int)brush->gpencil_settings->fill_factor,8)); - + tgpf->fill_factor = (short)max_ii(1, min_ii((int)brush->gpencil_settings->fill_factor, 8)); + /* get color info */ Material *ma = BKE_gpencil_get_material_from_brush(brush); /* if no brush defaults, get material and color info */ diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index 40f0c0e7b84..24dcf7d4fb4 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -399,8 +399,8 @@ static void gp_reproject_toplane(tGPsdata *p, bGPDstroke *gps) /* get drawing origin */ gp_get_3d_reference(p, origin); ED_gp_project_stroke_to_plane( - p->scene, obact, rv3d, gps, - origin, p->lock_axis - 1); + p->scene, obact, rv3d, gps, + origin, p->lock_axis - 1); } /* convert screen-coordinates to buffer-coordinates */ diff --git a/source/blender/editors/gpencil/gpencil_primitive.c b/source/blender/editors/gpencil/gpencil_primitive.c index 962442824f9..9c4836c5d33 100644 --- a/source/blender/editors/gpencil/gpencil_primitive.c +++ b/source/blender/editors/gpencil/gpencil_primitive.c @@ -930,13 +930,15 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) ts->gpencil_v3d_align, origin); /* reproject current */ ED_gpencil_tpoint_to_point(tgpi->ar, origin, tpt, &spt); - ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d, - origin, tgpi->lock_axis - 1, &spt); + ED_gp_project_point_to_plane( + tgpi->scene, tgpi->ob, tgpi->rv3d, + origin, tgpi->lock_axis - 1, &spt); /* reproject previous */ ED_gpencil_tpoint_to_point(tgpi->ar, origin, tptb, &spt2); - ED_gp_project_point_to_plane(tgpi->scene, tgpi->ob, tgpi->rv3d, - origin, tgpi->lock_axis - 1, &spt2); + ED_gp_project_point_to_plane( + tgpi->scene, tgpi->ob, tgpi->rv3d, + origin, tgpi->lock_axis - 1, &spt2); tgpi->totpixlen += len_v3v3(&spt.x, &spt2.x) / pixsize; tpt->uv_fac = tgpi->totpixlen; if ((gp_style) && (gp_style->sima)) { @@ -995,8 +997,8 @@ static void gp_primitive_update_strokes(bContext *C, tGPDprimitive *tgpi) tgpi->scene, tgpi->ob, tgpi->gpl, ts->gpencil_v3d_align, origin); ED_gp_project_stroke_to_plane( - tgpi->scene, tgpi->ob, tgpi->rv3d, gps, - origin, ts->gp_sculpt.lock_axis - 1); + tgpi->scene, tgpi->ob, tgpi->rv3d, gps, + origin, ts->gp_sculpt.lock_axis - 1); } /* if parented change position relative to parent object */ diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c index 1605353a156..39c679e4125 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -937,9 +937,9 @@ void ED_gpencil_project_stroke_to_view(bContext *C, bGPDlayer *gpl, bGPDstroke * * Reproject all points of the stroke to a plane locked to axis to avoid stroke offset */ void ED_gp_project_stroke_to_plane( - const Scene *scene, const Object *ob, - const RegionView3D *rv3d, bGPDstroke *gps, - const float origin[3], const int axis) + const Scene *scene, const Object *ob, + const RegionView3D *rv3d, bGPDstroke *gps, + const float origin[3], const int axis) { const ToolSettings *ts = scene->toolsettings; const View3DCursor *cursor = &scene->cursor; @@ -1012,9 +1012,9 @@ void ED_gp_project_stroke_to_plane( * \param[in, out] pt : Point to affect */ void ED_gp_project_point_to_plane( - const Scene *scene, const Object *ob, - const RegionView3D *rv3d, const float origin[3], - const int axis, bGPDspoint *pt) + const Scene *scene, const Object *ob, + const RegionView3D *rv3d, const float origin[3], + const int axis, bGPDspoint *pt) { const ToolSettings *ts = scene->toolsettings; const View3DCursor *cursor = &scene->cursor; |