From 7eaf00bfb09f5e5a5b0c57d7df7093970aff137e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 22 Aug 2018 10:10:12 +1000 Subject: Cleanup: style --- source/blender/blenkernel/BKE_subdiv.h | 2 +- source/blender/blenkernel/intern/constraint.c | 2 +- .../blender/blenkernel/intern/gpencil_modifier.c | 8 ++-- .../intern/subdiv_displacement_multires.c | 8 ++-- .../draw/engines/gpencil/gpencil_cache_utils.c | 14 ++++--- .../draw/engines/gpencil/gpencil_draw_utils.c | 29 +++++++------- .../blender/draw/engines/gpencil/gpencil_engine.c | 20 +++++----- .../blender/draw/engines/gpencil/gpencil_engine.h | 15 ++++--- .../draw/engines/workbench/workbench_render.c | 3 +- source/blender/draw/intern/DRW_render.h | 2 +- source/blender/draw/intern/draw_anim_viz.c | 2 +- source/blender/draw/intern/draw_common.c | 2 +- source/blender/draw/modes/edit_armature_mode.c | 12 +++--- source/blender/draw/modes/edit_curve_mode.c | 2 +- source/blender/draw/modes/edit_lattice_mode.c | 2 +- source/blender/draw/modes/object_mode.c | 14 +++---- source/blender/draw/modes/pose_mode.c | 12 +++--- source/blender/editors/mask/mask_draw.c | 2 +- source/blender/editors/mesh/editmesh_extrude.c | 2 +- source/blender/editors/screen/screen_edit.c | 2 +- .../editors/space_outliner/outliner_dragdrop.c | 4 +- .../gpencil_modifiers/intern/MOD_gpencilinstance.c | 5 ++- source/blender/python/mathutils/mathutils_Matrix.c | 46 +++++++++++----------- .../python/mathutils/mathutils_Quaternion.c | 32 +++++++-------- source/blender/python/mathutils/mathutils_Vector.c | 38 +++++++++--------- 25 files changed, 143 insertions(+), 137 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h index 887eff6e7dc..9f8a0f261e6 100644 --- a/source/blender/blenkernel/BKE_subdiv.h +++ b/source/blender/blenkernel/BKE_subdiv.h @@ -211,7 +211,7 @@ void BKE_subdiv_eval_displacement( Subdiv *subdiv, const int ptex_face_index, const float u, const float v, - const float dPdu[3], const float dPdv[3], + const float dPdu[3], const float dPdv[3], float r_D[3]); void BKE_subdiv_eval_final_point( diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 2a28f333f41..4674b2c7554 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -635,7 +635,7 @@ static void constraint_target_to_mat4(Object *ob, const char *substring, float m /* apply full transformation of the segment if requested */ if (full_bbone) { int index = floorf(fac); - CLAMP(index, 0, pchan->bone->segments-1); + CLAMP(index, 0, pchan->bone->segments - 1); mul_m4_m4m4(tempmat, pchan->pose_mat, bbone[index].mat); } diff --git a/source/blender/blenkernel/intern/gpencil_modifier.c b/source/blender/blenkernel/intern/gpencil_modifier.c index 6f6051dfa7c..3b0c86a1832 100644 --- a/source/blender/blenkernel/intern/gpencil_modifier.c +++ b/source/blender/blenkernel/intern/gpencil_modifier.c @@ -407,10 +407,10 @@ void BKE_gpencil_stroke_modifiers(Depsgraph *depsgraph, Object *ob, bGPDlayer *g /* some modifiers could require a recalc of fill triangulation data */ if (gpd->flag & GP_DATA_STROKE_FORCE_RECALC) { if (ELEM(md->type, - eGpencilModifierType_Hook, - eGpencilModifierType_Lattice, - eGpencilModifierType_Offset)) { - + eGpencilModifierType_Hook, + eGpencilModifierType_Lattice, + eGpencilModifierType_Offset)) + { gps->flag |= GP_STROKE_RECALC_CACHES; } } diff --git a/source/blender/blenkernel/intern/subdiv_displacement_multires.c b/source/blender/blenkernel/intern/subdiv_displacement_multires.c index 8f0048a3ed4..7eb47a70588 100644 --- a/source/blender/blenkernel/intern/subdiv_displacement_multires.c +++ b/source/blender/blenkernel/intern/subdiv_displacement_multires.c @@ -23,7 +23,7 @@ * ***** END GPL LICENSE BLOCK ***** */ -/** \file blender/blenkernel/intern/subdiv_displacement.c +/** \file blender/blenkernel/intern/subdiv_displacement_multires.c * \ingroup bke */ @@ -118,7 +118,7 @@ static int displacement_get_grid_and_coord( SubdivDisplacement *displacement, const int ptex_face_index, const float u, const float v, const MDisps **r_displacement_grid, - float *grid_u, float *grid_v) + float *grid_u, float *grid_v) { MultiresDisplacementData *data = displacement->user_data; const PolyCornerIndex *poly_corner = @@ -432,8 +432,8 @@ void BKE_subdiv_displacement_attach_from_multires( SubdivDisplacement *displacement = MEM_callocN(sizeof(SubdivDisplacement), "multires displacement"); displacement->user_data = MEM_callocN(sizeof(MultiresDisplacementData), - "multires displacement data"); - displacement_init_data(displacement, object, mmd); + "multires displacement data"); + displacement_init_data(displacement, object, mmd); displacement_init_functions(displacement); /* Finish. */ subdiv->displacement_evaluator = displacement; diff --git a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c index 8ae650a21eb..835cc2cfe57 100644 --- a/source/blender/draw/engines/gpencil/gpencil_cache_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_cache_utils.c @@ -46,7 +46,7 @@ static bool gpencil_check_ob_duplicated(tGPencilObjectCache *cache_array, int gp for (int i = 0; i < gp_cache_used + 1; i++) { tGPencilObjectCache *cache_elem = &cache_array[i]; if (STREQ(cache_elem->ob_name, ob->id.name) && - (cache_elem->is_dup_ob == false)) + (cache_elem->is_dup_ob == false)) { return true; } @@ -54,8 +54,9 @@ static bool gpencil_check_ob_duplicated(tGPencilObjectCache *cache_array, int gp return false; } -static bool gpencil_check_datablock_duplicated(tGPencilObjectCache *cache_array, int gp_cache_used, - Object *ob, bGPdata *gpd) +static bool gpencil_check_datablock_duplicated( + tGPencilObjectCache *cache_array, int gp_cache_used, + Object *ob, bGPdata *gpd) { if (gp_cache_used == 0) { return false; @@ -64,7 +65,7 @@ static bool gpencil_check_datablock_duplicated(tGPencilObjectCache *cache_array, for (int i = 0; i < gp_cache_used + 1; i++) { tGPencilObjectCache *cache_elem = &cache_array[i]; if (!STREQ(cache_elem->ob_name, ob->id.name) && - (cache_elem->gpd == gpd)) + (cache_elem->gpd == gpd)) { return true; } @@ -109,8 +110,9 @@ tGPencilObjectCache *gpencil_object_cache_add( copy_m4_m4(cache_elem->obmat, ob->obmat); cache_elem->idx = *gp_cache_used; - cache_elem->is_dup_onion = gpencil_check_datablock_duplicated(cache_array, *gp_cache_used, - ob, cache_elem->gpd); + cache_elem->is_dup_onion = gpencil_check_datablock_duplicated( + cache_array, *gp_cache_used, + ob, cache_elem->gpd); /* save FXs */ cache_elem->pixfactor = cache_elem->gpd->pixfactor; diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c index 16412dda3f8..858a20dbbc3 100644 --- a/source/blender/draw/engines/gpencil/gpencil_draw_utils.c +++ b/source/blender/draw/engines/gpencil/gpencil_draw_utils.c @@ -744,7 +744,7 @@ static void gpencil_draw_strokes( GpencilBatchCache *cache, GPENCIL_e_data *e_data, void *vedata, ToolSettings *ts, Object *ob, bGPdata *gpd, bGPDlayer *gpl, bGPDframe *src_gpf, bGPDframe *derived_gpf, const float opacity, const float tintcolor[4], - const bool custonion, tGPencilObjectCache *cache_ob) + const bool custonion, tGPencilObjectCache *cache_ob) { GPENCIL_PassList *psl = ((GPENCIL_Data *)vedata)->psl; GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; @@ -866,19 +866,19 @@ static void gpencil_draw_strokes( if ((fillgrp) && (!stl->storage->simplify_fill)) { gpencil_add_fill_shgroup( cache, fillgrp, ob, gpl, derived_gpf, gps, - tintcolor, false, custonion); + tintcolor, false, custonion); } /* stroke */ if (strokegrp) { gpencil_add_stroke_shgroup( cache, strokegrp, ob, gpl, derived_gpf, gps, - opacity, tintcolor, false, custonion); + opacity, tintcolor, false, custonion); } } /* edit points (only in edit mode and not play animation not render) */ if ((draw_ctx->obact == ob) && (src_gps) && - (!playing) && (!is_render) && (!cache_ob->is_dup_ob)) + (!playing) && (!is_render) && (!cache_ob->is_dup_ob)) { if (!stl->g_data->shgrps_edit_line) { stl->g_data->shgrps_edit_line = DRW_shgroup_create(e_data->gpencil_line_sh, psl->edit_pass); @@ -1156,8 +1156,9 @@ static void gpencil_draw_onionskins( } /* populate a datablock for multiedit (no onions, no modifiers) */ -void DRW_gpencil_populate_multiedit(GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob, - tGPencilObjectCache *cache_ob) +void DRW_gpencil_populate_multiedit( + GPENCIL_e_data *e_data, void *vedata, Scene *scene, Object *ob, + tGPencilObjectCache *cache_ob) { bGPdata *gpd = (bGPdata *)ob->data; bGPDframe *gpf = NULL; @@ -1204,9 +1205,9 @@ void DRW_gpencil_populate_multiedit(GPENCIL_e_data *e_data, void *vedata, Scene /* helper for populate a complete grease pencil datablock */ void DRW_gpencil_populate_datablock( - GPENCIL_e_data *e_data, void *vedata, - Scene *scene, Object *ob, - tGPencilObjectCache *cache_ob) + GPENCIL_e_data *e_data, void *vedata, + Scene *scene, Object *ob, + tGPencilObjectCache *cache_ob) { GPENCIL_StorageList *stl = ((GPENCIL_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); @@ -1246,7 +1247,7 @@ void DRW_gpencil_populate_datablock( gpl->runtime.derived_data = (GHash *)BLI_ghash_str_new(gpl->info); } - if (BLI_ghash_haskey(gpl->runtime.derived_data,ob->id.name)) { + if (BLI_ghash_haskey(gpl->runtime.derived_data, ob->id.name)) { derived_gpf = BLI_ghash_lookup(gpl->runtime.derived_data, ob->id.name); } else { @@ -1285,12 +1286,12 @@ void DRW_gpencil_populate_datablock( * with instances */ if ((!cache_ob->is_dup_onion) && (gpd->flag & GP_DATA_SHOW_ONIONSKINS) && - (do_onion) && (gpl->onion_flag & GP_LAYER_ONIONSKIN) && - ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)) && - (!cache_ob->is_dup_ob) && (orig_id->us <= 1)) + (do_onion) && (gpl->onion_flag & GP_LAYER_ONIONSKIN) && + ((!playing) || (gpd->onion_flag & GP_ONION_GHOST_ALWAYS)) && + (!cache_ob->is_dup_ob) && (orig_id->us <= 1)) { if (((!stl->storage->is_render) && (overlay)) || - ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS))) + ((stl->storage->is_render) && (gpd->onion_flag & GP_ONION_GHOST_ALWAYS))) { gpencil_draw_onionskins(cache, e_data, vedata, ob, gpd, gpl, gpf); } diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.c b/source/blender/draw/engines/gpencil/gpencil_engine.c index 90543c47c1b..bdca3a350cd 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.c +++ b/source/blender/draw/engines/gpencil/gpencil_engine.c @@ -517,8 +517,9 @@ static void gpencil_add_draw_data(void *vedata, Object *ob) /* save init shading group */ cache_ob->init_grp = stl->storage->shgroup_id; - DRW_gpencil_populate_datablock(&e_data, vedata, scene, ob, - cache_ob); + DRW_gpencil_populate_datablock( + &e_data, vedata, scene, ob, + cache_ob); /* save end shading group */ cache_ob->end_grp = stl->storage->shgroup_id - 1; @@ -527,7 +528,7 @@ static void gpencil_add_draw_data(void *vedata, Object *ob) /* FX passses */ cache_ob->has_fx = false; if ((!stl->storage->simplify_fx) && - (BKE_shaderfx_has_gpencil(ob))) + (BKE_shaderfx_has_gpencil(ob))) { cache_ob->has_fx = true; if ((!stl->storage->simplify_fx) && (!is_multiedit)) { @@ -590,9 +591,10 @@ void GPENCIL_cache_populate(void *vedata, Object *ob) MEM_SAFE_FREE(e_data.batch_grid); e_data.batch_grid = DRW_gpencil_get_grid(); - DRW_shgroup_call_add(stl->g_data->shgrps_grid, - e_data.batch_grid, - ob->obmat); + DRW_shgroup_call_add( + stl->g_data->shgrps_grid, + e_data.batch_grid, + ob->obmat); } } } @@ -740,13 +742,11 @@ void GPENCIL_draw_scene(void *ved) } /* Current buffer drawing */ - if ((!is_render) && (cache_ob->is_dup_ob == false)) - { + if ((!is_render) && (cache_ob->is_dup_ob == false)) { DRW_draw_pass(psl->drawing_pass); } /* fx passes */ - if (cache_ob->has_fx == true) - { + if (cache_ob->has_fx == true) { stl->storage->tonemapping = 0; DRW_gpencil_fx_draw(&e_data, vedata, cache_ob); } diff --git a/source/blender/draw/engines/gpencil/gpencil_engine.h b/source/blender/draw/engines/gpencil/gpencil_engine.h index 80a3df7bc54..eeec16838ec 100644 --- a/source/blender/draw/engines/gpencil/gpencil_engine.h +++ b/source/blender/draw/engines/gpencil/gpencil_engine.h @@ -291,12 +291,15 @@ typedef struct GpencilBatchCache { struct DRWShadingGroup *DRW_gpencil_shgroup_stroke_create( struct GPENCIL_e_data *e_data, struct GPENCIL_Data *vedata, struct DRWPass *pass, struct GPUShader *shader, struct Object *ob, struct bGPdata *gpd, struct MaterialGPencilStyle *gp_style, int id, bool onion); -void DRW_gpencil_populate_datablock(struct GPENCIL_e_data *e_data, void *vedata, - struct Scene *scene, - struct Object *ob, struct tGPencilObjectCache *cache_ob); -void DRW_gpencil_populate_buffer_strokes(struct GPENCIL_e_data *e_data, void *vedata, struct ToolSettings *ts, struct Object *ob); -void DRW_gpencil_populate_multiedit(struct GPENCIL_e_data *e_data, void *vedata, - struct Scene *scene, struct Object *ob, struct tGPencilObjectCache *cache_ob); +void DRW_gpencil_populate_datablock( + struct GPENCIL_e_data *e_data, void *vedata, + struct Scene *scene, + struct Object *ob, struct tGPencilObjectCache *cache_ob); +void DRW_gpencil_populate_buffer_strokes( + struct GPENCIL_e_data *e_data, void *vedata, struct ToolSettings *ts, struct Object *ob); +void DRW_gpencil_populate_multiedit( + struct GPENCIL_e_data *e_data, void *vedata, + struct Scene *scene, struct Object *ob, struct tGPencilObjectCache *cache_ob); void DRW_gpencil_triangulate_stroke_fill(struct bGPDstroke *gps); void DRW_gpencil_multisample_ensure(struct GPENCIL_Data *vedata, int rect_w, int rect_h); diff --git a/source/blender/draw/engines/workbench/workbench_render.c b/source/blender/draw/engines/workbench/workbench_render.c index 78064b04fcd..bdbf473ec2d 100644 --- a/source/blender/draw/engines/workbench/workbench_render.c +++ b/source/blender/draw/engines/workbench/workbench_render.c @@ -139,8 +139,7 @@ void workbench_render(WORKBENCH_Data *data, RenderEngine *engine, RenderLayer *r const bool deferred = (scene->display.shading.flag & V3D_SHADING_XRAY) == 0; - if (deferred) - { + if (deferred) { /* Init engine. */ workbench_deferred_engine_init(data); diff --git a/source/blender/draw/intern/DRW_render.h b/source/blender/draw/intern/DRW_render.h index 0812fe0bbe7..7c3701266c7 100644 --- a/source/blender/draw/intern/DRW_render.h +++ b/source/blender/draw/intern/DRW_render.h @@ -114,7 +114,7 @@ typedef char DRWViewportEmptyList; GPU_framebuffer_clear_color_depth(dfbl->multisample_fb, (const float[4]){0.0f}, 1.0f); \ DRW_stats_query_end(); \ } \ -} +} ((void)0) #define MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) { \ if (dfbl->multisample_fb != NULL) { \ diff --git a/source/blender/draw/intern/draw_anim_viz.c b/source/blender/draw/intern/draw_anim_viz.c index 7ddcb306cea..20da5e384eb 100644 --- a/source/blender/draw/intern/draw_anim_viz.c +++ b/source/blender/draw/intern/draw_anim_viz.c @@ -331,7 +331,7 @@ static void MPATH_draw_scene(void *vedata) return; } - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); DRW_draw_pass(psl->lines); DRW_draw_pass(psl->points); diff --git a/source/blender/draw/intern/draw_common.c b/source/blender/draw/intern/draw_common.c index 217ddd3154f..bfcf5f2511d 100644 --- a/source/blender/draw/intern/draw_common.c +++ b/source/blender/draw/intern/draw_common.c @@ -405,7 +405,7 @@ DRWShadingGroup *shgroup_instance_empty_axes(DRWPass *pass, struct GPUBatch *geo if (g_shaders.empty_axes_sh == NULL) { g_shaders.empty_axes_sh = DRW_shader_create( datatoc_object_empty_axes_vert_glsl, NULL, - datatoc_gpu_shader_flat_color_frag_glsl, NULL); + datatoc_gpu_shader_flat_color_frag_glsl, NULL); } DRW_shgroup_instance_format(g_formats.instance_sized, { diff --git a/source/blender/draw/modes/edit_armature_mode.c b/source/blender/draw/modes/edit_armature_mode.c index 9f97620adb6..02f208900e4 100644 --- a/source/blender/draw/modes/edit_armature_mode.c +++ b/source/blender/draw/modes/edit_armature_mode.c @@ -144,7 +144,7 @@ static void EDIT_ARMATURE_draw_scene(void *vedata) DRW_draw_pass(psl->bone_solid[0]); } - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); if (!stl->g_data->transparent_bones) { DRW_draw_pass(psl->bone_solid[0]); @@ -154,13 +154,13 @@ static void EDIT_ARMATURE_draw_scene(void *vedata) DRW_draw_pass(psl->bone_wire[0]); DRW_draw_pass(psl->relationship[0]); - MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl); if (!DRW_pass_is_empty(psl->bone_envelope[1]) || - !DRW_pass_is_empty(psl->bone_solid[1]) || - !DRW_pass_is_empty(psl->bone_outline[1]) || - !DRW_pass_is_empty(psl->bone_wire[1]) || - !DRW_pass_is_empty(psl->relationship[1])) + !DRW_pass_is_empty(psl->bone_solid[1]) || + !DRW_pass_is_empty(psl->bone_outline[1]) || + !DRW_pass_is_empty(psl->bone_wire[1]) || + !DRW_pass_is_empty(psl->relationship[1])) { if (DRW_state_is_fbo()) { GPU_framebuffer_bind(dfbl->default_fb); diff --git a/source/blender/draw/modes/edit_curve_mode.c b/source/blender/draw/modes/edit_curve_mode.c index c8b8f678ca6..568cf77677d 100644 --- a/source/blender/draw/modes/edit_curve_mode.c +++ b/source/blender/draw/modes/edit_curve_mode.c @@ -288,7 +288,7 @@ static void EDIT_CURVE_draw_scene(void *vedata) UNUSED_VARS(fbl); - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); /* Show / hide entire passes, swap framebuffers ... whatever you fancy */ /* diff --git a/source/blender/draw/modes/edit_lattice_mode.c b/source/blender/draw/modes/edit_lattice_mode.c index ca7903c555b..1347eb90473 100644 --- a/source/blender/draw/modes/edit_lattice_mode.c +++ b/source/blender/draw/modes/edit_lattice_mode.c @@ -229,7 +229,7 @@ static void EDIT_LATTICE_draw_scene(void *vedata) UNUSED_VARS(fbl); - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); /* Show / hide entire passes, swap framebuffers ... whatever you fancy */ /* diff --git a/source/blender/draw/modes/object_mode.c b/source/blender/draw/modes/object_mode.c index 5cf6ed96b55..af85cc7bb00 100644 --- a/source/blender/draw/modes/object_mode.c +++ b/source/blender/draw/modes/object_mode.c @@ -1635,7 +1635,7 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay /* Motion Tracking. */ MovieClip *clip = BKE_object_movieclip_get(scene, ob, false); - if ((v3d->flag2 & V3D_SHOW_RECONSTRUCTION) && (clip != NULL)){ + if ((v3d->flag2 & V3D_SHOW_RECONSTRUCTION) && (clip != NULL)) { BLI_assert(BLI_listbase_is_empty(&sgl->camera_path)); const bool is_select = DRW_state_is_select(); const bool is_solid_bundle = (v3d->bundle_drawtype == OB_EMPTY_SPHERE) && @@ -1668,7 +1668,7 @@ static void DRW_shgroup_camera(OBJECT_ShadingGroupList *sgl, Object *ob, ViewLay { float tracking_object_mat[4][4]; - if (tracking_object->flag & TRACKING_OBJECT_CAMERA){ + if (tracking_object->flag & TRACKING_OBJECT_CAMERA) { copy_m4_m4(tracking_object_mat, camera_mat); } else { @@ -2833,7 +2833,7 @@ static void OBJECT_draw_scene(void *vedata) // DRW_draw_pass(psl->bone_envelope); /* Never drawn in Object mode currently. */ - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); /* This needs to be drawn after the oultine */ DRW_draw_pass(stl->g_data->sgl.bone_solid); @@ -2907,10 +2907,10 @@ static void OBJECT_draw_scene(void *vedata) batch_camera_path_free(&stl->g_data->sgl.camera_path); if (!DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_solid) || - !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_wire) || - !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_outline) || - !DRW_pass_is_empty(stl->g_data->sgl_ghost.non_meshes) || - !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_axes)) + !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_wire) || + !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_outline) || + !DRW_pass_is_empty(stl->g_data->sgl_ghost.non_meshes) || + !DRW_pass_is_empty(stl->g_data->sgl_ghost.bone_axes)) { if (DRW_state_is_fbo()) { /* meh, late init to not request a depth buffer we won't use. */ diff --git a/source/blender/draw/modes/pose_mode.c b/source/blender/draw/modes/pose_mode.c index e6f81e78264..c9a31e616bb 100644 --- a/source/blender/draw/modes/pose_mode.c +++ b/source/blender/draw/modes/pose_mode.c @@ -285,7 +285,7 @@ static void POSE_draw_scene(void *vedata) DRW_draw_pass(psl->bone_solid[0]); } - MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_ENABLE(dfbl, dtxl); if (!transparent_bones) { DRW_draw_pass(psl->bone_solid[0]); @@ -295,13 +295,13 @@ static void POSE_draw_scene(void *vedata) DRW_draw_pass(psl->bone_wire[0]); DRW_draw_pass(psl->relationship[0]); - MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl) + MULTISAMPLE_SYNC_DISABLE(dfbl, dtxl); if (!DRW_pass_is_empty(psl->bone_envelope[1]) || - !DRW_pass_is_empty(psl->bone_solid[1]) || - !DRW_pass_is_empty(psl->bone_outline[1]) || - !DRW_pass_is_empty(psl->bone_wire[1]) || - !DRW_pass_is_empty(psl->relationship[1])) + !DRW_pass_is_empty(psl->bone_solid[1]) || + !DRW_pass_is_empty(psl->bone_outline[1]) || + !DRW_pass_is_empty(psl->bone_wire[1]) || + !DRW_pass_is_empty(psl->relationship[1])) { if (DRW_state_is_fbo()) { GPU_framebuffer_bind(dfbl->default_fb); diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c index a660eb1aa22..fc9cfc85bc5 100644 --- a/source/blender/editors/mask/mask_draw.c +++ b/source/blender/editors/mask/mask_draw.c @@ -460,7 +460,7 @@ static void mask_draw_curve_type(const bContext *C, MaskSpline *spline, float (* mask_color_active_tint(rgb_tmp, rgb_spline, is_active); rgba_uchar_to_float(colors, rgb_tmp); mask_color_active_tint(rgb_tmp, rgb_black, is_active); - rgba_uchar_to_float(colors+4, rgb_tmp); + rgba_uchar_to_float(colors + 4, rgb_tmp); immBindBuiltinProgram(GPU_SHADER_2D_LINE_DASHED_UNIFORM_COLOR); diff --git a/source/blender/editors/mesh/editmesh_extrude.c b/source/blender/editors/mesh/editmesh_extrude.c index 65665fd898c..c2a8ad7c3fe 100644 --- a/source/blender/editors/mesh/editmesh_extrude.c +++ b/source/blender/editors/mesh/editmesh_extrude.c @@ -1065,7 +1065,7 @@ static int edbm_dupli_extrude_cursor_invoke(bContext *C, wmOperator *op, const w float co1[2], co2[2]; if ((ED_view3d_project_float_object(vc.ar, eed->v1->co, co1, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) && - (ED_view3d_project_float_object(vc.ar, eed->v2->co, co2, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK)) + (ED_view3d_project_float_object(vc.ar, eed->v2->co, co2, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK)) { /* 2D rotate by 90d while adding. * (x, y) = (y, -x) diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 240336c0302..e20668e417f 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -848,7 +848,7 @@ void ED_screen_global_areas_refresh(wmWindow *win) if ((win->parent != NULL) || screen->temp) { if (win->global_areas.areabase.first) { screen->do_refresh = true; - BKE_screen_area_map_free(&win->global_areas); + BKE_screen_area_map_free(&win->global_areas); } return; } diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c index 55b9a561503..e3c089a813f 100644 --- a/source/blender/editors/space_outliner/outliner_dragdrop.c +++ b/source/blender/editors/space_outliner/outliner_dragdrop.c @@ -261,8 +261,8 @@ static bool parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event, co } else { for (ViewLayer *view_layer = scene->view_layers.first; - view_layer; - view_layer = view_layer->next) + view_layer; + view_layer = view_layer->next) { if (BKE_view_layer_base_find(view_layer, ob)) { return true; diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c index 10f96d3a22f..613c46803b9 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilinstance.c @@ -196,8 +196,9 @@ static void generate_geometry( MEM_SAFE_FREE(valid_strokes); } -static void bakeModifier(Main *UNUSED(bmain), Depsgraph *depsgraph, - GpencilModifierData *md, Object *ob) +static void bakeModifier( + Main *UNUSED(bmain), Depsgraph *depsgraph, + GpencilModifierData *md, Object *ob) { bGPdata *gpd = ob->data; diff --git a/source/blender/python/mathutils/mathutils_Matrix.c b/source/blender/python/mathutils/mathutils_Matrix.c index 3bd40cca5c6..6f4ff3216e7 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.c +++ b/source/blender/python/mathutils/mathutils_Matrix.c @@ -2353,8 +2353,8 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) if ((mat1->num_row != mat2->num_row) || (mat1->num_col != mat2->num_col)) { PyErr_SetString(PyExc_ValueError, - "matrix1 * matrix2: matrix1 number of rows/columns " - "and the matrix2 number of rows/columns must be the same"); + "matrix1 * matrix2: matrix1 number of rows/columns " + "and the matrix2 number of rows/columns must be the same"); return NULL; } @@ -2377,9 +2377,9 @@ static PyObject *Matrix_mul(PyObject *m1, PyObject *m2) } PyErr_Format(PyExc_TypeError, - "Element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); + "Element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); return NULL; } /*------------------------obj *= obj------------------------------ @@ -2406,17 +2406,17 @@ static PyObject *Matrix_imul(PyObject *m1, PyObject *m2) /* MATRIX *= MATRIX */ if ((mat1->num_row != mat2->num_row) || (mat1->num_col != mat2->num_col)) { PyErr_SetString(PyExc_ValueError, - "matrix1 *= matrix2: matrix1 number of rows/columns " - "and the matrix2 number of rows/columns must be the same"); + "matrix1 *= matrix2: matrix1 number of rows/columns " + "and the matrix2 number of rows/columns must be the same"); return NULL; } mul_vn_vn(mat1->matrix, mat2->matrix, mat1->num_col * mat1->num_row); #else PyErr_Format(PyExc_TypeError, - "Inplace element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); + "Inplace element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); return NULL; #endif } @@ -2426,9 +2426,9 @@ static PyObject *Matrix_imul(PyObject *m1, PyObject *m2) } else { PyErr_Format(PyExc_TypeError, - "Inplace element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); + "Inplace element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); return NULL; } @@ -2463,8 +2463,8 @@ static PyObject *Matrix_matmul(PyObject *m1, PyObject *m2) if (mat1->num_col != mat2->num_row) { PyErr_SetString(PyExc_ValueError, - "matrix1 * matrix2: matrix1 number of columns " - "and the matrix2 number of rows must be the same"); + "matrix1 * matrix2: matrix1 number of columns " + "and the matrix2 number of rows must be the same"); return NULL; } @@ -2503,9 +2503,9 @@ static PyObject *Matrix_matmul(PyObject *m1, PyObject *m2) } PyErr_Format(PyExc_TypeError, - "Matrix multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); + "Matrix multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); return NULL; } /*------------------------obj @= obj------------------------------ @@ -2532,8 +2532,8 @@ static PyObject *Matrix_imatmul(PyObject *m1, PyObject *m2) if (mat1->num_col != mat2->num_row) { PyErr_SetString(PyExc_ValueError, - "matrix1 * matrix2: matrix1 number of columns " - "and the matrix2 number of rows must be the same"); + "matrix1 * matrix2: matrix1 number of columns " + "and the matrix2 number of rows must be the same"); return NULL; } @@ -2554,9 +2554,9 @@ static PyObject *Matrix_imatmul(PyObject *m1, PyObject *m2) } else { PyErr_Format(PyExc_TypeError, - "Inplace matrix multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); + "Inplace matrix multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(m1)->tp_name, Py_TYPE(m2)->tp_name); return NULL; } diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index bb5983af535..db192167a29 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -868,7 +868,7 @@ static PyObject *Quaternion_mul(PyObject *q1, PyObject *q2) } PyErr_Format(PyExc_TypeError, - "Element-wise multiplication: " + "Element-wise multiplication: " "not supported between '%.200s' and '%.200s' types", Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; @@ -896,9 +896,9 @@ static PyObject *Quaternion_imul(PyObject *q1, PyObject *q2) mul_vn_vn(quat1->quat, quat2->quat, QUAT_SIZE); #else PyErr_Format(PyExc_TypeError, - "Inplace element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); + "Inplace element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; #endif } @@ -908,9 +908,9 @@ static PyObject *Quaternion_imul(PyObject *q1, PyObject *q2) } else { PyErr_Format(PyExc_TypeError, - "Element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); + "Element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; } @@ -948,9 +948,9 @@ static PyObject *Quaternion_matmul(PyObject *q1, PyObject *q2) if (vec2->size != 3) { PyErr_SetString(PyExc_ValueError, - "Vector multiplication: " - "only 3D vector rotations (with quats) " - "currently supported"); + "Vector multiplication: " + "only 3D vector rotations (with quats) " + "currently supported"); return NULL; } if (BaseMath_ReadCallback(vec2) == -1) { @@ -965,9 +965,9 @@ static PyObject *Quaternion_matmul(PyObject *q1, PyObject *q2) } PyErr_Format(PyExc_TypeError, - "Quaternion multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); + "Quaternion multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; } /*------------------------obj @= obj------------------------------ @@ -994,9 +994,9 @@ static PyObject *Quaternion_imatmul(PyObject *q1, PyObject *q2) } else { PyErr_Format(PyExc_TypeError, - "Inplace quaternion multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); + "Inplace quaternion multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(q1)->tp_name, Py_TYPE(q2)->tp_name); return NULL; } diff --git a/source/blender/python/mathutils/mathutils_Vector.c b/source/blender/python/mathutils/mathutils_Vector.c index dc05f463d22..860760d2b10 100644 --- a/source/blender/python/mathutils/mathutils_Vector.c +++ b/source/blender/python/mathutils/mathutils_Vector.c @@ -1712,8 +1712,8 @@ static PyObject *vector_mul_vec(VectorObject *vec1, VectorObject *vec2) float *tvec = PyMem_Malloc(vec1->size * sizeof(float)); if (tvec == NULL) { PyErr_SetString(PyExc_MemoryError, - "vec * vec: " - "problem allocating pointer space"); + "vec * vec: " + "problem allocating pointer space"); return NULL; } @@ -1766,7 +1766,7 @@ static PyObject *Vector_mul(PyObject *v1, PyObject *v2) } PyErr_Format(PyExc_TypeError, - "Element-wise multiplication: " + "Element-wise multiplication: " "not supported between '%.200s' and '%.200s' types", Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; @@ -1798,8 +1798,8 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) #ifdef USE_MATHUTILS_ELEM_MUL if (vec1->size != vec2->size) { PyErr_SetString(PyExc_ValueError, - "Vector multiplication: " - "vectors must have the same dimensions for this operation"); + "Vector multiplication: " + "vectors must have the same dimensions for this operation"); return NULL; } @@ -1807,9 +1807,9 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) mul_vn_vn(vec1->vec, vec2->vec, vec1->size); #else PyErr_Format(PyExc_TypeError, - "Inplace element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); + "Inplace element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; #endif } @@ -1818,9 +1818,9 @@ static PyObject *Vector_imul(PyObject *v1, PyObject *v2) } else { PyErr_Format(PyExc_TypeError, - "Inplace element-wise multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); + "Inplace element-wise multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } @@ -1852,8 +1852,8 @@ static PyObject *Vector_matmul(PyObject *v1, PyObject *v2) if (vec1 && vec2) { if (vec1->size != vec2->size) { PyErr_SetString(PyExc_ValueError, - "Vector multiplication: " - "vectors must have the same dimensions for this operation"); + "Vector multiplication: " + "vectors must have the same dimensions for this operation"); return NULL; } @@ -1883,18 +1883,18 @@ static PyObject *Vector_matmul(PyObject *v1, PyObject *v2) } PyErr_Format(PyExc_TypeError, - "Vector multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); + "Vector multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } static PyObject *Vector_imatmul(PyObject *v1, PyObject *v2) { PyErr_Format(PyExc_TypeError, - "Inplace vector multiplication: " - "not supported between '%.200s' and '%.200s' types", - Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); + "Inplace vector multiplication: " + "not supported between '%.200s' and '%.200s' types", + Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); return NULL; } -- cgit v1.2.3