diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
31 files changed, 127 insertions, 125 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 83e0d99bc6b..c59044d1fce 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -1444,9 +1444,9 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; #endif const bool do_final_wmcol = FALSE; - int do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol); + const bool do_init_wmcol = ((dataMask & CD_MASK_PREVIEW_MCOL) && (ob->mode & OB_MODE_WEIGHT_PAINT) && !do_final_wmcol); /* XXX Same as above... For now, only weights preview in WPaint mode. */ - const int do_mod_wmcol = do_init_wmcol; + const bool do_mod_wmcol = do_init_wmcol; VirtualModifierData virtualModifierData; @@ -1938,7 +1938,7 @@ float (*editbmesh_get_vertex_cos(BMEditMesh *em, int *numVerts_r))[3] return cos; } -int editbmesh_modifier_is_enabled(Scene *scene, ModifierData *md, DerivedMesh *dm) +bool editbmesh_modifier_is_enabled(Scene *scene, ModifierData *md, DerivedMesh *dm) { ModifierTypeInfo *mti = modifierType_getInfo(md->type); int required_mode = eModifierMode_Realtime | eModifierMode_Editmode; @@ -1965,9 +1965,9 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D int required_mode = eModifierMode_Realtime | eModifierMode_Editmode; int draw_flag = dm_drawflag_calc(scene->toolsettings); - // const int do_mod_mcol = true; // (ob->mode == OB_MODE_OBJECT); + // const bool do_mod_mcol = true; // (ob->mode == OB_MODE_OBJECT); #if 0 /* XXX Will re-enable this when we have global mod stack options. */ - const int do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; + const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol; #endif const bool do_final_wmcol = FALSE; const bool do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol); @@ -2697,7 +2697,8 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm) { float *verts[4], *tex_coords[4]; const int nr_verts = mface[f].v4 != 0 ? 4 : 3; - int i, is_degenerate; + bool is_degenerate; + int i; verts[0] = mvert[mface[f].v1].co; verts[1] = mvert[mface[f].v2].co; verts[2] = mvert[mface[f].v3].co; tex_coords[0] = mtface[f].uv[0]; tex_coords[1] = mtface[f].uv[1]; tex_coords[2] = mtface[f].uv[2]; @@ -2725,7 +2726,7 @@ void DM_calc_auto_bump_scale(DerivedMesh *dm) /* verify the winding is consistent */ if (is_degenerate == 0) { float prev_edge[2]; - int is_signed = 0; + bool is_signed = 0; sub_v2_v2v2(prev_edge, tex_coords[0], tex_coords[3]); i = 0; diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c index aea915b9ec4..8967df14b24 100644 --- a/source/blender/blenkernel/intern/action.c +++ b/source/blender/blenkernel/intern/action.c @@ -1007,7 +1007,7 @@ void BKE_pose_remove_group(Object *ob) /* ************** F-Curve Utilities for Actions ****************** */ /* Check if the given action has any keyframes */ -short action_has_motion(const bAction *act) +bool action_has_motion(const bAction *act) { FCurve *fcu; diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index c2ce779f03f..76f610c0d79 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -1020,7 +1020,7 @@ void scopes_update(Scopes *scopes, ImBuf *ibuf, const ColorManagedViewSettings * int savedlines, saveline; float rgba[4], ycc[3], luma; int ycc_mode = -1; - const short is_float = (ibuf->rect_float != NULL); + const bool is_float = (ibuf->rect_float != NULL); void *cache_handle = NULL; struct ColormanageProcessor *cm_processor = NULL; diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c index cba4b7e1ea2..c5979686afb 100644 --- a/source/blender/blenkernel/intern/curve.c +++ b/source/blender/blenkernel/intern/curve.c @@ -2524,7 +2524,7 @@ void BKE_curve_bevelList_make(Object *ob, ListBase *nurbs, bool for_render) struct BevelSort *sortdata, *sd, *sd1; int a, b, nr, poly, resolu = 0, len = 0; int do_tilt, do_radius, do_weight; - int is_editmode = 0; + bool is_editmode = false; ListBase *bev; /* this function needs an object, because of tflag and upflag */ @@ -4092,7 +4092,7 @@ bool BKE_curve_center_bounds(Curve *cu, float cent[3]) return false; } -void BKE_curve_translate(Curve *cu, float offset[3], int do_keys) +void BKE_curve_translate(Curve *cu, float offset[3], const bool do_keys) { ListBase *nurb_lb = BKE_curve_nurbs_get(cu); Nurb *nu; diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index 8aeacda8100..6ff27e50bf8 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -557,7 +557,7 @@ void defgroup_unique_name(bDeformGroup *dg, Object *ob) BLI_uniquename_cb(defgroup_unique_check, &data, DATA_("Group"), '.', dg->name, sizeof(dg->name)); } -static int is_char_sep(const char c) +static bool is_char_sep(const char c) { return ELEM4(c, '.', ' ', '-', '_'); } diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 0e3a15b114e..e60505a2245 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1988,7 +1988,7 @@ static void dag_object_time_update_flags(Main *bmain, Scene *scene, Object *ob) } /* recursively update objects in groups, each group is done at most once */ -static void dag_group_update_flags(Main *bmain, Scene *scene, Group *group, const short do_time) +static void dag_group_update_flags(Main *bmain, Scene *scene, Group *group, const bool do_time) { GroupObject *go; @@ -2007,7 +2007,7 @@ static void dag_group_update_flags(Main *bmain, Scene *scene, Group *group, cons /* flag all objects that need recalc, for changes in time for example */ /* do_time: make this optional because undo resets objects to their animated locations without this */ -void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const short do_time) +void DAG_scene_update_flags(Main *bmain, Scene *scene, unsigned int lay, const bool do_time) { Base *base; Object *ob; @@ -2160,7 +2160,7 @@ static void dag_group_on_visible_update(Group *group) } } -void DAG_on_visible_update(Main *bmain, const short do_time) +void DAG_on_visible_update(Main *bmain, const bool do_time) { ListBase listbase; DagSceneLayer *dsl; @@ -2228,7 +2228,7 @@ void DAG_on_visible_update(Main *bmain, const short do_time) static void dag_id_flush_update__isDependentTexture(void *userData, Object *UNUSED(ob), ID **idpoin) { - struct { ID *id; int is_dependent; } *data = userData; + struct { ID *id; bool is_dependent; } *data = userData; if (*idpoin && GS((*idpoin)->name) == ID_TE) { if (data->id == (*idpoin)) @@ -2286,7 +2286,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id) /* set flags based on textures - can influence depgraph via modifiers */ if (idtype == ID_TE) { for (obt = bmain->object.first; obt; obt = obt->id.next) { - struct { ID *id; int is_dependent; } data; + struct { ID *id; bool is_dependent; } data; data.id = id; data.is_dependent = 0; diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index ef4d199dbb2..98cac2f4721 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1461,7 +1461,7 @@ static void dynamicPaint_setInitialColor(Scene *scene, DynamicPaintSurface *surf PaintPoint *pPoint = (PaintPoint *)sData->type_data; DerivedMesh *dm = surface->canvas->dm; int i; - bool scene_color_manage = BKE_scene_check_color_management_enabled(scene); + const bool scene_color_manage = BKE_scene_check_color_management_enabled(scene); if (surface->type != MOD_DPAINT_SURFACE_T_PAINT) return; diff --git a/source/blender/blenkernel/intern/fcurve.c b/source/blender/blenkernel/intern/fcurve.c index 04765a74b77..c93181bd903 100644 --- a/source/blender/blenkernel/intern/fcurve.c +++ b/source/blender/blenkernel/intern/fcurve.c @@ -433,7 +433,7 @@ int binarysearch_bezt_index(BezTriple array[], float frame, int arraylen, bool * /* helper for calc_fcurve_* functions -> find first and last BezTriple to be used */ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple **last, - const short do_sel_only) + const bool do_sel_only) { short found = FALSE; @@ -482,12 +482,12 @@ static short get_fcurve_end_keyframes(FCurve *fcu, BezTriple **first, BezTriple /* Calculate the extents of F-Curve's data */ -short calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, - const short do_sel_only, const short include_handles) +bool calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, float *ymax, + const bool do_sel_only, const bool include_handles) { float xminv = 999999999.0f, xmaxv = -999999999.0f; float yminv = 999999999.0f, ymaxv = -999999999.0f; - short foundvert = FALSE; + bool foundvert = false; unsigned int i; if (fcu->totvert) { @@ -578,7 +578,7 @@ short calc_fcurve_bounds(FCurve *fcu, float *xmin, float *xmax, float *ymin, flo /* Calculate the extents of F-Curve's keyframes */ bool calc_fcurve_range(FCurve *fcu, float *start, float *end, - const short do_sel_only, const short do_min_length) + const bool do_sel_only, const bool do_min_length) { float min = 999999999.0f, max = -999999999.0f; short foundvert = FALSE; @@ -631,7 +631,7 @@ bool calc_fcurve_range(FCurve *fcu, float *start, float *end, * Usability of keyframes refers to whether they should be displayed, * and also whether they will have any influence on the final result. */ -short fcurve_are_keyframes_usable(FCurve *fcu) +bool fcurve_are_keyframes_usable(FCurve *fcu) { /* F-Curve must exist */ if (fcu == NULL) diff --git a/source/blender/blenkernel/intern/font.c b/source/blender/blenkernel/intern/font.c index 2f543dcbe09..c60c1ea2b5f 100644 --- a/source/blender/blenkernel/intern/font.c +++ b/source/blender/blenkernel/intern/font.c @@ -211,7 +211,7 @@ VFont *BKE_vfont_load(Main *bmain, const char *name) VFont *vfont = NULL; PackedFile *pf; PackedFile *temp_pf = NULL; - int is_builtin; + bool is_builtin; if (STREQ(name, FO_BUILTIN_NAME)) { BLI_strncpy(filename, name, sizeof(filename)); diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 322f09f48d5..55699bc0aae 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -561,7 +561,7 @@ void BKE_image_merge(Image *dest, Image *source) } /* note, we could be clever and scale all imbuf's but since some are mipmaps its not so simple */ -int BKE_image_scale(Image *image, int width, int height) +bool BKE_image_scale(Image *image, int width, int height) { ImBuf *ibuf; void *lock; @@ -1264,7 +1264,7 @@ char BKE_imtype_from_arg(const char *imtype_arg) else return R_IMF_IMTYPE_INVALID; } -static int do_add_image_extension(char *string, const char imtype, const ImageFormatData *im_format) +static bool do_add_image_extension(char *string, const char imtype, const ImageFormatData *im_format) { const char *extension = NULL; const char *extension_test; @@ -3149,7 +3149,7 @@ void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock) } /* checks whether there's an image buffer for given image and user */ -int BKE_image_has_ibuf(Image *ima, ImageUser *iuser) +bool BKE_image_has_ibuf(Image *ima, ImageUser *iuser) { ImBuf *ibuf; @@ -3284,7 +3284,7 @@ void BKE_image_pool_release_ibuf(Image *ima, ImBuf *ibuf, ImagePool *pool) } } -int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, short *r_is_in_range) +int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, bool *r_is_in_range) { const int len = (iuser->fie_ima * iuser->frames) / 2; @@ -3346,7 +3346,7 @@ int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, int fieldnr, shor void BKE_image_user_frame_calc(ImageUser *iuser, int cfra, int fieldnr) { if (iuser) { - short is_in_range; + bool is_in_range; const int framenr = BKE_image_user_frame_get(iuser, cfra, fieldnr, &is_in_range); if (is_in_range) { @@ -3404,7 +3404,7 @@ void BKE_image_user_file_path(ImageUser *iuser, Image *ima, char *filepath) BLI_path_abs(filepath, ID_BLEND_PATH(G.main, &ima->id)); } -int BKE_image_has_alpha(struct Image *image) +bool BKE_image_has_alpha(struct Image *image) { ImBuf *ibuf; void *lock; diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c index e01993d64d9..d2080b4922c 100644 --- a/source/blender/blenkernel/intern/key.c +++ b/source/blender/blenkernel/intern/key.c @@ -1558,7 +1558,7 @@ KeyBlock *BKE_keyblock_add(Key *key, const char *name) * \param name Optional name for the new keyblock. * \param do_force always use ctime even for relative keys. */ -KeyBlock *BKE_keyblock_add_ctime(Key *key, const char *name, const short do_force) +KeyBlock *BKE_keyblock_add_ctime(Key *key, const char *name, const bool do_force) { KeyBlock *kb = BKE_keyblock_add(key, name); diff --git a/source/blender/blenkernel/intern/lattice.c b/source/blender/blenkernel/intern/lattice.c index 525f9107a12..8b509c77155 100644 --- a/source/blender/blenkernel/intern/lattice.c +++ b/source/blender/blenkernel/intern/lattice.c @@ -620,7 +620,7 @@ static int calc_curve_deform(Object *par, float co[3], Curve *cu = par->data; float fac, loc[4], dir[3], new_quat[4], radius; short index; - const int is_neg_axis = (axis > 2); + const bool is_neg_axis = (axis > 2); /* to be sure, mostly after file load */ if (par->curve_cache->path == NULL) { @@ -711,7 +711,7 @@ void curve_deform_verts(Object *cuOb, Object *target, DerivedMesh *dm, float (*v int a; CurveDeform cd; int use_vgroups; - const int is_neg_axis = (defaxis > 2); + const bool is_neg_axis = (defaxis > 2); if (cuOb->type != OB_CURVE) return; @@ -1147,7 +1147,7 @@ void BKE_lattice_center_bounds(Lattice *lt, float cent[3]) mid_v3_v3v3(cent, min, max); } -void BKE_lattice_translate(Lattice *lt, float offset[3], int do_keys) +void BKE_lattice_translate(Lattice *lt, float offset[3], bool do_keys) { int i, numVerts; diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c index 131e383a8a2..33e758ed754 100644 --- a/source/blender/blenkernel/intern/mask.c +++ b/source/blender/blenkernel/intern/mask.c @@ -434,7 +434,7 @@ float BKE_mask_spline_project_co(MaskSpline *spline, MaskSplinePoint *point, /* point */ -int BKE_mask_point_has_handle(MaskSplinePoint *point) +bool BKE_mask_point_has_handle(MaskSplinePoint *point) { BezTriple *bezt = &point->bezt; @@ -671,7 +671,7 @@ void BKE_mask_point_add_uw(MaskSplinePoint *point, float u, float w) BKE_mask_point_sort_uw(point, &point->uw[point->tot_uw - 1]); } -void BKE_mask_point_select_set(MaskSplinePoint *point, const short do_select) +void BKE_mask_point_select_set(MaskSplinePoint *point, const bool do_select) { int i; @@ -692,7 +692,7 @@ void BKE_mask_point_select_set(MaskSplinePoint *point, const short do_select) } } -void BKE_mask_point_select_set_handle(MaskSplinePoint *point, const short do_select) +void BKE_mask_point_select_set_handle(MaskSplinePoint *point, const bool do_select) { if (do_select) { MASKPOINT_SEL_HANDLE(point); @@ -1298,7 +1298,7 @@ void BKE_mask_calc_handle_adjacent_interp(MaskSpline *spline, MaskSplinePoint *p * Useful for giving sane defaults. */ void BKE_mask_calc_handle_point_auto(MaskSpline *spline, MaskSplinePoint *point, - const short do_recalc_length) + const bool do_recalc_length) { MaskSplinePoint *point_prev, *point_next; const char h_back[2] = {point->bezt.h1, point->bezt.h2}; diff --git a/source/blender/blenkernel/intern/mask_evaluate.c b/source/blender/blenkernel/intern/mask_evaluate.c index f63d027d9f4..c6cc4a412b8 100644 --- a/source/blender/blenkernel/intern/mask_evaluate.c +++ b/source/blender/blenkernel/intern/mask_evaluate.c @@ -505,7 +505,7 @@ void BKE_mask_spline_feather_collapse_inner_loops(MaskSpline *spline, float (*fe static float (*mask_spline_feather_differentiated_points_with_resolution__even(MaskSpline *spline, unsigned int *tot_feather_point, const unsigned int resol, - const int do_feather_isect + const bool do_feather_isect ))[2] { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); @@ -578,7 +578,7 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__even(M static float (*mask_spline_feather_differentiated_points_with_resolution__double(MaskSpline *spline, unsigned int *tot_feather_point, const unsigned int resol, - const int do_feather_isect + const bool do_feather_isect ))[2] { MaskSplinePoint *points_array = BKE_mask_spline_point_array(spline); @@ -715,7 +715,7 @@ static float (*mask_spline_feather_differentiated_points_with_resolution__double float (*BKE_mask_spline_feather_differentiated_points_with_resolution(MaskSpline *spline, unsigned int *tot_feather_point, const unsigned int resol, - const int do_feather_isect + const bool do_feather_isect ))[2] { switch (spline->offset_mode) { diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c index 3ecca00e31b..6c46b9c7c5b 100644 --- a/source/blender/blenkernel/intern/mask_rasterize.c +++ b/source/blender/blenkernel/intern/mask_rasterize.c @@ -192,7 +192,7 @@ typedef struct MaskRasterSplineInfo { unsigned int vertex_total_cap_head; unsigned int vertex_total_cap_tail; - unsigned int is_cyclic; + bool is_cyclic; } MaskRasterSplineInfo; /** @@ -256,7 +256,7 @@ void BKE_maskrasterize_handle_free(MaskRasterHandle *mr_handle) static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather_points)[2], float (*diff_points)[2], const unsigned int tot_diff_point, const float ofs, - const short do_test) + const bool do_test) { unsigned int k_prev = tot_diff_point - 2; unsigned int k_curr = tot_diff_point - 1; @@ -558,8 +558,8 @@ static void layer_bucket_init(MaskRasterLayer *layer, const float pixel_size) void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mask, const int width, const int height, - const short do_aspect_correct, const short do_mask_aa, - const short do_feather) + const bool do_aspect_correct, const bool do_mask_aa, + const bool do_feather) { const rctf default_bounds = {0.0f, 1.0f, 0.0f, 1.0f}; const float pixel_size = 1.0f / (float)min_ii(width, height); @@ -613,8 +613,8 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas BLI_scanfill_begin_arena(&sf_ctx, sf_arena); for (spline = masklay->splines.first; spline; spline = spline->next) { - const unsigned int is_cyclic = (spline->flag & MASK_SPLINE_CYCLIC) != 0; - const unsigned int is_fill = (spline->flag & MASK_SPLINE_NOFILL) == 0; + const bool is_cyclic = (spline->flag & MASK_SPLINE_CYCLIC) != 0; + const bool is_fill = (spline->flag & MASK_SPLINE_NOFILL) == 0; float (*diff_points)[2]; unsigned int tot_diff_point; diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c index dfa0d30f536..4ea98650551 100644 --- a/source/blender/blenkernel/intern/movieclip.c +++ b/source/blender/blenkernel/intern/movieclip.c @@ -176,7 +176,7 @@ static void get_sequence_fname(MovieClip *clip, int framenr, char *name) } /* supposed to work with sequences only */ -static void get_proxy_fname(MovieClip *clip, int proxy_render_size, int undistorted, int framenr, char *name) +static void get_proxy_fname(MovieClip *clip, int proxy_render_size, bool undistorted, int framenr, char *name) { int size = rendersize_to_number(proxy_render_size); char dir[FILE_MAX], clipdir[FILE_MAX], clipfile[FILE_MAX]; @@ -482,7 +482,7 @@ static ImBuf *get_imbuf_cache(MovieClip *clip, MovieClipUser *user, int flag) return NULL; } -static int has_imbuf_cache(MovieClip *clip, MovieClipUser *user, int flag) +static bool has_imbuf_cache(MovieClip *clip, MovieClipUser *user, int flag) { if (clip->cache) { MovieClipImBufCacheKey key; @@ -1046,7 +1046,7 @@ ImBuf *BKE_movieclip_get_stable_ibuf(MovieClip *clip, MovieClipUser *user, float } -int BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user) +bool BKE_movieclip_has_frame(MovieClip *clip, MovieClipUser *user) { ImBuf *ibuf = BKE_movieclip_get_ibuf(clip, user); @@ -1290,7 +1290,7 @@ void BKE_movieclip_update_scopes(MovieClip *clip, MovieClipUser *user, MovieClip scopes->ok = TRUE; } -static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, int undistorted, bool threaded) +static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, int proxy_render_size, bool undistorted, bool threaded) { char name[FILE_MAX]; int quality, rectx, recty; @@ -1335,7 +1335,7 @@ static void movieclip_build_proxy_ibuf(MovieClip *clip, ImBuf *ibuf, int cfra, i * (meaning scaling shall be threaded) */ void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct MovieDistortion *distortion, - int cfra, int *build_sizes, int build_count, int undistorted) + int cfra, int *build_sizes, int build_count, bool undistorted) { ImBuf *ibuf; MovieClipUser user; @@ -1370,7 +1370,7 @@ void BKE_movieclip_build_proxy_frame(MovieClip *clip, int clip_flag, struct Movi * (different threads handles different frames, no threading within frame is needed) */ void BKE_movieclip_build_proxy_frame_for_ibuf(MovieClip *clip, ImBuf *ibuf, struct MovieDistortion *distortion, - int cfra, int *build_sizes, int build_count, int undistorted) + int cfra, int *build_sizes, int build_count, bool undistorted) { if (!build_count) return; @@ -1508,9 +1508,9 @@ ImBuf *BKE_movieclip_anim_ibuf_for_frame(MovieClip *clip, MovieClipUser *user) return ibuf; } -int BKE_movieclip_has_cached_frame(MovieClip *clip, MovieClipUser *user) +bool BKE_movieclip_has_cached_frame(MovieClip *clip, MovieClipUser *user) { - int has_frame = FALSE; + bool has_frame = false; BLI_lock_thread(LOCK_MOVIECLIP); has_frame = has_imbuf_cache(clip, user, clip->flag); @@ -1519,7 +1519,7 @@ int BKE_movieclip_has_cached_frame(MovieClip *clip, MovieClipUser *user) return has_frame; } -int BKE_movieclip_put_frame_if_possible(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf) +bool BKE_movieclip_put_frame_if_possible(MovieClip *clip, MovieClipUser *user, ImBuf *ibuf) { bool result; diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 2189fbd2f55..cba905ad487 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -899,7 +899,7 @@ static void multires_subdivide(MultiresModifierData *mmd, Object *ob, int totlvl CCGKey highGridKey, lowGridKey; CCGSubSurf *ss; int i, numGrids, highGridSize; - int has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); + const bool has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); /* create subsurf DM from original mesh at high level */ cddm = CDDM_from_mesh(me); @@ -1170,7 +1170,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm) CCGKey highGridKey, lowGridKey; CCGSubSurf *ss; int i, j, numGrids, highGridSize, lowGridSize; - int has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); + const bool has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); /* create subsurf DM from original mesh at high level */ if (ob->derivedDeform) cddm = CDDM_copy(ob->derivedDeform); @@ -1233,7 +1233,7 @@ void multires_modifier_update_mdisps(struct DerivedMesh *dm) } else { DerivedMesh *cddm, *subdm; - int has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); + const bool has_mask = CustomData_has_layer(&me->ldata, CD_GRID_PAINT_MASK); if (ob->derivedDeform) cddm = CDDM_copy(ob->derivedDeform); else cddm = CDDM_from_mesh(me); diff --git a/source/blender/blenkernel/intern/nla.c b/source/blender/blenkernel/intern/nla.c index 1fbc2432595..b2b20f82757 100644 --- a/source/blender/blenkernel/intern/nla.c +++ b/source/blender/blenkernel/intern/nla.c @@ -548,7 +548,7 @@ float BKE_nla_tweakedit_remap(AnimData *adt, float cframe, short mode) /* (these functions are used for NLA-Tracks and also for nested/meta-strips) */ /* Check if there is any space in the given list to add the given strip */ -short BKE_nlastrips_has_space(ListBase *strips, float start, float end) +bool BKE_nlastrips_has_space(ListBase *strips, float start, float end) { NlaStrip *strip; @@ -967,7 +967,7 @@ void BKE_nlatrack_set_active(ListBase *tracks, NlaTrack *nlt_a) } /* Check if there is any space in the given track to add a strip of the given length */ -short BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end) +bool BKE_nlatrack_has_space(NlaTrack *nlt, float start, float end) { /* sanity checks * - track must exist diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 02751e0cbb3..f058bbc5f78 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1478,7 +1478,7 @@ void BKE_node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, boo /* hack warning! this function is only used for shader previews, and * since it gets called multiple times per pixel for Ztransp we only * add the color once. Preview gets cleared before it starts render though */ -void BKE_node_preview_set_pixel(bNodePreview *preview, const float col[4], int x, int y, int do_manage) +void BKE_node_preview_set_pixel(bNodePreview *preview, const float col[4], int x, int y, bool do_manage) { if (preview) { if (x >= 0 && y >= 0) { diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index b8d4ef8167c..53eb24bb23f 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -3224,7 +3224,7 @@ void object_delete_ptcache(Object *ob, int index) /* shape key utility function */ /************************* Mesh ************************/ -static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, int from_mix) +static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, const bool from_mix) { Mesh *me = ob->data; Key *key = me->key; @@ -3256,7 +3256,7 @@ static KeyBlock *insert_meshkey(Scene *scene, Object *ob, const char *name, int return kb; } /************************* Lattice ************************/ -static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int from_mix) +static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, const bool from_mix) { Lattice *lt = ob->data; Key *key = lt->key; @@ -3294,7 +3294,7 @@ static KeyBlock *insert_lattkey(Scene *scene, Object *ob, const char *name, int return kb; } /************************* Curve ************************/ -static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int from_mix) +static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, const bool from_mix) { Curve *cu = ob->data; Key *key = cu->key; @@ -3334,7 +3334,7 @@ static KeyBlock *insert_curvekey(Scene *scene, Object *ob, const char *name, int return kb; } -KeyBlock *BKE_object_insert_shape_key(Scene *scene, Object *ob, const char *name, int from_mix) +KeyBlock *BKE_object_insert_shape_key(Scene *scene, Object *ob, const char *name, const bool from_mix) { switch (ob->type) { case OB_MESH: diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c index 0874d34b25d..dd9f1a268b2 100644 --- a/source/blender/blenkernel/intern/object_dupli.c +++ b/source/blender/blenkernel/intern/object_dupli.c @@ -838,7 +838,7 @@ static void make_duplis_particle_system(const DupliContext *ctx, ParticleSystem float (*obmat)[4]; int a, b, hair = 0; int totpart, totchild, totgroup = 0 /*, pa_num */; - int dupli_type_hack = !BKE_scene_use_new_shading_nodes(scene); + const bool dupli_type_hack = !BKE_scene_use_new_shading_nodes(scene); int no_draw_flag = PARS_UNEXIST; diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index 76ac13963a9..cb7c7c636c8 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -880,12 +880,12 @@ static void BKE_pbvh_search_callback_occluded(PBVH *bvh, } } -static int update_search_cb(PBVHNode *node, void *data_v) +static bool update_search_cb(PBVHNode *node, void *data_v) { int flag = GET_INT_FROM_POINTER(data_v); if (node->flag & PBVH_Leaf) - return (node->flag & flag); + return (node->flag & flag) != 0; return 1; } @@ -1362,7 +1362,7 @@ typedef struct { int original; } RaycastData; -static int ray_aabb_intersect(PBVHNode *node, void *data_v) +static bool ray_aabb_intersect(PBVHNode *node, void *data_v) { RaycastData *rcd = data_v; float bb_min[3], bb_max[3]; @@ -1387,11 +1387,11 @@ void BKE_pbvh_raycast(PBVH *bvh, BKE_pbvh_HitOccludedCallback cb, void *data, BKE_pbvh_search_callback_occluded(bvh, ray_aabb_intersect, &rcd, cb, data); } -int ray_face_intersection(const float ray_start[3], - const float ray_normal[3], - const float *t0, const float *t1, - const float *t2, const float *t3, - float *fdist) +bool ray_face_intersection(const float ray_start[3], + const float ray_normal[3], + const float t0[3], const float t1[3], + const float t2[3], const float t3[3], + float *fdist) { float dist; @@ -1406,14 +1406,15 @@ int ray_face_intersection(const float ray_start[3], } } -static int pbvh_faces_node_raycast(PBVH *bvh, const PBVHNode *node, - float (*origco)[3], - const float ray_start[3], - const float ray_normal[3], float *dist) +static bool pbvh_faces_node_raycast(PBVH *bvh, const PBVHNode *node, + float (*origco)[3], + const float ray_start[3], + const float ray_normal[3], float *dist) { const MVert *vert = bvh->verts; const int *faces = node->prim_indices; - int i, hit = 0, totface = node->totprim; + int i, totface = node->totprim; + bool hit = false; for (i = 0; i < totface; ++i) { const MFace *f = bvh->faces + faces[i]; @@ -1501,7 +1502,7 @@ int BKE_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3], int use const float ray_start[3], const float ray_normal[3], float *dist) { - int hit = 0; + bool hit = false; if (node->flag & PBVH_FullyHidden) return 0; @@ -1641,7 +1642,7 @@ static PlaneAABBIsect test_planes_aabb(const float bb_min[3], return ret; } -int BKE_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data) +bool BKE_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data) { float bb_min[3], bb_max[3]; @@ -1649,7 +1650,7 @@ int BKE_pbvh_node_planes_contain_AABB(PBVHNode *node, void *data) return test_planes_aabb(bb_min, bb_max, data) != ISECT_OUTSIDE; } -int BKE_pbvh_node_planes_exclude_AABB(PBVHNode *node, void *data) +bool BKE_pbvh_node_planes_exclude_AABB(PBVHNode *node, void *data) { float bb_min[3], bb_max[3]; @@ -1788,7 +1789,7 @@ void BKE_pbvh_apply_vertCos(PBVH *pbvh, float (*vertCos)[3]) } } -int BKE_pbvh_isDeformed(PBVH *pbvh) +bool BKE_pbvh_isDeformed(PBVH *pbvh) { return pbvh->deformed; } @@ -1911,7 +1912,7 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node, vi->vmask = CustomData_get_layer(bvh->vdata, CD_PAINT_MASK); } -void pbvh_show_diffuse_color_set(PBVH *bvh, int show_diffuse_color) +void pbvh_show_diffuse_color_set(PBVH *bvh, bool show_diffuse_color) { bvh->show_diffuse_color = show_diffuse_color; } diff --git a/source/blender/blenkernel/intern/pbvh_intern.h b/source/blender/blenkernel/intern/pbvh_intern.h index bd72b0339c7..d4cd6bcf9d8 100644 --- a/source/blender/blenkernel/intern/pbvh_intern.h +++ b/source/blender/blenkernel/intern/pbvh_intern.h @@ -154,9 +154,9 @@ struct PBVH { #endif /* flag are verts/faces deformed */ - int deformed; + bool deformed; - int show_diffuse_color; + bool show_diffuse_color; /* Dynamic topology */ BMesh *bm; @@ -175,9 +175,9 @@ void BB_expand_with_bb(BB *bb, BB *bb2); void BBC_update_centroid(BBC *bbc); int BB_widest_axis(const BB *bb); void pbvh_grow_nodes(PBVH *bvh, int totnode); -int ray_face_intersection(const float ray_start[3], const float ray_normal[3], - const float *t0, const float *t1, const float *t2, - const float *t3, float *fdist); +bool ray_face_intersection(const float ray_start[3], const float ray_normal[3], + const float *t0, const float *t1, const float *t2, + const float *t3, float *fdist); void pbvh_update_BB_redraw(PBVH *bvh, PBVHNode **nodes, int totnode, int flag); /* pbvh_bmesh.c */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index 975e06467d4..936f76765c2 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -744,7 +744,7 @@ void BKE_scene_unlink(Main *bmain, Scene *sce, Scene *newsce) int BKE_scene_base_iter_next(EvaluationContext *eval_ctx, SceneBaseIter *iter, Scene **scene, int val, Base **base, Object **ob) { - int run_again = 1; + bool run_again = true; /* init */ if (val == 0) { @@ -1671,7 +1671,7 @@ SceneRenderLayer *BKE_scene_add_render_layer(Scene *sce, const char *name) return srl; } -int BKE_scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl) +bool BKE_scene_remove_render_layer(Main *bmain, Scene *scene, SceneRenderLayer *srl) { const int act = BLI_findindex(&scene->r.layers, srl); Scene *sce; @@ -1766,7 +1766,7 @@ Base *_setlooper_base_step(Scene **sce_iter, Base *base) return NULL; } -int BKE_scene_use_new_shading_nodes(Scene *scene) +bool BKE_scene_use_new_shading_nodes(Scene *scene) { RenderEngineType *type = RE_engines_find(scene->r.engine); return (type && type->flag & RE_USE_SHADING_NODES); @@ -1810,12 +1810,12 @@ void BKE_scene_disable_color_management(Scene *scene) } } -int BKE_scene_check_color_management_enabled(const Scene *scene) +bool BKE_scene_check_color_management_enabled(const Scene *scene) { return strcmp(scene->display_settings.display_device, "None") != 0; } -int BKE_scene_check_rigidbody_active(const Scene *scene) +bool BKE_scene_check_rigidbody_active(const Scene *scene) { return scene && scene->rigidbody_world && scene->rigidbody_world->group && !(scene->rigidbody_world->flag & RBW_FLAG_MUTED); } diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index b261ad5686b..58d4a2acf33 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -176,7 +176,7 @@ static void seq_free_strip(Strip *strip) } /* only give option to skip cache locally (static func) */ -static void BKE_sequence_free_ex(Scene *scene, Sequence *seq, const int do_cache) +static void BKE_sequence_free_ex(Scene *scene, Sequence *seq, const bool do_cache) { if (seq->strip) seq_free_strip(seq->strip); @@ -752,7 +752,7 @@ void BKE_sequence_calc(Scene *scene, Sequence *seq) } /* note: caller should run BKE_sequence_calc(scene, seq) after */ -void BKE_sequence_reload_new_file(Scene *scene, Sequence *seq, int lock_range) +void BKE_sequence_reload_new_file(Scene *scene, Sequence *seq, const bool lock_range) { char str[FILE_MAX]; int prev_startdisp = 0, prev_enddisp = 0; @@ -1925,7 +1925,7 @@ int BKE_sequencer_input_have_to_preprocess(const SeqRenderData *UNUSED(context), } static ImBuf *input_preprocess(const SeqRenderData *context, Sequence *seq, float cfra, ImBuf *ibuf, - int is_proxy_image, int is_preprocessed) + const bool is_proxy_image, const bool is_preprocessed) { Scene *scene = context->scene; float mul; @@ -2457,11 +2457,11 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq * -jahka */ - const short is_rendering = G.is_rendering; - const short is_background = G.background; - const int do_seq_gl = is_rendering ? - 0 /* (context->scene->r.seq_flag & R_SEQ_GL_REND) */ : - (context->scene->r.seq_flag & R_SEQ_GL_PREV); + const bool is_rendering = G.is_rendering; + const bool is_background = G.background; + const bool do_seq_gl = is_rendering ? + 0 /* (context->scene->r.seq_flag & R_SEQ_GL_REND) */ : + (context->scene->r.seq_flag & R_SEQ_GL_PREV) != 0; int do_seq; // int have_seq = FALSE; /* UNUSED */ int have_comp = FALSE; @@ -2756,12 +2756,12 @@ static ImBuf *do_render_strip_uncached(const SeqRenderData *context, Sequence *s static ImBuf *seq_render_strip(const SeqRenderData *context, Sequence *seq, float cfra) { ImBuf *ibuf = NULL; - int use_preprocess = FALSE; - int is_proxy_image = FALSE; + bool use_preprocess = false; + bool is_proxy_image = false; float nr = give_stripelem_index(seq, cfra); /* all effects are handled similarly with the exception of speed effect */ int type = (seq->type & SEQ_TYPE_EFFECT && seq->type != SEQ_TYPE_SPEED) ? SEQ_TYPE_EFFECT : seq->type; - int is_preprocessed = !ELEM3(type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SCENE); + bool is_preprocessed = !ELEM3(type, SEQ_TYPE_IMAGE, SEQ_TYPE_MOVIE, SEQ_TYPE_SCENE); ibuf = BKE_sequencer_cache_get(context, seq, cfra, SEQ_STRIPELEM_IBUF); diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c index 74771378e9c..dce82f9cbc4 100644 --- a/source/blender/blenkernel/intern/shrinkwrap.c +++ b/source/blender/blenkernel/intern/shrinkwrap.c @@ -51,11 +51,11 @@ #include "BKE_lattice.h" #include "BKE_deform.h" -#include "BKE_mesh.h" #include "BKE_subsurf.h" -#include "BKE_mesh.h" #include "BKE_editmesh.h" +#include "BLI_strict_flags.h" + /* for timing... */ #if 0 # include "PIL_time.h" @@ -281,7 +281,6 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for int i; /* Options about projection direction */ - const char use_normal = calc->smd->shrinkOpts; const float proj_limit_squared = calc->smd->projLimit * calc->smd->projLimit; float proj_axis[3] = {0.0f, 0.0f, 0.0f}; @@ -300,7 +299,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for /* If the user doesn't allows to project in any direction of projection axis * then theres nothing todo. */ - if ((use_normal & (MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR | MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR)) == 0) + if ((calc->smd->shrinkOpts & (MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR | MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR)) == 0) return; @@ -370,7 +369,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for hit.dist = 10000.0f; /* TODO: we should use FLT_MAX here, but sweepsphere code isn't prepared for that */ /* Project over positive direction of axis */ - if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) { + if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR) { if (auxData.tree) { BKE_shrinkwrap_project_normal(0, tmp_co, tmp_no, @@ -384,7 +383,7 @@ static void shrinkwrap_calc_normal_projection(ShrinkwrapCalcData *calc, bool for } /* Project over negative direction of axis */ - if (use_normal & MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR) { + if (calc->smd->shrinkOpts & MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR) { float inv_no[3]; negate_v3_v3(inv_no, tmp_no); diff --git a/source/blender/blenkernel/intern/text.c b/source/blender/blenkernel/intern/text.c index 145f832063a..7fea20a14e2 100644 --- a/source/blender/blenkernel/intern/text.c +++ b/source/blender/blenkernel/intern/text.c @@ -1230,7 +1230,7 @@ void txt_order_cursors(Text *text, const bool reverse) } } -int txt_has_sel(Text *text) +bool txt_has_sel(Text *text) { return ((text->curl != text->sell) || (text->curc != text->selc)); } @@ -3010,7 +3010,7 @@ int text_check_bracket(const char ch) } /* TODO, have a function for operators - http://docs.python.org/py3k/reference/lexical_analysis.html#operators */ -int text_check_delim(const char ch) +bool text_check_delim(const char ch) { int a; char delims[] = "():\"\' ~!%^&*-+=[]{};/<>|.#\t,@"; @@ -3022,14 +3022,14 @@ int text_check_delim(const char ch) return 0; } -int text_check_digit(const char ch) +bool text_check_digit(const char ch) { if (ch < '0') return 0; if (ch <= '9') return 1; return 0; } -int text_check_identifier(const char ch) +bool text_check_identifier(const char ch) { if (ch < '0') return 0; if (ch <= '9') return 1; @@ -3040,7 +3040,7 @@ int text_check_identifier(const char ch) return 0; } -int text_check_identifier_nodigit(const char ch) +bool text_check_identifier_nodigit(const char ch) { if (ch <= '9') return 0; if (ch < 'A') return 0; @@ -3051,18 +3051,18 @@ int text_check_identifier_nodigit(const char ch) } #ifndef WITH_PYTHON -int text_check_identifier_unicode(const unsigned int ch) +bool text_check_identifier_unicode(const unsigned int ch) { return (ch < 255 && text_check_identifier((char)ch)); } -int text_check_identifier_nodigit_unicode(const unsigned int ch) +bool text_check_identifier_nodigit_unicode(const unsigned int ch) { return (ch < 255 && text_check_identifier_nodigit((char)ch)); } #endif /* WITH_PYTHON */ -int text_check_whitespace(const char ch) +bool text_check_whitespace(const char ch) { if (ch == ' ' || ch == '\t' || ch == '\r' || ch == '\n') return 1; diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c index 786a490fa10..d192ca71c12 100644 --- a/source/blender/blenkernel/intern/texture.c +++ b/source/blender/blenkernel/intern/texture.c @@ -253,7 +253,7 @@ ColorBand *add_colorband(bool rangetype) /* ------------------------------------------------------------------------- */ -int do_colorband(const ColorBand *coba, float in, float out[4]) +bool do_colorband(const ColorBand *coba, float in, float out[4]) { const CBData *cbd1, *cbd2, *cbd0, *cbd3; float fac, mfac, t[4]; diff --git a/source/blender/blenkernel/intern/tracking_region_tracker.c b/source/blender/blenkernel/intern/tracking_region_tracker.c index 491a35602bd..6a274921d44 100644 --- a/source/blender/blenkernel/intern/tracking_region_tracker.c +++ b/source/blender/blenkernel/intern/tracking_region_tracker.c @@ -94,7 +94,8 @@ static void track_context_free(void *customdata) * for thread-safe tracking, allowing clip modifications during * tracking. */ -MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *user, short backwards, short sequence) +MovieTrackingContext *BKE_tracking_context_new(MovieClip *clip, MovieClipUser *user, + const bool backwards, const bool sequence) { MovieTrackingContext *context = MEM_callocN(sizeof(MovieTrackingContext), "trackingContext"); MovieTracking *tracking = &clip->tracking; diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index a26b579f5e5..ed32750e402 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -423,7 +423,7 @@ static size_t unit_as_string(char *str, int len_max, double value, int prec, bUn /* Used for drawing number buttons, try keep fast. * Return the length of the generated string. */ -size_t bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, int split, bool pad) +size_t bUnit_AsString(char *str, int len_max, double value, int prec, int system, int type, bool split, bool pad) { bUnitCollection *usys = unit_get_system(system, type); diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 541d10637d5..ddd6780b0e9 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1596,7 +1596,7 @@ void BKE_ffmpeg_codec_settings_verify(RenderData *rd) ffmpeg_set_expert_options(rd); } -int BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd) +bool BKE_ffmpeg_alpha_channel_is_supported(RenderData *rd) { int codec = rd->ffcodecdata.codec; |