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 | |
parent | 6c0240e84a2c06af506697242e0ba42fa4998ee5 (diff) |
Cleanup: style, duplicate include
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/draw/engines/gpencil/gpencil_engine.c | 13 | ||||
-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 | ||||
-rw-r--r-- | source/blender/editors/include/ED_gpencil.h | 4 | ||||
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineonlib.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 21 |
9 files changed, 50 insertions, 46 deletions
diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 7fbae5e98ea..bfda7098391 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -628,8 +628,8 @@ void GPENCIL_cache_populate(void *vedata, Object *ob) ((v3d->flag2 & V3D_HIDE_OVERLAYS) == 0) && (v3d->gp_flag & V3D_GP_SHOW_GRID) && (ob->type == OB_GPENCIL) && (ob == draw_ctx->obact) && - ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0) && - ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) == 0)) + ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_VIEW) == 0) && + ((ts->gpencil_v3d_align & GP_PROJECT_DEPTH_STROKE) == 0)) { GPU_BATCH_DISCARD_SAFE(e_data.batch_grid); MEM_SAFE_FREE(e_data.batch_grid); @@ -649,10 +649,11 @@ void GPENCIL_cache_populate(void *vedata, Object *ob) case GP_LOCKAXIS_CURSOR: { float scale[3] = { 1.0f, 1.0f, 1.0f }; - loc_eul_size_to_mat4(stl->storage->grid_matrix, - cursor->location, - cursor->rotation_euler, - scale); + loc_eul_size_to_mat4( + stl->storage->grid_matrix, + cursor->location, + cursor->rotation_euler, + scale); break; } default: 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; diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h index fdbb8556891..5d943930522 100644 --- a/source/blender/editors/include/ED_gpencil.h +++ b/source/blender/editors/include/ED_gpencil.h @@ -225,11 +225,11 @@ void ED_gpencil_add_defaults(struct bContext *C, struct Object *ob); void ED_gpencil_setup_modes(struct bContext *C, struct bGPdata *gpd, int newmode); void ED_gp_project_stroke_to_plane( - const struct Scene *scene, + const struct Scene *scene, const struct Object *ob, const struct RegionView3D *rv3d, struct bGPDstroke *gps, const float origin[3], const int axis); void ED_gp_project_point_to_plane( - const struct Scene *scene, + const struct Scene *scene, const struct Object *ob, const struct RegionView3D *rv3d, const float origin[3], const int axis, struct bGPDspoint *pt); void ED_gp_get_drawing_reference( diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c index b3e08ba294b..14389a566fd 100644 --- a/source/blender/imbuf/intern/cineon/cineonlib.c +++ b/source/blender/imbuf/intern/cineon/cineonlib.c @@ -182,8 +182,10 @@ LogImageFile *cineonOpen(const unsigned char *byteStuff, int fromMemory, size_t if (verbose) printf("Cineon: File is LSB.\n"); } else { - if (verbose) printf("Cineon: Bad magic number %lu in \"%s\".\n", - (unsigned long)header.fileHeader.magic_num, byteStuff); + if (verbose) { + printf("Cineon: Bad magic number %lu in \"%s\".\n", + (unsigned long)header.fileHeader.magic_num, byteStuff); + } logImageClose(cineon); return NULL; } diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 591cabac98f..248a1486d48 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -56,8 +56,6 @@ #include "RE_render_ext.h" -#include "NOD_composite.h" - #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" @@ -2470,9 +2468,9 @@ static StructRNA *rna_NodeCustomGroup_register( } static StructRNA *rna_ShaderNodeCustomGroup_register( - Main * bmain, ReportList *reports, - void *data, const char *identifier, - StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) + Main *bmain, ReportList *reports, + void *data, const char *identifier, + StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { bNodeType * nt = rna_Node_register_base(bmain, reports, &RNA_ShaderNodeCustomGroup, data, identifier, validate, call, free); @@ -2492,9 +2490,9 @@ static StructRNA *rna_ShaderNodeCustomGroup_register( } static StructRNA *rna_CompositorNodeCustomGroup_register( - Main *bmain, ReportList *reports, - void *data, const char *identifier, - StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) + Main *bmain, ReportList *reports, + void *data, const char *identifier, + StructValidateFunc validate, StructCallbackFunc call, StructFreeFunc free) { bNodeType *nt = rna_Node_register_base(bmain, reports, &RNA_CompositorNodeCustomGroup, data, identifier, validate, call, free); if (!nt) @@ -3463,8 +3461,9 @@ static void def_group(StructRNA *srna) RNA_def_property_ui_text(prop, "Interface", "Interface socket data"); } -static void def_custom_group(BlenderRNA *brna, const char *struct_name, const char *base_name, - const char *ui_name, const char *ui_desc, const char *reg_func) +static void def_custom_group( + BlenderRNA *brna, const char *struct_name, const char *base_name, + const char *ui_name, const char *ui_desc, const char *reg_func) { StructRNA *srna; @@ -8672,7 +8671,7 @@ void RNA_def_nodetree(BlenderRNA *brna) define_specific_node(brna, "TextureNodeGroup", "TextureNode", "Group", "", def_group); def_custom_group(brna, "ShaderNodeCustomGroup", "ShaderNode", "Shader Custom Group", "Custom Shader Group Node for Python nodes", "rna_ShaderNodeCustomGroup_register"); def_custom_group(brna, "CompositorNodeCustomGroup", "CompositorNode", "Compositor Custom Group", "Custom Compositor Group Node for Python nodes", "rna_CompositorNodeCustomGroup_register"); - def_custom_group(brna, "NodeCustomGroup", "Node", "Custom Group", "Base node type for custom registered node group types", "rna_NodeCustomGroup_register"); + def_custom_group(brna, "NodeCustomGroup", "Node", "Custom Group", "Base node type for custom registered node group types", "rna_NodeCustomGroup_register"); /* special socket types */ rna_def_cmp_output_file_slot_file(brna); |