Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/blenkernel/BKE_cdderivedmesh.h3
-rw-r--r--source/blender/blenkernel/BKE_image.h2
-rw-r--r--source/blender/blenkernel/BKE_paint.h12
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c5
-rw-r--r--source/blender/blenkernel/intern/image.c4
-rw-r--r--source/blender/blenkernel/intern/mask_rasterize.c9
-rw-r--r--source/blender/blenkernel/intern/object.c2
-rw-r--r--source/blender/blenkernel/intern/paint.c10
-rw-r--r--source/blender/blenlib/BLI_smallhash.h7
-rw-r--r--source/blender/blenlib/intern/smallhash.c12
-rw-r--r--source/blender/bmesh/tools/bmesh_decimate_collapse.c2
-rw-r--r--source/blender/editors/animation/anim_channels_defines.c8
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c6
-rw-r--r--source/blender/editors/include/ED_node.h2
-rw-r--r--source/blender/editors/include/ED_uvedit.h8
-rw-r--r--source/blender/editors/interface/interface.c2
-rw-r--r--source/blender/editors/mask/mask_intern.h6
-rw-r--r--source/blender/editors/mask/mask_select.c6
-rw-r--r--source/blender/editors/screen/screen_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c4
-rw-r--r--source/blender/editors/space_graph/graph_draw.c2
-rw-r--r--source/blender/editors/space_graph/graph_select.c2
-rw-r--r--source/blender/editors/space_image/image_ops.c2
-rw-r--r--source/blender/editors/space_node/node_add.c2
-rw-r--r--source/blender/editors/space_node/node_edit.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c12
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
27 files changed, 66 insertions, 72 deletions
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h
index 7006b2904ac..db06d190b73 100644
--- a/source/blender/blenkernel/BKE_cdderivedmesh.h
+++ b/source/blender/blenkernel/BKE_cdderivedmesh.h
@@ -46,9 +46,6 @@ struct Object;
struct DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces,
int numLoops, int numPolys);
-/*tests if a given DerivedMesh is a CDDM*/
-int CDDM_Check(struct DerivedMesh *dm);
-
/* creates a CDDerivedMesh from the given Mesh, this will reference the
* original data in Mesh, but it is safe to apply vertex coordinates or
* calculate normals as those functions will automatically create new
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index 3504f8c93a8..65540d78154 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -57,7 +57,7 @@ void BKE_image_free(struct Image *me);
void BKE_imbuf_stamp_info(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf);
void BKE_stamp_buf(struct Scene *scene, struct Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels);
-int BKE_imbuf_alpha_test(struct ImBuf *ibuf);
+bool BKE_imbuf_alpha_test(struct ImBuf *ibuf);
int BKE_imbuf_write_stamp(struct Scene *scene, struct Object *camera, struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
int BKE_imbuf_write(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf);
int BKE_imbuf_write_as(struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const short is_copy);
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 1d81dfefe65..60cb4792da0 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -103,14 +103,14 @@ void BKE_paint_brush_set(struct Paint *paint, struct Brush *br);
/* testing face select mode
* Texture paint could be removed since selected faces are not used
* however hiding faces is useful */
-int paint_facesel_test(struct Object *ob);
-int paint_vertsel_test(struct Object *ob);
+bool paint_facesel_test(struct Object *ob);
+bool paint_vertsel_test(struct Object *ob);
/* partial visibility */
-int paint_is_face_hidden(const struct MFace *f, const struct MVert *mvert);
-int paint_is_grid_face_hidden(const unsigned int *grid_hidden,
- int gridsize, int x, int y);
-int paint_is_bmesh_face_hidden(struct BMFace *f);
+bool paint_is_face_hidden(const struct MFace *f, const struct MVert *mvert);
+bool paint_is_grid_face_hidden(const unsigned int *grid_hidden,
+ int gridsize, int x, int y);
+bool paint_is_bmesh_face_hidden(struct BMFace *f);
/* paint masks */
float paint_grid_paint_mask(const struct GridPaintMask *gpm, unsigned level,
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 712f79c40a7..a34b6803413 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -1702,11 +1702,6 @@ static void cdDM_release(DerivedMesh *dm)
}
}
-int CDDM_Check(DerivedMesh *dm)
-{
- return dm && dm->getMinMax == cdDM_getMinMax;
-}
-
/**************** CDDM interface functions ****************/
static CDDerivedMesh *cdDM_create(const char *desc)
{
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index db4a639d91c..336656eed19 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1912,7 +1912,7 @@ void BKE_imbuf_stamp_info(Scene *scene, Object *camera, struct ImBuf *ibuf)
if (stamp_data.rendertime[0]) IMB_metadata_change_field(ibuf, "RenderTime", stamp_data.rendertime);
}
-int BKE_imbuf_alpha_test(ImBuf *ibuf)
+bool BKE_imbuf_alpha_test(ImBuf *ibuf)
{
int tot;
if (ibuf->rect_float) {
@@ -3025,7 +3025,7 @@ static ImBuf *image_get_cached_ibuf(Image *ima, ImageUser *iuser, int *frame_r,
return ibuf;
}
-BLI_INLINE int image_quick_test(Image *ima, ImageUser *iuser)
+BLI_INLINE bool image_quick_test(Image *ima, ImageUser *iuser)
{
if (ima == NULL)
return FALSE;
diff --git a/source/blender/blenkernel/intern/mask_rasterize.c b/source/blender/blenkernel/intern/mask_rasterize.c
index 546c3f9e94b..3ecca00e31b 100644
--- a/source/blender/blenkernel/intern/mask_rasterize.c
+++ b/source/blender/blenkernel/intern/mask_rasterize.c
@@ -324,10 +324,11 @@ static void maskrasterize_spline_differentiate_point_outset(float (*diff_feather
* - if not get the max radius to a corner of the bucket and see how close we
* are to any of the triangle edges.
*/
-static int layer_bucket_isect_test(MaskRasterLayer *layer, unsigned int face_index,
- const unsigned int bucket_x, const unsigned int bucket_y,
- const float bucket_size_x, const float bucket_size_y,
- const float bucket_max_rad_squared)
+static bool layer_bucket_isect_test(
+ MaskRasterLayer *layer, unsigned int face_index,
+ const unsigned int bucket_x, const unsigned int bucket_y,
+ const float bucket_size_x, const float bucket_size_y,
+ const float bucket_max_rad_squared)
{
unsigned int *face = layer->face_array[face_index];
float (*cos)[3] = layer->face_coords;
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 7329fe60d0f..6359c133886 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3504,7 +3504,7 @@ static Object *obrel_armature_find(Object *ob)
return ob_arm;
}
-static int obrel_list_test(Object *ob)
+static bool obrel_list_test(Object *ob)
{
return ob && !(ob->id.flag & LIB_DOIT);
}
diff --git a/source/blender/blenkernel/intern/paint.c b/source/blender/blenkernel/intern/paint.c
index 6bdfb22dc1a..690217a0779 100644
--- a/source/blender/blenkernel/intern/paint.c
+++ b/source/blender/blenkernel/intern/paint.c
@@ -265,7 +265,7 @@ void BKE_paint_brush_set(Paint *p, Brush *br)
}
/* are we in vertex paint or weight pain face select mode? */
-int paint_facesel_test(Object *ob)
+bool paint_facesel_test(Object *ob)
{
return ( (ob != NULL) &&
(ob->type == OB_MESH) &&
@@ -276,7 +276,7 @@ int paint_facesel_test(Object *ob)
}
/* are we in weight paint vertex select mode? */
-int paint_vertsel_test(Object *ob)
+bool paint_vertsel_test(Object *ob)
{
return ( (ob != NULL) &&
(ob->type == OB_MESH) &&
@@ -319,7 +319,7 @@ void BKE_paint_copy(Paint *src, Paint *tar)
/* returns non-zero if any of the face's vertices
* are hidden, zero otherwise */
-int paint_is_face_hidden(const MFace *f, const MVert *mvert)
+bool paint_is_face_hidden(const MFace *f, const MVert *mvert)
{
return ((mvert[f->v1].flag & ME_HIDE) ||
(mvert[f->v2].flag & ME_HIDE) ||
@@ -330,7 +330,7 @@ int paint_is_face_hidden(const MFace *f, const MVert *mvert)
/* returns non-zero if any of the corners of the grid
* face whose inner corner is at (x, y) are hidden,
* zero otherwise */
-int paint_is_grid_face_hidden(const unsigned int *grid_hidden,
+bool paint_is_grid_face_hidden(const unsigned int *grid_hidden,
int gridsize, int x, int y)
{
/* skip face if any of its corners are hidden */
@@ -341,7 +341,7 @@ int paint_is_grid_face_hidden(const unsigned int *grid_hidden,
}
/* Return TRUE if all vertices in the face are visible, FALSE otherwise */
-int paint_is_bmesh_face_hidden(BMFace *f)
+bool paint_is_bmesh_face_hidden(BMFace *f)
{
BMLoop *l_iter;
BMLoop *l_first;
diff --git a/source/blender/blenlib/BLI_smallhash.h b/source/blender/blenlib/BLI_smallhash.h
index 4f5446043da..ec7b27f6651 100644
--- a/source/blender/blenlib/BLI_smallhash.h
+++ b/source/blender/blenlib/BLI_smallhash.h
@@ -32,11 +32,6 @@
* \ingroup bli
*/
-/* a light stack-friendly hash library,
- * (it uses stack space for smallish hash tables) */
-
-/* based on a doubling non-chaining approach */
-
#include "BLI_compiler_attrs.h"
typedef struct {
@@ -66,7 +61,7 @@ void BLI_smallhash_release(SmallHash *hash) ATTR_NONNULL(1);
void BLI_smallhash_insert(SmallHash *hash, uintptr_t key, void *item) ATTR_NONNULL(1);
void BLI_smallhash_remove(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1);
void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
-int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1);
+bool BLI_smallhash_haskey(SmallHash *hash, uintptr_t key) ATTR_NONNULL(1);
int BLI_smallhash_count(SmallHash *hash) ATTR_NONNULL(1);
void *BLI_smallhash_iternext(SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
void *BLI_smallhash_iternew(SmallHash *hash, SmallHashIter *iter, uintptr_t *key) ATTR_NONNULL(1) ATTR_WARN_UNUSED_RESULT;
diff --git a/source/blender/blenlib/intern/smallhash.c b/source/blender/blenlib/intern/smallhash.c
index 9790ce1f0b4..b6924af5d8f 100644
--- a/source/blender/blenlib/intern/smallhash.c
+++ b/source/blender/blenlib/intern/smallhash.c
@@ -27,6 +27,11 @@
/** \file blender/blenlib/intern/smallhash.c
* \ingroup bli
+ *
+ * A light stack-friendly hash library, it uses stack space for smallish hash tables
+ * but falls back to heap memory once the stack limits reached.
+ *
+ * based on a doubling non-chaining approach
*/
#include <string.h>
@@ -35,6 +40,7 @@
#include "BLI_utildefines.h"
#include "BLI_smallhash.h"
+
#include "BLI_strict_flags.h"
/* SMHASH_CELL_UNUSED means this cell is inside a key series,
@@ -43,7 +49,7 @@
* no chance of anyone shoving INT32_MAX-2 into a *val pointer, I
* imagine. hopefully.
*
- * note: these have the SMHASH suffix because we may want to make them public.
+ * note: these have the SMHASH prefix because we may want to make them public.
*/
#define SMHASH_CELL_UNUSED ((void *)0x7FFFFFFF)
#define SMHASH_CELL_FREE ((void *)0x7FFFFFFD)
@@ -191,7 +197,7 @@ void *BLI_smallhash_lookup(SmallHash *hash, uintptr_t key)
}
-int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)
+bool BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)
{
unsigned int h = (unsigned int)(key);
unsigned int hoff = 1;
@@ -200,7 +206,7 @@ int BLI_smallhash_haskey(SmallHash *hash, uintptr_t key)
(hash->table[h % hash->size].val == SMHASH_CELL_UNUSED))
{
if (hash->table[h % hash->size].val == SMHASH_CELL_FREE) {
- return 0;
+ return false;
}
h = SMHASH_NEXT(h, hoff);
diff --git a/source/blender/bmesh/tools/bmesh_decimate_collapse.c b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
index 292978cd247..00915d60428 100644
--- a/source/blender/bmesh/tools/bmesh_decimate_collapse.c
+++ b/source/blender/bmesh/tools/bmesh_decimate_collapse.c
@@ -578,7 +578,7 @@ static void bm_edge_tag_disable(BMEdge *e)
}
}
-static int bm_edge_tag_test(BMEdge *e)
+static bool bm_edge_tag_test(BMEdge *e)
{
/* is the edge or one of its faces tagged? */
return (BM_elem_flag_test(e->v1, BM_ELEM_TAG) ||
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c
index 75363f4f567..4b807059e4a 100644
--- a/source/blender/editors/animation/anim_channels_defines.c
+++ b/source/blender/editors/animation/anim_channels_defines.c
@@ -149,9 +149,9 @@ static void acf_generic_dataexpand_backdrop(bAnimContext *ac, bAnimListElem *ale
}
/* helper method to test if group colors should be drawn */
-static short acf_show_channel_colors(bAnimContext *ac)
+static bool acf_show_channel_colors(bAnimContext *ac)
{
- short showGroupColors = 0;
+ bool showGroupColors = false;
if (ac->sl) {
switch (ac->spacetype) {
@@ -179,7 +179,7 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa
bAnimChannelType *acf = ANIM_channel_get_typeinfo(ale);
bActionGroup *grp = NULL;
short indent = (acf->get_indent_level) ? acf->get_indent_level(ac, ale) : 0;
- short showGroupColors = acf_show_channel_colors(ac);
+ bool showGroupColors = acf_show_channel_colors(ac);
if (ale->type == ANIMTYPE_FCURVE) {
FCurve *fcu = (FCurve *)ale->data;
@@ -751,7 +751,7 @@ static bAnimChannelType ACF_OBJECT =
static void acf_group_color(bAnimContext *ac, bAnimListElem *ale, float r_color[3])
{
bActionGroup *agrp = (bActionGroup *)ale->data;
- short showGroupColors = acf_show_channel_colors(ac);
+ bool showGroupColors = acf_show_channel_colors(ac);
if (showGroupColors && agrp->customCol) {
unsigned char cp[3];
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 2cf8d9c27af..462e0b527fe 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -153,7 +153,7 @@ enum {
/* minimum length of new segment before new point can be added */
#define MIN_EUCLIDEAN_PX (U.gp_euclideandist)
-static int gp_stroke_added_check(tGPsdata *p)
+static bool gp_stroke_added_check(tGPsdata *p)
{
return (p->gpf && p->gpf->strokes.last && p->flags & GP_PAINTFLAG_STROKEADDED);
}
@@ -196,7 +196,7 @@ static int gpencil_draw_poll(bContext *C)
}
/* check if projecting strokes into 3d-geometry in the 3D-View */
-static int gpencil_project_check(tGPsdata *p)
+static bool gpencil_project_check(tGPsdata *p)
{
bGPdata *gpd = p->gpd;
return ((gpd->sbuffer_sflag & GP_STROKE_3DSPACE) && (p->gpd->flag & (GP_DATA_DEPTH_VIEW | GP_DATA_DEPTH_STROKE)));
@@ -1791,7 +1791,7 @@ static int gpencil_draw_invoke(bContext *C, wmOperator *op, const wmEvent *event
}
/* gpencil modal operator stores area, which can be removed while using it (like fullscreen) */
-static int gpencil_area_exists(bContext *C, ScrArea *sa_test)
+static bool gpencil_area_exists(bContext *C, ScrArea *sa_test)
{
bScreen *sc = CTX_wm_screen(C);
return (BLI_findindex(&sc->areabase, sa_test) != -1);
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h
index de83df9cc05..2f4528c2c7f 100644
--- a/source/blender/editors/include/ED_node.h
+++ b/source/blender/editors/include/ED_node.h
@@ -98,7 +98,7 @@ int ED_node_is_texture(struct SpaceNode *snode);
void ED_node_shader_default(const struct bContext *C, struct ID *id);
void ED_node_composit_default(const struct bContext *C, struct Scene *scene);
void ED_node_texture_default(const struct bContext *C, struct Tex *tex);
-int ED_node_select_check(ListBase *lb);
+bool ED_node_select_check(ListBase *lb);
void ED_node_post_apply_transform(struct bContext *C, struct bNodeTree *ntree);
void ED_node_set_active(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node);
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index 735227ae9b5..572042a0150 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -53,10 +53,10 @@ void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
void ED_uvedit_assign_image(struct Main *bmain, struct Scene *scene, struct Object *obedit, struct Image *ima, struct Image *previma);
bool ED_uvedit_minmax(struct Scene *scene, struct Image *ima, struct Object *obedit, float min[2], float max[2]);
-int ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **ima, struct ImageUser **iuser, struct bNode **node);
+bool ED_object_get_active_image(struct Object *ob, int mat_nr, struct Image **ima, struct ImageUser **iuser, struct bNode **node);
void ED_object_assign_active_image(struct Main *bmain, struct Object *ob, int mat_nr, struct Image *ima);
-int ED_uvedit_test(struct Object *obedit);
+bool ED_uvedit_test(struct Object *obedit);
/* visibility and selection */
bool uvedit_face_visible_test(struct Scene *scene, struct Image *ima, struct BMFace *efa, struct MTexPoly *tf);
@@ -88,8 +88,8 @@ void uvedit_uv_select_enable(struct BMEditMesh *em, struct Scene *scene, struct
void uvedit_uv_select_disable(struct BMEditMesh *em, struct Scene *scene, struct BMLoop *l,
const int cd_loop_uv_offset);
-int ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima,
- const float co[2], float r_uv[2]);
+bool ED_uvedit_nearest_uv(struct Scene *scene, struct Object *obedit, struct Image *ima,
+ const float co[2], float r_uv[2]);
/* uvedit_unwrap_ops.c */
void ED_uvedit_live_unwrap_begin(struct Scene *scene, struct Object *obedit);
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 70292bb4e6b..e98a04fea37 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1188,7 +1188,7 @@ void uiDrawBlock(const bContext *C, uiBlock *block)
/**
* Check if the button is pushed, this is only meaningful for some button types.
*
- * \return (0 == UNSELECT), (1 == SELECT), (-1 == DO-NOHING)
+ * \return (0 == UNSELECT), (1 == SELECT), (-1 == DO-NOTHING)
*/
int ui_is_but_push_ex(uiBut *but, double *value)
{
diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h
index 51705aa5837..09ca2290781 100644
--- a/source/blender/editors/mask/mask_intern.h
+++ b/source/blender/editors/mask/mask_intern.h
@@ -96,9 +96,9 @@ void MASK_OT_select_linked(struct wmOperatorType *ot);
void MASK_OT_select_more(struct wmOperatorType *ot);
void MASK_OT_select_less(struct wmOperatorType *ot);
-int ED_mask_spline_select_check(struct MaskSpline *spline);
-int ED_mask_layer_select_check(struct MaskLayer *masklay);
-int ED_mask_select_check(struct Mask *mask);
+bool ED_mask_spline_select_check(struct MaskSpline *spline);
+bool ED_mask_layer_select_check(struct MaskLayer *masklay);
+bool ED_mask_select_check(struct Mask *mask);
void ED_mask_spline_select_set(struct MaskSpline *spline, const short do_select);
void ED_mask_layer_select_set(struct MaskLayer *masklay, const short do_select);
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index 613168e43a6..497aea27b26 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -55,7 +55,7 @@
#include "mask_intern.h" /* own include */
/* 'check' select */
-int ED_mask_spline_select_check(MaskSpline *spline)
+bool ED_mask_spline_select_check(MaskSpline *spline)
{
int i;
@@ -69,7 +69,7 @@ int ED_mask_spline_select_check(MaskSpline *spline)
return FALSE;
}
-int ED_mask_layer_select_check(MaskLayer *masklay)
+bool ED_mask_layer_select_check(MaskLayer *masklay)
{
MaskSpline *spline;
@@ -86,7 +86,7 @@ int ED_mask_layer_select_check(MaskLayer *masklay)
return FALSE;
}
-int ED_mask_select_check(Mask *mask)
+bool ED_mask_select_check(Mask *mask)
{
MaskLayer *masklay;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 9051b20a4d6..f9e366a2646 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -176,7 +176,7 @@ int ED_operator_objectmode(bContext *C)
}
-static int ed_spacetype_test(bContext *C, int type)
+static bool ed_spacetype_test(bContext *C, int type)
{
if (ED_operator_areaactive(C)) {
SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 9c9b8d84a21..70eb2619415 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -80,7 +80,7 @@
/* check if we can do partial updates and have them draw realtime
* (without rebuilding the 'derivedFinal') */
-static int vertex_paint_use_fast_update_check(Object *ob)
+static bool vertex_paint_use_fast_update_check(Object *ob)
{
DerivedMesh *dm = ob->derivedFinal;
@@ -97,7 +97,7 @@ static int vertex_paint_use_fast_update_check(Object *ob)
/* if the polygons from the mesh and the 'derivedFinal' match
* we can assume that no modifiers are applied and that its worth adding tessellated faces
* so 'vertex_paint_use_fast_update_check()' returns TRUE */
-static int vertex_paint_use_tessface_check(Object *ob, Mesh *me)
+static bool vertex_paint_use_tessface_check(Object *ob, Mesh *me)
{
DerivedMesh *dm = ob->derivedFinal;
diff --git a/source/blender/editors/space_graph/graph_draw.c b/source/blender/editors/space_graph/graph_draw.c
index 8b98f7ce5e6..5e7a5690acd 100644
--- a/source/blender/editors/space_graph/graph_draw.c
+++ b/source/blender/editors/space_graph/graph_draw.c
@@ -308,7 +308,7 @@ static void draw_fcurve_vertices(SpaceIpo *sipo, ARegion *ar, FCurve *fcu, short
/* Handles ---------------- */
-static int draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
+static bool draw_fcurve_handles_check(SpaceIpo *sipo, FCurve *fcu)
{
/* don't draw handle lines if handles are not to be shown */
if ( (sipo->flag & SIPO_NOHANDLES) || /* handles shouldn't be shown anywhere */
diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c
index 66054042305..6df6b6bf0ff 100644
--- a/source/blender/editors/space_graph/graph_select.c
+++ b/source/blender/editors/space_graph/graph_select.c
@@ -929,7 +929,7 @@ typedef enum eGraphVertIndex {
/* check if its ok to select a handle */
// XXX also need to check for int-values only?
-static int fcurve_handle_sel_check(SpaceIpo *sipo, BezTriple *bezt)
+static bool fcurve_handle_sel_check(SpaceIpo *sipo, BezTriple *bezt)
{
if (sipo->flag & SIPO_NOHANDLES) return 0;
if ((sipo->flag & SIPO_SELVHANDLESONLY) && BEZSELECTED(bezt) == 0) return 0;
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index c7a89811573..28027e74f13 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -2103,7 +2103,7 @@ void IMAGE_OT_invert(wmOperatorType *ot)
/********************* pack operator *********************/
-static int image_pack_test(bContext *C, wmOperator *op)
+static bool image_pack_test(bContext *C, wmOperator *op)
{
Image *ima = CTX_data_edit_image(C);
int as_png = RNA_boolean_get(op->ptr, "as_png");
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index 2f9f63575fe..a1b1b453ee0 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -100,7 +100,7 @@ bNode *node_add_node(const bContext *C, const char *idname, int type, float locx
}
/* ********************** Add reroute operator ***************** */
-static int add_reroute_intersect_check(bNodeLink *link, float mcoords[][2], int tot, float result[2])
+static bool add_reroute_intersect_check(bNodeLink *link, float mcoords[][2], int tot, float result[2])
{
float coord_array[NODE_LINK_RESOL + 1][2];
int i, b;
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index a1d5a1b9b81..d6e85457ae0 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -1255,7 +1255,7 @@ void NODE_OT_duplicate(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "keep_inputs", 0, "Keep Inputs", "Keep the input links to duplicated nodes");
}
-int ED_node_select_check(ListBase *lb)
+bool ED_node_select_check(ListBase *lb)
{
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index b5bcd8158e1..7c8a0f24f0b 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -91,7 +91,7 @@ static void uv_select_flush_from_tag_loop(SpaceImage *sima, Scene *scene, Object
/************************* state testing ************************/
-int ED_uvedit_test(Object *obedit)
+bool ED_uvedit_test(Object *obedit)
{
BMEditMesh *em;
int ret;
@@ -132,12 +132,12 @@ static int UNUSED_FUNCTION(ED_operator_uvmap_mesh) (bContext *C)
}
/**************************** object active image *****************************/
-static int is_image_texture_node(bNode *node)
+static bool is_image_texture_node(bNode *node)
{
return ELEM(node->type, SH_NODE_TEX_IMAGE, SH_NODE_TEX_ENVIRONMENT);
}
-int ED_object_get_active_image(Object *ob, int mat_nr, Image **ima, ImageUser **iuser, bNode **node_r)
+bool ED_object_get_active_image(Object *ob, int mat_nr, Image **ima, ImageUser **iuser, bNode **node_r)
{
Material *ma = give_current_material(ob, mat_nr);
bNode *node = (ma && ma->use_nodes) ? nodeGetActiveTexture(ma->nodetree) : NULL;
@@ -866,7 +866,7 @@ void uv_find_nearest_vert(Scene *scene, Image *ima, BMEditMesh *em,
}
}
-int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float co[2], float r_uv[2])
+bool ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float co[2], float r_uv[2])
{
BMEditMesh *em = BKE_editmesh_from_object(obedit);
BMFace *efa;
@@ -875,7 +875,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float c
MTexPoly *tf;
MLoopUV *luv;
float mindist, dist;
- int found = FALSE;
+ bool found = false;
const int cd_loop_uv_offset = CustomData_get_offset(&em->bm->ldata, CD_MLOOPUV);
const int cd_poly_tex_offset = CustomData_get_offset(&em->bm->pdata, CD_MTEXPOLY);
@@ -896,7 +896,7 @@ int ED_uvedit_nearest_uv(Scene *scene, Object *obedit, Image *ima, const float c
mindist = dist;
copy_v2_v2(r_uv, luv->uv);
- found = TRUE;
+ found = true;
}
}
}
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index 308c14814af..01086fad305 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -644,7 +644,7 @@ static void wm_operator_reports(bContext *C, wmOperator *op, int retval, int cal
/* this function is mainly to check that the rules for freeing
* an operator are kept in sync.
*/
-static int wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot)
+static bool wm_operator_register_check(wmWindowManager *wm, wmOperatorType *ot)
{
return wm && (wm->op_undo_depth == 0) && (ot->flag & OPTYPE_REGISTER);
}
@@ -1745,7 +1745,7 @@ static int wm_handler_fileselect_call(bContext *C, ListBase *handlers, wmEventHa
return action;
}
-static int handler_boundbox_test(wmEventHandler *handler, wmEvent *event)
+static bool handler_boundbox_test(wmEventHandler *handler, wmEvent *event)
{
if (handler->bbwin) {
if (handler->bblocal) {