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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-02 12:47:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-02 12:51:31 +0300
commitb88e51dd55c62bdc160f33f9b2ae1727a892560a (patch)
treec9b9e00d51be18250df443c47ad31b1341a50f01
parentbfbfb1c47e8c60732f45638513ed7e39bedc730a (diff)
Cleanup: use bool for poll functions
-rw-r--r--source/blender/blenkernel/BKE_node.h8
-rw-r--r--source/blender/blenkernel/BKE_screen.h4
-rw-r--r--source/blender/blenkernel/intern/node.c6
-rw-r--r--source/blender/editors/animation/anim_channels_edit.c10
-rw-r--r--source/blender/editors/animation/anim_markers.c6
-rw-r--r--source/blender/editors/animation/anim_ops.c2
-rw-r--r--source/blender/editors/animation/drivers.c2
-rw-r--r--source/blender/editors/animation/keyframing.c2
-rw-r--r--source/blender/editors/animation/keyingsets.c6
-rw-r--r--source/blender/editors/armature/armature_select.c2
-rw-r--r--source/blender/editors/armature/editarmature_sketch.c10
-rw-r--r--source/blender/editors/armature/pose_edit.c4
-rw-r--r--source/blender/editors/armature/pose_lib.c6
-rw-r--r--source/blender/editors/armature/pose_select.c2
-rw-r--r--source/blender/editors/curve/editcurve.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_brush.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_convert.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_data.c6
-rw-r--r--source/blender/editors/gpencil/gpencil_edit.c16
-rw-r--r--source/blender/editors/gpencil/gpencil_intern.h12
-rw-r--r--source/blender/editors/gpencil/gpencil_interpolate.c4
-rw-r--r--source/blender/editors/gpencil/gpencil_ops.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_paint.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_select.c2
-rw-r--r--source/blender/editors/gpencil/gpencil_utils.c10
-rw-r--r--source/blender/editors/include/ED_armature.h6
-rw-r--r--source/blender/editors/include/ED_clip.h10
-rw-r--r--source/blender/editors/include/ED_image.h4
-rw-r--r--source/blender/editors/include/ED_keyframing.h2
-rw-r--r--source/blender/editors/include/ED_physics.h6
-rw-r--r--source/blender/editors/include/ED_screen.h108
-rw-r--r--source/blender/editors/include/ED_sequencer.h4
-rw-r--r--source/blender/editors/include/ED_transverts.h2
-rw-r--r--source/blender/editors/include/ED_view3d.h2
-rw-r--r--source/blender/editors/include/UI_interface.h2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_color.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_colorband.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_datablock.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_depth.c2
-rw-r--r--source/blender/editors/interface/interface_eyedropper_driver.c2
-rw-r--r--source/blender/editors/interface/interface_ops.c12
-rw-r--r--source/blender/editors/interface/view2d_ops.c6
-rw-r--r--source/blender/editors/lattice/editlattice_tools.c2
-rw-r--r--source/blender/editors/mask/mask_edit.c4
-rw-r--r--source/blender/editors/mask/mask_intern.h4
-rw-r--r--source/blender/editors/mask/mask_ops.c4
-rw-r--r--source/blender/editors/mesh/editmesh_select.c2
-rw-r--r--source/blender/editors/mesh/editmesh_utils.c2
-rw-r--r--source/blender/editors/mesh/mesh_data.c8
-rw-r--r--source/blender/editors/mesh/mesh_intern.h2
-rw-r--r--source/blender/editors/mesh/mesh_navmesh.c4
-rw-r--r--source/blender/editors/object/object_add.c6
-rw-r--r--source/blender/editors/object/object_constraint.c6
-rw-r--r--source/blender/editors/object/object_data_transfer.c4
-rw-r--r--source/blender/editors/object/object_edit.c8
-rw-r--r--source/blender/editors/object/object_hook.c2
-rw-r--r--source/blender/editors/object/object_intern.h4
-rw-r--r--source/blender/editors/object/object_modifier.c22
-rw-r--r--source/blender/editors/object/object_ops.c2
-rw-r--r--source/blender/editors/object/object_relations.c2
-rw-r--r--source/blender/editors/object/object_select.c2
-rw-r--r--source/blender/editors/object/object_shapekey.c8
-rw-r--r--source/blender/editors/object/object_vgroup.c24
-rw-r--r--source/blender/editors/physics/particle_edit.c10
-rw-r--r--source/blender/editors/physics/particle_object.c6
-rw-r--r--source/blender/editors/physics/physics_pointcache.c4
-rw-r--r--source/blender/editors/physics/rigidbody_constraint.c2
-rw-r--r--source/blender/editors/physics/rigidbody_object.c4
-rw-r--r--source/blender/editors/physics/rigidbody_world.c4
-rw-r--r--source/blender/editors/render/render_shading.c12
-rw-r--r--source/blender/editors/screen/screen_ops.c112
-rw-r--r--source/blender/editors/screen/screendump.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_curve.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c20
-rw-r--r--source/blender/editors/sculpt_paint/paint_image_proj.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_intern.h28
-rw-r--r--source/blender/editors/sculpt_paint/paint_ops.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.c10
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_color_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c2
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c12
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_intern.h8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c13
-rw-r--r--source/blender/editors/sound/sound_ops.c2
-rw-r--r--source/blender/editors/space_action/action_data.c12
-rw-r--r--source/blender/editors/space_action/action_edit.c4
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_ops.c4
-rw-r--r--source/blender/editors/space_clip/clip_editor.c10
-rw-r--r--source/blender/editors/space_clip/clip_graph_ops.c4
-rw-r--r--source/blender/editors/space_clip/clip_ops.c2
-rw-r--r--source/blender/editors/space_clip/clip_toolbar.c4
-rw-r--r--source/blender/editors/space_clip/space_clip.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops.c2
-rw-r--r--source/blender/editors/space_clip/tracking_ops_orient.c6
-rw-r--r--source/blender/editors/space_clip/tracking_ops_stabilize.c2
-rw-r--r--source/blender/editors/space_clip/tracking_select.c2
-rw-r--r--source/blender/editors/space_console/space_console.c4
-rw-r--r--source/blender/editors/space_file/file_ops.c10
-rw-r--r--source/blender/editors/space_file/file_panels.c2
-rw-r--r--source/blender/editors/space_file/space_file.c2
-rw-r--r--source/blender/editors/space_graph/graph_buttons.c4
-rw-r--r--source/blender/editors/space_graph/graph_edit.c4
-rw-r--r--source/blender/editors/space_graph/graph_intern.h8
-rw-r--r--source/blender/editors/space_graph/graph_ops.c2
-rw-r--r--source/blender/editors/space_graph/graph_utils.c8
-rw-r--r--source/blender/editors/space_image/image_edit.c4
-rw-r--r--source/blender/editors/space_image/image_intern.h2
-rw-r--r--source/blender/editors/space_image/image_ops.c26
-rw-r--r--source/blender/editors/space_image/space_image.c2
-rw-r--r--source/blender/editors/space_logic/logic_ops.c6
-rw-r--r--source/blender/editors/space_nla/nla_buttons.c12
-rw-r--r--source/blender/editors/space_nla/nla_channels.c2
-rw-r--r--source/blender/editors/space_nla/nla_intern.h4
-rw-r--r--source/blender/editors/space_nla/nla_ops.c4
-rw-r--r--source/blender/editors/space_node/node_add.c2
-rw-r--r--source/blender/editors/space_node/node_buttons.c8
-rw-r--r--source/blender/editors/space_node/node_edit.c10
-rw-r--r--source/blender/editors/space_node/node_group.c4
-rw-r--r--source/blender/editors/space_node/node_intern.h4
-rw-r--r--source/blender/editors/space_node/node_toolbar.c2
-rw-r--r--source/blender/editors/space_node/space_node.c4
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c6
-rw-r--r--source/blender/editors/space_outliner/space_outliner.c10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_buttons.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c22
-rw-r--r--source/blender/editors/space_sequencer/sequencer_intern.h10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_modifier.c2
-rw-r--r--source/blender/editors/space_sequencer/sequencer_view.c2
-rw-r--r--source/blender/editors/space_sequencer/space_sequencer.c6
-rw-r--r--source/blender/editors/space_text/space_text.c4
-rw-r--r--source/blender/editors/space_text/text_header.c2
-rw-r--r--source/blender/editors/space_text/text_intern.h2
-rw-r--r--source/blender/editors/space_text/text_ops.c18
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c14
-rw-r--r--source/blender/editors/space_view3d/view3d_buttons.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_edit.c4
-rw-r--r--source/blender/editors/space_view3d/view3d_header.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c6
-rw-r--r--source/blender/editors/transform/transform.c2
-rw-r--r--source/blender/editors/transform/transform_ops.c4
-rw-r--r--source/blender/editors/undo/ed_undo.c2
-rw-r--r--source/blender/editors/util/ed_transverts.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_buttons.c2
-rw-r--r--source/blender/editors/uvedit/uvedit_ops.c4
-rw-r--r--source/blender/editors/uvedit/uvedit_unwrap_ops.c2
-rw-r--r--source/blender/makesdna/DNA_windowmanager_types.h2
-rw-r--r--source/blender/makesrna/RNA_access.h2
-rw-r--r--source/blender/makesrna/RNA_enum_types.h6
-rw-r--r--source/blender/makesrna/intern/rna_access.c2
-rw-r--r--source/blender/makesrna/intern/rna_action.c4
-rw-r--r--source/blender/makesrna/intern/rna_animation.c2
-rw-r--r--source/blender/makesrna/intern/rna_constraint.c4
-rw-r--r--source/blender/makesrna/intern/rna_curve.c2
-rw-r--r--source/blender/makesrna/intern/rna_internal.h16
-rw-r--r--source/blender/makesrna/intern/rna_internal_types.h4
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c4
-rw-r--r--source/blender/makesrna/intern/rna_nodetree.c22
-rw-r--r--source/blender/makesrna/intern/rna_object.c12
-rw-r--r--source/blender/makesrna/intern/rna_sculpt_paint.c2
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c2
-rw-r--r--source/blender/makesrna/intern/rna_space.c4
-rw-r--r--source/blender/makesrna/intern/rna_ui.c6
-rw-r--r--source/blender/makesrna/intern/rna_wm.c4
-rw-r--r--source/blender/nodes/composite/node_composite_util.c2
-rw-r--r--source/blender/nodes/composite/node_composite_util.h2
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c2
-rw-r--r--source/blender/nodes/intern/node_common.c2
-rw-r--r--source/blender/nodes/intern/node_common.h2
-rw-r--r--source/blender/nodes/shader/node_shader_tree.c2
-rw-r--r--source/blender/nodes/shader/node_shader_util.c2
-rw-r--r--source/blender/nodes/shader/node_shader_util.h2
-rw-r--r--source/blender/nodes/texture/node_texture_util.c2
-rw-r--r--source/blender/nodes/texture/node_texture_util.h2
-rw-r--r--source/blender/python/intern/bpy_props.c2
-rw-r--r--source/blender/windowmanager/WM_api.h20
-rw-r--r--source/blender/windowmanager/WM_types.h6
-rw-r--r--source/blender/windowmanager/intern/wm_dragdrop.c5
-rw-r--r--source/blender/windowmanager/intern/wm_event_system.c4
-rw-r--r--source/blender/windowmanager/intern/wm_files.c2
-rw-r--r--source/blender/windowmanager/intern/wm_files_link.c2
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c11
-rw-r--r--source/blender/windowmanager/wm.h2
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c4
187 files changed, 604 insertions, 599 deletions
diff --git a/source/blender/blenkernel/BKE_node.h b/source/blender/blenkernel/BKE_node.h
index a8459387b14..eca7f82541f 100644
--- a/source/blender/blenkernel/BKE_node.h
+++ b/source/blender/blenkernel/BKE_node.h
@@ -202,9 +202,9 @@ typedef struct bNodeType {
void (*copyfunc_api)(struct PointerRNA *ptr, struct bNode *src_node);
/* can this node type be added to a node tree */
- int (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree);
+ bool (*poll)(struct bNodeType *ntype, struct bNodeTree *nodetree);
/* can this node be added to a node tree */
- int (*poll_instance)(struct bNode *node, struct bNodeTree *nodetree);
+ bool (*poll_instance)(struct bNode *node, struct bNodeTree *nodetree);
/* optional handling of link insertion */
void (*insert_link)(struct bNodeTree *ntree, struct bNode *node, struct bNodeLink *link);
@@ -283,7 +283,7 @@ typedef struct bNodeTreeType {
void (*free_node_cache)(struct bNodeTree *ntree, struct bNode *node);
void (*foreach_nodeclass)(struct Scene *scene, void *calldata, bNodeClassCallback func); /* iteration over all node classes */
/* Check visibility in the node editor */
- int (*poll)(const struct bContext *C, struct bNodeTreeType *ntreetype);
+ bool (*poll)(const struct bContext *C, struct bNodeTreeType *ntreetype);
/* Select a node tree from the context */
void (*get_from_context)(const struct bContext *C, struct bNodeTreeType *ntreetype,
struct bNodeTree **r_ntree, struct ID **r_id, struct ID **r_from);
@@ -296,7 +296,7 @@ typedef struct bNodeTreeType {
/* Tree update. Overrides nodetype->updatetreefunc! */
void (*update)(struct bNodeTree *ntree);
- int (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
+ bool (*validate_link)(struct bNodeTree *ntree, struct bNodeLink *link);
void (*node_add_init)(struct bNodeTree *ntree, struct bNode *bnode);
diff --git a/source/blender/blenkernel/BKE_screen.h b/source/blender/blenkernel/BKE_screen.h
index 09390ab8776..b33b9e455f1 100644
--- a/source/blender/blenkernel/BKE_screen.h
+++ b/source/blender/blenkernel/BKE_screen.h
@@ -185,7 +185,7 @@ typedef struct PanelType {
int flag;
/* verify if the panel should draw or not */
- int (*poll)(const struct bContext *C, struct PanelType *pt);
+ bool (*poll)(const struct bContext *C, struct PanelType *pt);
/* draw header (optional) */
void (*draw_header)(const struct bContext *C, struct Panel *pa);
/* draw entirely, view changes should be handled here */
@@ -256,7 +256,7 @@ typedef struct MenuType {
const char *description;
/* verify if the menu should draw or not */
- int (*poll)(const struct bContext *C, struct MenuType *mt);
+ bool (*poll)(const struct bContext *C, struct MenuType *mt);
/* draw entirely, view changes should be handled here */
void (*draw)(const struct bContext *C, struct Menu *menu);
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 5b279de4d8f..499f92b3878 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -3232,13 +3232,13 @@ static void node_type_base_defaults(bNodeType *ntype)
}
/* allow this node for any tree type */
-static int node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *UNUSED(ntree))
+static bool node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *UNUSED(ntree))
{
return true;
}
/* use the basic poll function */
-static int node_poll_instance_default(bNode *node, bNodeTree *ntree)
+static bool node_poll_instance_default(bNode *node, bNodeTree *ntree)
{
return node->typeinfo->poll(node->typeinfo, ntree);
}
@@ -3431,7 +3431,7 @@ void node_type_compatibility(struct bNodeType *ntype, short compatibility)
/* callbacks for undefined types */
-static int node_undefined_poll(bNodeType *UNUSED(ntype), bNodeTree *UNUSED(nodetree))
+static bool node_undefined_poll(bNodeType *UNUSED(ntype), bNodeTree *UNUSED(nodetree))
{
/* this type can not be added deliberately, it's just a placeholder */
return false;
diff --git a/source/blender/editors/animation/anim_channels_edit.c b/source/blender/editors/animation/anim_channels_edit.c
index 1158145ad6b..75557e60e21 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -657,7 +657,7 @@ void ANIM_fcurve_delete_from_animdata(bAnimContext *ac, AnimData *adt, FCurve *f
/* ****************** Operator Utilities ********************************** */
/* poll callback for being in an Animation Editor channels list region */
-static int animedit_poll_channels_active(bContext *C)
+static bool animedit_poll_channels_active(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
@@ -673,7 +673,7 @@ static int animedit_poll_channels_active(bContext *C)
}
/* poll callback for Animation Editor channels list region + not in NLA-tweakmode for NLA */
-static int animedit_poll_channels_nla_tweakmode_off(bContext *C)
+static bool animedit_poll_channels_nla_tweakmode_off(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
Scene *scene = CTX_data_scene(C);
@@ -1413,7 +1413,7 @@ static void ANIM_OT_channels_move(wmOperatorType *ot)
/* ******************** Group Channel Operator ************************ */
-static int animchannels_grouping_poll(bContext *C)
+static bool animchannels_grouping_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
SpaceLink *sl;
@@ -2188,7 +2188,7 @@ static void ANIM_OT_channels_clean_empty(wmOperatorType *ot)
/* ******************* Reenable Disabled Operator ******************* */
-static int animchannels_enable_poll(bContext *C)
+static bool animchannels_enable_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
@@ -2262,7 +2262,7 @@ static void ANIM_OT_channels_fcurves_enable(wmOperatorType *ot)
/* ****************** Find / Set Filter Operator ******************** */
/* XXX: make this generic? */
-static int animchannels_find_poll(bContext *C)
+static bool animchannels_find_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 2450d0740f2..88166ac65c8 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -492,7 +492,7 @@ void ED_markers_draw(const bContext *C, int flag)
/* ------------------------ */
/* special poll() which checks if there are selected markers first */
-static int ed_markers_poll_selected_markers(bContext *C)
+static bool ed_markers_poll_selected_markers(bContext *C)
{
ListBase *markers = ED_context_get_markers(C);
@@ -504,7 +504,7 @@ static int ed_markers_poll_selected_markers(bContext *C)
return ED_markers_get_first_selected(markers) != NULL;
}
-static int ed_markers_poll_selected_no_locked_markers(bContext *C)
+static bool ed_markers_poll_selected_no_locked_markers(bContext *C)
{
ListBase *markers = ED_context_get_markers(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -522,7 +522,7 @@ static int ed_markers_poll_selected_no_locked_markers(bContext *C)
/* special poll() which checks if there are any markers at all first */
-static int ed_markers_poll_markers_exist(bContext *C)
+static bool ed_markers_poll_markers_exist(bContext *C)
{
ListBase *markers = ED_context_get_markers(C);
ToolSettings *ts = CTX_data_tool_settings(C);
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c
index ea8ba76ffb6..8612f5944bb 100644
--- a/source/blender/editors/animation/anim_ops.c
+++ b/source/blender/editors/animation/anim_ops.c
@@ -64,7 +64,7 @@
/* ********************** frame change operator ***************************/
/* Check if the operator can be run from the current context */
-static int change_frame_poll(bContext *C)
+static bool change_frame_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
diff --git a/source/blender/editors/animation/drivers.c b/source/blender/editors/animation/drivers.c
index be9875ef95a..3e4e3a551fe 100644
--- a/source/blender/editors/animation/drivers.c
+++ b/source/blender/editors/animation/drivers.c
@@ -806,7 +806,7 @@ static const EnumPropertyItem *driver_mapping_type_itemsf(bContext *C, PointerRN
/* Add Driver Button Operator ------------------------ */
-static int add_driver_button_poll(bContext *C)
+static bool add_driver_button_poll(bContext *C)
{
PointerRNA ptr = {{NULL}};
PropertyRNA *prop = NULL;
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c
index 6386ad09e80..f7cfec4d48a 100644
--- a/source/blender/editors/animation/keyframing.c
+++ b/source/blender/editors/animation/keyframing.c
@@ -1312,7 +1312,7 @@ enum {
* This is based on the standard ED_operator_areaactive callback,
* except that it does special checks for a few spacetypes too...
*/
-static int modify_key_op_poll(bContext *C)
+static bool modify_key_op_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/animation/keyingsets.c b/source/blender/editors/animation/keyingsets.c
index a2a384832be..5e4db3ca61c 100644
--- a/source/blender/editors/animation/keyingsets.c
+++ b/source/blender/editors/animation/keyingsets.c
@@ -73,14 +73,14 @@
*/
/* poll callback for adding default KeyingSet */
-static int keyingset_poll_default_add(bContext *C)
+static bool keyingset_poll_default_add(bContext *C)
{
/* as long as there's an active Scene, it's fine */
return (CTX_data_scene(C) != NULL);
}
/* poll callback for editing active KeyingSet */
-static int keyingset_poll_active_edit(bContext *C)
+static bool keyingset_poll_active_edit(bContext *C)
{
Scene *scene = CTX_data_scene(C);
@@ -92,7 +92,7 @@ static int keyingset_poll_active_edit(bContext *C)
}
/* poll callback for editing active KeyingSet Path */
-static int keyingset_poll_activePath_edit(bContext *C)
+static bool keyingset_poll_activePath_edit(bContext *C)
{
Scene *scene = CTX_data_scene(C);
KeyingSet *ks;
diff --git a/source/blender/editors/armature/armature_select.c b/source/blender/editors/armature/armature_select.c
index a4e916b8e63..eb723671594 100644
--- a/source/blender/editors/armature/armature_select.c
+++ b/source/blender/editors/armature/armature_select.c
@@ -251,7 +251,7 @@ static int armature_select_linked_invoke(bContext *C, wmOperator *op, const wmEv
return OPERATOR_FINISHED;
}
-static int armature_select_linked_poll(bContext *C)
+static bool armature_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_editarmature(C));
}
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c
index dbebd734d9d..691da4cbd2b 100644
--- a/source/blender/editors/armature/editarmature_sketch.c
+++ b/source/blender/editors/armature/editarmature_sketch.c
@@ -2456,7 +2456,7 @@ static int sketch_draw_preview(bContext *C, wmOperator *op, const wmEvent *event
/* ============================================== Poll Functions ============================================= */
-int ED_operator_sketch_mode_active_stroke(bContext *C)
+bool ED_operator_sketch_mode_active_stroke(bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *sketch = contextSketch(C, 0);
@@ -2472,7 +2472,7 @@ int ED_operator_sketch_mode_active_stroke(bContext *C)
}
}
-static int ED_operator_sketch_mode_gesture(bContext *C)
+static bool ED_operator_sketch_mode_gesture(bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
SK_Sketch *sketch = contextSketch(C, 0);
@@ -2489,7 +2489,7 @@ static int ED_operator_sketch_mode_gesture(bContext *C)
}
}
-int ED_operator_sketch_full_mode(bContext *C)
+bool ED_operator_sketch_full_mode(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -2506,7 +2506,7 @@ int ED_operator_sketch_full_mode(bContext *C)
}
}
-int ED_operator_sketch_mode(const bContext *C)
+bool ED_operator_sketch_mode(const bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
ToolSettings *ts = CTX_data_tool_settings(C);
@@ -2634,7 +2634,7 @@ void SKETCH_OT_draw_stroke(wmOperatorType *ot)
ot->modal = sketch_draw_stroke_modal;
ot->cancel = sketch_draw_stroke_cancel;
- ot->poll = (int (*)(bContext *))ED_operator_sketch_mode;
+ ot->poll = (bool (*)(bContext *))ED_operator_sketch_mode;
RNA_def_boolean(ot->srna, "snap", 0, "Snap", "");
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index becda3e452e..389a8423f23 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -277,7 +277,7 @@ void POSE_OT_paths_calculate(wmOperatorType *ot)
/* --------- */
-static int pose_update_paths_poll(bContext *C)
+static bool pose_update_paths_poll(bContext *C)
{
if (ED_operator_posemode_exclusive(C)) {
Object *ob = CTX_data_active_object(C);
@@ -760,7 +760,7 @@ void POSE_OT_rotation_mode_set(wmOperatorType *ot)
/* ********************************************** */
-static int armature_layers_poll(bContext *C)
+static bool armature_layers_poll(bContext *C)
{
/* Armature layers operators can be used in posemode OR editmode for armatures */
return ED_operator_posemode(C) || ED_operator_editarmature(C);
diff --git a/source/blender/editors/armature/pose_lib.c b/source/blender/editors/armature/pose_lib.c
index 62c37e5d3fa..9bb1caee067 100644
--- a/source/blender/editors/armature/pose_lib.c
+++ b/source/blender/editors/armature/pose_lib.c
@@ -173,7 +173,7 @@ static Object *get_poselib_object(bContext *C)
}
/* Poll callback for operators that require existing PoseLib data (with poses) to work */
-static int has_poselib_pose_data_poll(bContext *C)
+static bool has_poselib_pose_data_poll(bContext *C)
{
Object *ob = get_poselib_object(C);
return (ob && ob->poselib);
@@ -182,7 +182,7 @@ static int has_poselib_pose_data_poll(bContext *C)
/* Poll callback for operators that require existing PoseLib data (with poses)
* as they need to do some editing work on those poses (i.e. not on lib-linked actions)
*/
-static int has_poselib_pose_data_for_editing_poll(bContext *C)
+static bool has_poselib_pose_data_for_editing_poll(bContext *C)
{
Object *ob = get_poselib_object(C);
return (ob && ob->poselib && !ID_IS_LINKED(ob->poselib));
@@ -378,7 +378,7 @@ void POSELIB_OT_action_sanitize(wmOperatorType *ot)
/* ------------------------------------------ */
/* Poll callback for adding poses to a PoseLib */
-static int poselib_add_poll(bContext *C)
+static bool poselib_add_poll(bContext *C)
{
/* There are 2 cases we need to be careful with:
* 1) When this operator is invoked from a hotkey, there may be no PoseLib yet
diff --git a/source/blender/editors/armature/pose_select.c b/source/blender/editors/armature/pose_select.c
index afbefb45e71..ecfaa41b0b5 100644
--- a/source/blender/editors/armature/pose_select.c
+++ b/source/blender/editors/armature/pose_select.c
@@ -320,7 +320,7 @@ static int pose_select_connected_invoke(bContext *C, wmOperator *op, const wmEve
return OPERATOR_FINISHED;
}
-static int pose_select_linked_poll(bContext *C)
+static bool pose_select_linked_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && ED_operator_posemode(C));
}
diff --git a/source/blender/editors/curve/editcurve.c b/source/blender/editors/curve/editcurve.c
index b0efc2ddc50..8dd811c3df7 100644
--- a/source/blender/editors/curve/editcurve.c
+++ b/source/blender/editors/curve/editcurve.c
@@ -6225,7 +6225,7 @@ bool ED_curve_active_center(Curve *cu, float center[3])
/******************** Match texture space operator ***********************/
-static int match_texture_space_poll(bContext *C)
+static bool match_texture_space_poll(bContext *C)
{
Object *object = CTX_data_active_object(C);
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c
index c35b64de991..0f51f12793a 100644
--- a/source/blender/editors/gpencil/gpencil_brush.c
+++ b/source/blender/editors/gpencil/gpencil_brush.c
@@ -1174,7 +1174,7 @@ static void gpsculpt_brush_exit(bContext *C, wmOperator *op)
}
/* poll callback for stroke sculpting operator(s) */
-static int gpsculpt_brush_poll(bContext *C)
+static bool gpsculpt_brush_poll(bContext *C)
{
/* NOTE: this is a bit slower, but is the most accurate... */
return CTX_DATA_COUNT(C, editable_gpencil_strokes) != 0;
diff --git a/source/blender/editors/gpencil/gpencil_convert.c b/source/blender/editors/gpencil/gpencil_convert.c
index 67d3272a90d..0c148710e3e 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -1282,7 +1282,7 @@ static void gp_convert_set_end_frame(struct Main *UNUSED(main), struct Scene *UN
}
}
-static int gp_convert_poll(bContext *C)
+static bool gp_convert_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = NULL;
diff --git a/source/blender/editors/gpencil/gpencil_data.c b/source/blender/editors/gpencil/gpencil_data.c
index 9f437f28f0f..c28fea0fc41 100644
--- a/source/blender/editors/gpencil/gpencil_data.c
+++ b/source/blender/editors/gpencil/gpencil_data.c
@@ -131,7 +131,7 @@ void GPENCIL_OT_data_add(wmOperatorType *ot)
/* ******************* Unlink Data ************************ */
/* poll callback for adding data/layers - special */
-static int gp_data_unlink_poll(bContext *C)
+static bool gp_data_unlink_poll(bContext *C)
{
bGPdata **gpd_ptr = ED_gpencil_data_get_pointers(C, NULL);
@@ -420,7 +420,7 @@ void GPENCIL_OT_hide(wmOperatorType *ot)
/* ********************** Show All Layers ***************************** */
/* poll callback for showing layers */
-static int gp_reveal_poll(bContext *C)
+static bool gp_reveal_poll(bContext *C)
{
return ED_gpencil_data_get_active(C) != NULL;
}
@@ -1811,7 +1811,7 @@ void GPENCIL_OT_palettecolor_hide(wmOperatorType *ot)
/* ********************** Show All Colors ***************************** */
/* poll callback for showing colors */
-static int gp_palettecolor_reveal_poll(bContext *C)
+static bool gp_palettecolor_reveal_poll(bContext *C)
{
return ED_gpencil_data_get_active(C) != NULL;
}
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index cdd8d571400..936cf571b4a 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -84,7 +84,7 @@
/* ************************************************ */
/* Stroke Edit Mode Management */
-static int gpencil_editmode_toggle_poll(bContext *C)
+static bool gpencil_editmode_toggle_poll(bContext *C)
{
return ED_gpencil_data_get_active(C) != NULL;
}
@@ -129,7 +129,7 @@ void GPENCIL_OT_editmode_toggle(wmOperatorType *ot)
/* Stroke Editing Operators */
/* poll callback for all stroke editing operators */
-static int gp_stroke_edit_poll(bContext *C)
+static bool gp_stroke_edit_poll(bContext *C)
{
/* NOTE: this is a bit slower, but is the most accurate... */
return CTX_DATA_COUNT(C, editable_gpencil_strokes) != 0;
@@ -515,7 +515,7 @@ void GPENCIL_OT_copy(wmOperatorType *ot)
/* --------------------- */
/* Paste selected strokes */
-static int gp_strokes_paste_poll(bContext *C)
+static bool gp_strokes_paste_poll(bContext *C)
{
/* 1) Must have GP datablock to paste to
* - We don't need to have an active layer though, as that can easily get added
@@ -782,7 +782,7 @@ void GPENCIL_OT_move_to_layer(wmOperatorType *ot)
/* ********************* Add Blank Frame *************************** */
/* Basically the same as the drawing op */
-static int UNUSED_FUNCTION(gp_blank_frame_add_poll)(bContext *C)
+static bool UNUSED_FUNCTION(gp_blank_frame_add_poll)(bContext *C)
{
if (ED_operator_regionactive(C)) {
/* check if current context can support GPencil data */
@@ -862,7 +862,7 @@ void GPENCIL_OT_blank_frame_add(wmOperatorType *ot)
/* ******************* Delete Active Frame ************************ */
-static int gp_actframe_delete_poll(bContext *C)
+static bool gp_actframe_delete_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
@@ -914,7 +914,7 @@ void GPENCIL_OT_active_frame_delete(wmOperatorType *ot)
/* **************** Delete All Active Frames ****************** */
-static int gp_actframe_delete_all_poll(bContext *C)
+static bool gp_actframe_delete_all_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
@@ -1368,7 +1368,7 @@ void GPENCIL_OT_dissolve(wmOperatorType *ot)
/* NOTE: For now, we only allow these in the 3D view, as other editors do not
* define a cursor or gridstep which can be used
*/
-static int gp_snap_poll(bContext *C)
+static bool gp_snap_poll(bContext *C)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
ScrArea *sa = CTX_wm_area(C);
@@ -2088,7 +2088,7 @@ typedef enum eGP_ReprojectModes {
GP_REPROJECT_SURFACE,
} eGP_ReprojectModes;
-static int gp_strokes_reproject_poll(bContext *C)
+static bool gp_strokes_reproject_poll(bContext *C)
{
/* 2 Requirements:
* - 1) Editable GP data
diff --git a/source/blender/editors/gpencil/gpencil_intern.h b/source/blender/editors/gpencil/gpencil_intern.h
index 33af6cab915..d7e60d2a0ce 100644
--- a/source/blender/editors/gpencil/gpencil_intern.h
+++ b/source/blender/editors/gpencil/gpencil_intern.h
@@ -93,12 +93,12 @@ bool gp_point_xy_to_3d(GP_SpaceConversion *gsc, struct Scene *scene, const float
/* Poll Callbacks ------------------------------------ */
/* gpencil_utils.c */
-int gp_add_poll(struct bContext *C);
-int gp_active_layer_poll(struct bContext *C);
-int gp_active_brush_poll(struct bContext *C);
-int gp_active_palette_poll(struct bContext *C);
-int gp_active_palettecolor_poll(struct bContext *C);
-int gp_brush_crt_presets_poll(bContext *C);
+bool gp_add_poll(struct bContext *C);
+bool gp_active_layer_poll(struct bContext *C);
+bool gp_active_brush_poll(struct bContext *C);
+bool gp_active_palette_poll(struct bContext *C);
+bool gp_active_palettecolor_poll(struct bContext *C);
+bool gp_brush_crt_presets_poll(bContext *C);
/* Copy/Paste Buffer --------------------------------- */
/* gpencil_edit.c */
diff --git a/source/blender/editors/gpencil/gpencil_interpolate.c b/source/blender/editors/gpencil/gpencil_interpolate.c
index ff3f5b20858..e2d70803695 100644
--- a/source/blender/editors/gpencil/gpencil_interpolate.c
+++ b/source/blender/editors/gpencil/gpencil_interpolate.c
@@ -85,7 +85,7 @@
/* Core/Shared Utilities */
/* Poll callback for interpolation operators */
-static int gpencil_view3d_poll(bContext *C)
+static bool gpencil_view3d_poll(bContext *C)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
bGPDlayer *gpl = CTX_data_active_gpencil_layer(C);
@@ -1032,7 +1032,7 @@ void GPENCIL_OT_interpolate_sequence(wmOperatorType *ot)
/* ******************** Remove Breakdowns ************************ */
-static int gpencil_interpolate_reverse_poll(bContext *C)
+static bool gpencil_interpolate_reverse_poll(bContext *C)
{
if (!gpencil_view3d_poll(C)) {
return 0;
diff --git a/source/blender/editors/gpencil/gpencil_ops.c b/source/blender/editors/gpencil/gpencil_ops.c
index 84a106856b3..2a575c02046 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -114,7 +114,7 @@ static void ed_keymap_gpencil_general(wmKeyConfig *keyconf)
/* ==================== */
/* Poll callback for stroke editing mode */
-static int gp_stroke_editmode_poll(bContext *C)
+static bool gp_stroke_editmode_poll(bContext *C)
{
bGPdata *gpd = CTX_data_gpencil_data(C);
return (gpd && (gpd->flag & GP_DATA_STROKE_EDITMODE));
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c
index 2471ba76ae2..fd1ff857317 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -195,7 +195,7 @@ static void gp_session_validatebuffer(tGPsdata *p);
/* Context Wrangling... */
/* check if context is suitable for drawing */
-static int gpencil_draw_poll(bContext *C)
+static bool gpencil_draw_poll(bContext *C)
{
if (ED_operator_regionactive(C)) {
/* check if current context can support GPencil data */
diff --git a/source/blender/editors/gpencil/gpencil_select.c b/source/blender/editors/gpencil/gpencil_select.c
index ac0b046e499..dd556e99264 100644
--- a/source/blender/editors/gpencil/gpencil_select.c
+++ b/source/blender/editors/gpencil/gpencil_select.c
@@ -67,7 +67,7 @@
/* ********************************************** */
/* Polling callbacks */
-static int gpencil_select_poll(bContext *C)
+static bool gpencil_select_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
diff --git a/source/blender/editors/gpencil/gpencil_utils.c b/source/blender/editors/gpencil/gpencil_utils.c
index 0a35dd90f02..e6f3b40024f 100644
--- a/source/blender/editors/gpencil/gpencil_utils.c
+++ b/source/blender/editors/gpencil/gpencil_utils.c
@@ -260,14 +260,14 @@ bool ED_gpencil_has_keyframe_v3d(Scene *scene, Object *ob, int cfra)
/* Poll Callbacks */
/* poll callback for adding data/layers - special */
-int gp_add_poll(bContext *C)
+bool gp_add_poll(bContext *C)
{
/* the base line we have is that we have somewhere to add Grease Pencil data */
return ED_gpencil_data_get_pointers(C, NULL) != NULL;
}
/* poll callback for checking if there is an active layer */
-int gp_active_layer_poll(bContext *C)
+bool gp_active_layer_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDlayer *gpl = BKE_gpencil_layer_getactive(gpd);
@@ -276,7 +276,7 @@ int gp_active_layer_poll(bContext *C)
}
/* poll callback for checking if there is an active brush */
-int gp_active_brush_poll(bContext *C)
+bool gp_active_brush_poll(bContext *C)
{
ToolSettings *ts = CTX_data_tool_settings(C);
bGPDbrush *brush = BKE_gpencil_brush_getactive(ts);
@@ -285,7 +285,7 @@ int gp_active_brush_poll(bContext *C)
}
/* poll callback for checking if there is an active palette */
-int gp_active_palette_poll(bContext *C)
+bool gp_active_palette_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd);
@@ -294,7 +294,7 @@ int gp_active_palette_poll(bContext *C)
}
/* poll callback for checking if there is an active palette color */
-int gp_active_palettecolor_poll(bContext *C)
+bool gp_active_palettecolor_poll(bContext *C)
{
bGPdata *gpd = ED_gpencil_data_get_active(C);
bGPDpalette *palette = BKE_gpencil_palette_getactive(gpd);
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 1bc0c8fab64..d6e385ab5a6 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -208,9 +208,9 @@ struct Object *ED_pose_object_from_context(struct bContext *C);
/* sketch */
-int ED_operator_sketch_mode_active_stroke(struct bContext *C);
-int ED_operator_sketch_full_mode(struct bContext *C);
-int ED_operator_sketch_mode(const struct bContext *C);
+bool ED_operator_sketch_mode_active_stroke(struct bContext *C);
+bool ED_operator_sketch_full_mode(struct bContext *C);
+bool ED_operator_sketch_mode(const struct bContext *C);
void BIF_convertSketch(struct bContext *C);
void BIF_deleteSketch(struct bContext *C);
diff --git a/source/blender/editors/include/ED_clip.h b/source/blender/editors/include/ED_clip.h
index 91f8b39f7b9..4844d96e6e8 100644
--- a/source/blender/editors/include/ED_clip.h
+++ b/source/blender/editors/include/ED_clip.h
@@ -44,13 +44,13 @@ struct Scene;
/* ** clip_editor.c ** */
/* common poll functions */
-int ED_space_clip_poll(struct bContext *C);
+bool ED_space_clip_poll(struct bContext *C);
-int ED_space_clip_view_clip_poll(struct bContext *C);
+bool ED_space_clip_view_clip_poll(struct bContext *C);
-int ED_space_clip_tracking_poll(struct bContext *C);
-int ED_space_clip_maskedit_poll(struct bContext *C);
-int ED_space_clip_maskedit_mask_poll(struct bContext *C);
+bool ED_space_clip_tracking_poll(struct bContext *C);
+bool ED_space_clip_maskedit_poll(struct bContext *C);
+bool ED_space_clip_maskedit_mask_poll(struct bContext *C);
void ED_space_clip_get_size(struct SpaceClip *sc, int *width, int *height);
void ED_space_clip_get_size_fl(struct SpaceClip *sc, float size[2]);
diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h
index 0e56b4c6e40..e5631c4e191 100644
--- a/source/blender/editors/include/ED_image.h
+++ b/source/blender/editors/include/ED_image.h
@@ -76,8 +76,8 @@ bool ED_space_image_show_uvedit(struct SpaceImage *sima, struct Object *obedit);
bool ED_space_image_paint_curve(const struct bContext *C);
bool ED_space_image_check_show_maskedit(struct Scene *scene, struct SpaceImage *sima);
-int ED_space_image_maskedit_poll(struct bContext *C);
-int ED_space_image_maskedit_mask_poll(struct bContext *C);
+bool ED_space_image_maskedit_poll(struct bContext *C);
+bool ED_space_image_maskedit_mask_poll(struct bContext *C);
void ED_image_draw_info(struct Scene *scene, struct ARegion *ar, bool color_manage, bool use_default_view, int channels, int x, int y,
const unsigned char cp[4], const float fp[4], const float linearcol[4], int *zp, float *zpf);
diff --git a/source/blender/editors/include/ED_keyframing.h b/source/blender/editors/include/ED_keyframing.h
index b73c997060a..06b8197de97 100644
--- a/source/blender/editors/include/ED_keyframing.h
+++ b/source/blender/editors/include/ED_keyframing.h
@@ -131,7 +131,7 @@ struct KeyingSetInfo;
struct ExtensionRNA;
/* Polling Callback for KeyingSets */
-typedef int (*cbKeyingSet_Poll)(struct KeyingSetInfo *ksi, struct bContext *C);
+typedef bool (*cbKeyingSet_Poll)(struct KeyingSetInfo *ksi, struct bContext *C);
/* Context Iterator Callback for KeyingSets */
typedef void (*cbKeyingSet_Iterator)(struct KeyingSetInfo *ksi, struct bContext *C, struct KeyingSet *ks);
/* Property Specifier Callback for KeyingSets (called from iterators) */
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index 70b54a64d6b..32444beb0fe 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -40,9 +40,9 @@ struct Scene;
struct Object;
/* particle_edit.c */
-int PE_poll(struct bContext *C);
-int PE_hair_poll(struct bContext *C);
-int PE_poll_view3d(struct bContext *C);
+bool PE_poll(struct bContext *C);
+bool PE_hair_poll(struct bContext *C);
+bool PE_poll_view3d(struct bContext *C);
/* rigidbody_object.c */
bool ED_rigidbody_object_add(struct Main *bmain, struct Scene *scene, struct Object *ob, int type, struct ReportList *reports);
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index f031c1775c6..b4d9a2629cf 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -135,60 +135,60 @@ void ED_operatortypes_screen(void);
void ED_keymap_screen(struct wmKeyConfig *keyconf);
/* operators; context poll callbacks */
-int ED_operator_screenactive(struct bContext *C);
-int ED_operator_screen_mainwinactive(struct bContext *C);
-int ED_operator_areaactive(struct bContext *C);
-int ED_operator_regionactive(struct bContext *C);
-
-int ED_operator_scene(struct bContext *C);
-int ED_operator_scene_editable(struct bContext *C);
-int ED_operator_objectmode(struct bContext *C);
-
-int ED_operator_view3d_active(struct bContext *C);
-int ED_operator_region_view3d_active(struct bContext *C);
-int ED_operator_animview_active(struct bContext *C);
-int ED_operator_timeline_active(struct bContext *C);
-int ED_operator_outliner_active(struct bContext *C);
-int ED_operator_outliner_active_no_editobject(struct bContext *C);
-int ED_operator_file_active(struct bContext *C);
-int ED_operator_action_active(struct bContext *C);
-int ED_operator_buttons_active(struct bContext *C);
-int ED_operator_node_active(struct bContext *C);
-int ED_operator_node_editable(struct bContext *C);
-int ED_operator_graphedit_active(struct bContext *C);
-int ED_operator_sequencer_active(struct bContext *C);
-int ED_operator_sequencer_active_editable(struct bContext *C);
-int ED_operator_image_active(struct bContext *C);
-int ED_operator_nla_active(struct bContext *C);
-int ED_operator_logic_active(struct bContext *C);
-int ED_operator_info_active(struct bContext *C);
-int ED_operator_console_active(struct bContext *C);
-
-
-int ED_operator_object_active(struct bContext *C);
-int ED_operator_object_active_editable(struct bContext *C);
-int ED_operator_object_active_editable_mesh(struct bContext *C);
-int ED_operator_object_active_editable_font(struct bContext *C);
-int ED_operator_editmesh(struct bContext *C);
-int ED_operator_editmesh_view3d(struct bContext *C);
-int ED_operator_editmesh_region_view3d(struct bContext *C);
-int ED_operator_editarmature(struct bContext *C);
-int ED_operator_editcurve(struct bContext *C);
-int ED_operator_editcurve_3d(struct bContext *C);
-int ED_operator_editsurf(struct bContext *C);
-int ED_operator_editsurfcurve(struct bContext *C);
-int ED_operator_editsurfcurve_region_view3d(struct bContext *C);
-int ED_operator_editfont(struct bContext *C);
-int ED_operator_editlattice(struct bContext *C);
-int ED_operator_editmball(struct bContext *C);
-int ED_operator_uvedit(struct bContext *C);
-int ED_operator_uvedit_space_image(struct bContext *C);
-int ED_operator_uvmap(struct bContext *C);
-int ED_operator_posemode_exclusive(struct bContext *C);
-int ED_operator_posemode_context(struct bContext *C);
-int ED_operator_posemode(struct bContext *C);
-int ED_operator_posemode_local(struct bContext *C);
-int ED_operator_mask(struct bContext *C);
+bool ED_operator_screenactive(struct bContext *C);
+bool ED_operator_screen_mainwinactive(struct bContext *C);
+bool ED_operator_areaactive(struct bContext *C);
+bool ED_operator_regionactive(struct bContext *C);
+
+bool ED_operator_scene(struct bContext *C);
+bool ED_operator_scene_editable(struct bContext *C);
+bool ED_operator_objectmode(struct bContext *C);
+
+bool ED_operator_view3d_active(struct bContext *C);
+bool ED_operator_region_view3d_active(struct bContext *C);
+bool ED_operator_animview_active(struct bContext *C);
+bool ED_operator_timeline_active(struct bContext *C);
+bool ED_operator_outliner_active(struct bContext *C);
+bool ED_operator_outliner_active_no_editobject(struct bContext *C);
+bool ED_operator_file_active(struct bContext *C);
+bool ED_operator_action_active(struct bContext *C);
+bool ED_operator_buttons_active(struct bContext *C);
+bool ED_operator_node_active(struct bContext *C);
+bool ED_operator_node_editable(struct bContext *C);
+bool ED_operator_graphedit_active(struct bContext *C);
+bool ED_operator_sequencer_active(struct bContext *C);
+bool ED_operator_sequencer_active_editable(struct bContext *C);
+bool ED_operator_image_active(struct bContext *C);
+bool ED_operator_nla_active(struct bContext *C);
+bool ED_operator_logic_active(struct bContext *C);
+bool ED_operator_info_active(struct bContext *C);
+bool ED_operator_console_active(struct bContext *C);
+
+
+bool ED_operator_object_active(struct bContext *C);
+bool ED_operator_object_active_editable(struct bContext *C);
+bool ED_operator_object_active_editable_mesh(struct bContext *C);
+bool ED_operator_object_active_editable_font(struct bContext *C);
+bool ED_operator_editmesh(struct bContext *C);
+bool ED_operator_editmesh_view3d(struct bContext *C);
+bool ED_operator_editmesh_region_view3d(struct bContext *C);
+bool ED_operator_editarmature(struct bContext *C);
+bool ED_operator_editcurve(struct bContext *C);
+bool ED_operator_editcurve_3d(struct bContext *C);
+bool ED_operator_editsurf(struct bContext *C);
+bool ED_operator_editsurfcurve(struct bContext *C);
+bool ED_operator_editsurfcurve_region_view3d(struct bContext *C);
+bool ED_operator_editfont(struct bContext *C);
+bool ED_operator_editlattice(struct bContext *C);
+bool ED_operator_editmball(struct bContext *C);
+bool ED_operator_uvedit(struct bContext *C);
+bool ED_operator_uvedit_space_image(struct bContext *C);
+bool ED_operator_uvmap(struct bContext *C);
+bool ED_operator_posemode_exclusive(struct bContext *C);
+bool ED_operator_posemode_context(struct bContext *C);
+bool ED_operator_posemode(struct bContext *C);
+bool ED_operator_posemode_local(struct bContext *C);
+bool ED_operator_mask(struct bContext *C);
/* Cache display helpers */
diff --git a/source/blender/editors/include/ED_sequencer.h b/source/blender/editors/include/ED_sequencer.h
index 94885c2abe0..18446966c4f 100644
--- a/source/blender/editors/include/ED_sequencer.h
+++ b/source/blender/editors/include/ED_sequencer.h
@@ -35,9 +35,9 @@ struct SpaceSeq;
void ED_sequencer_select_sequence_single(struct Scene *scene, struct Sequence *seq, bool deselect_all);
void ED_sequencer_deselect_all(struct Scene *scene);
-int ED_space_sequencer_maskedit_mask_poll(struct bContext *C);
+bool ED_space_sequencer_maskedit_mask_poll(struct bContext *C);
bool ED_space_sequencer_check_show_maskedit(struct SpaceSeq *sseq, struct Scene *scene);
-int ED_space_sequencer_maskedit_poll(struct bContext *C);
+bool ED_space_sequencer_maskedit_poll(struct bContext *C);
bool ED_space_sequencer_check_show_imbuf(struct SpaceSeq *sseq);
bool ED_space_sequencer_check_show_strip(struct SpaceSeq *sseq);
diff --git a/source/blender/editors/include/ED_transverts.h b/source/blender/editors/include/ED_transverts.h
index 9005d55feff..363bb31c3dc 100644
--- a/source/blender/editors/include/ED_transverts.h
+++ b/source/blender/editors/include/ED_transverts.h
@@ -50,7 +50,7 @@ void ED_transverts_create_from_obedit(TransVertStore *tvs, struct Object *obedit
void ED_transverts_update_obedit(TransVertStore *tvs, struct Object *obedit);
void ED_transverts_free(TransVertStore *tvs);
bool ED_transverts_check_obedit(Object *obedit);
-int ED_transverts_poll(struct bContext *C);
+bool ED_transverts_poll(struct bContext *C);
/* currently only used for bmesh index values */
enum {
diff --git a/source/blender/editors/include/ED_view3d.h b/source/blender/editors/include/ED_view3d.h
index 43bdafed277..82411ba7401 100644
--- a/source/blender/editors/include/ED_view3d.h
+++ b/source/blender/editors/include/ED_view3d.h
@@ -343,7 +343,7 @@ bool edge_inside_circle(const float cent[2], float radius, const float screen_co
/* get 3d region from context, also if mouse is in header or toolbar */
struct RegionView3D *ED_view3d_context_rv3d(struct bContext *C);
bool ED_view3d_context_user_region(struct bContext *C, struct View3D **r_v3d, struct ARegion **r_ar);
-int ED_operator_rv3d_user_region_poll(struct bContext *C);
+bool ED_operator_rv3d_user_region_poll(struct bContext *C);
void ED_view3d_init_mats_rv3d(struct Object *ob, struct RegionView3D *rv3d);
void ED_view3d_init_mats_rv3d_gl(struct Object *ob, struct RegionView3D *rv3d);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 0204301941e..1fd951c23c5 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -1065,7 +1065,7 @@ void ED_operatortypes_ui(void);
void ED_keymap_ui(struct wmKeyConfig *keyconf);
void UI_drop_color_copy(struct wmDrag *drag, struct wmDropBox *drop);
-int UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
+bool UI_drop_color_poll(struct bContext *C, struct wmDrag *drag, const struct wmEvent *event);
bool UI_context_copy_to_selected_list(
struct bContext *C, struct PointerRNA *ptr, struct PropertyRNA *prop,
diff --git a/source/blender/editors/interface/interface_eyedropper_color.c b/source/blender/editors/interface/interface_eyedropper_color.c
index 7ba4b15a88f..7dd7de0817e 100644
--- a/source/blender/editors/interface/interface_eyedropper_color.c
+++ b/source/blender/editors/interface/interface_eyedropper_color.c
@@ -319,7 +319,7 @@ static int eyedropper_exec(bContext *C, wmOperator *op)
}
}
-static int eyedropper_poll(bContext *C)
+static bool eyedropper_poll(bContext *C)
{
PointerRNA ptr;
PropertyRNA *prop;
diff --git a/source/blender/editors/interface/interface_eyedropper_colorband.c b/source/blender/editors/interface/interface_eyedropper_colorband.c
index b13d552dbeb..f414d524cd8 100644
--- a/source/blender/editors/interface/interface_eyedropper_colorband.c
+++ b/source/blender/editors/interface/interface_eyedropper_colorband.c
@@ -289,7 +289,7 @@ static int eyedropper_colorband_exec(bContext *C, wmOperator *op)
}
}
-static int eyedropper_colorband_poll(bContext *C)
+static bool eyedropper_colorband_poll(bContext *C)
{
uiBut *but = UI_context_active_but_get(C);
return (but && but->type == UI_BTYPE_COLORBAND);
diff --git a/source/blender/editors/interface/interface_eyedropper_datablock.c b/source/blender/editors/interface/interface_eyedropper_datablock.c
index 416022a9dd0..2bb575558fc 100644
--- a/source/blender/editors/interface/interface_eyedropper_datablock.c
+++ b/source/blender/editors/interface/interface_eyedropper_datablock.c
@@ -305,7 +305,7 @@ static int datadropper_exec(bContext *C, wmOperator *op)
}
}
-static int datadropper_poll(bContext *C)
+static bool datadropper_poll(bContext *C)
{
PointerRNA ptr;
PropertyRNA *prop;
diff --git a/source/blender/editors/interface/interface_eyedropper_depth.c b/source/blender/editors/interface/interface_eyedropper_depth.c
index 8e2ca2e2b3a..954259140c3 100644
--- a/source/blender/editors/interface/interface_eyedropper_depth.c
+++ b/source/blender/editors/interface/interface_eyedropper_depth.c
@@ -332,7 +332,7 @@ static int depthdropper_exec(bContext *C, wmOperator *op)
}
}
-static int depthdropper_poll(bContext *C)
+static bool depthdropper_poll(bContext *C)
{
PointerRNA ptr;
PropertyRNA *prop;
diff --git a/source/blender/editors/interface/interface_eyedropper_driver.c b/source/blender/editors/interface/interface_eyedropper_driver.c
index 1b7407c87dd..d6569bd840c 100644
--- a/source/blender/editors/interface/interface_eyedropper_driver.c
+++ b/source/blender/editors/interface/interface_eyedropper_driver.c
@@ -203,7 +203,7 @@ static int driverdropper_exec(bContext *C, wmOperator *op)
}
}
-static int driverdropper_poll(bContext *C)
+static bool driverdropper_poll(bContext *C)
{
if (!CTX_wm_window(C)) return 0;
else return 1;
diff --git a/source/blender/editors/interface/interface_ops.c b/source/blender/editors/interface/interface_ops.c
index a1dbbfd037b..cd7d2e27d9a 100644
--- a/source/blender/editors/interface/interface_ops.c
+++ b/source/blender/editors/interface/interface_ops.c
@@ -92,7 +92,7 @@ static void UI_OT_reset_default_theme(wmOperatorType *ot)
/* Copy Data Path Operator ------------------------ */
-static int copy_data_path_button_poll(bContext *C)
+static bool copy_data_path_button_poll(bContext *C)
{
PointerRNA ptr;
PropertyRNA *prop;
@@ -171,7 +171,7 @@ static void UI_OT_copy_data_path_button(wmOperatorType *ot)
RNA_def_property_flag(prop, PROP_SKIP_SAVE);
}
-static int copy_python_command_button_poll(bContext *C)
+static bool copy_python_command_button_poll(bContext *C)
{
uiBut *but = UI_context_active_but_get(C);
@@ -242,7 +242,7 @@ static int operator_button_property_finish(bContext *C, PointerRNA *ptr, Propert
}
}
-static int reset_default_button_poll(bContext *C)
+static bool reset_default_button_poll(bContext *C)
{
PointerRNA ptr;
PropertyRNA *prop;
@@ -549,7 +549,7 @@ static bool copy_to_selected_button(bContext *C, bool all, bool poll)
return success;
}
-static int copy_to_selected_button_poll(bContext *C)
+static bool copy_to_selected_button_poll(bContext *C)
{
return copy_to_selected_button(C, false, true);
}
@@ -589,7 +589,7 @@ static void UI_OT_copy_to_selected_button(wmOperatorType *ot)
* when there are too many to display...
*/
-static int reports_to_text_poll(bContext *C)
+static bool reports_to_text_poll(bContext *C)
{
return CTX_wm_reports(C) != NULL;
}
@@ -1021,7 +1021,7 @@ static void UI_OT_reloadtranslation(wmOperatorType *ot)
ot->exec = reloadtranslation_exec;
}
-int UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
+bool UI_drop_color_poll(struct bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
{
/* should only return true for regions that include buttons, for now
* return true always */
diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
index b9504a3a96b..3cad2167cfa 100644
--- a/source/blender/editors/interface/view2d_ops.c
+++ b/source/blender/editors/interface/view2d_ops.c
@@ -53,7 +53,7 @@
#include "PIL_time.h" /* USER_ZOOM_CONT */
-static int view2d_poll(bContext *C)
+static bool view2d_poll(bContext *C)
{
ARegion *ar = CTX_wm_region(C);
@@ -128,7 +128,7 @@ static int view_pan_init(bContext *C, wmOperator *op)
}
#ifdef WITH_INPUT_NDOF
-static int view_pan_poll(bContext *C)
+static bool view_pan_poll(bContext *C)
{
ARegion *ar = CTX_wm_region(C);
View2D *v2d;
@@ -610,7 +610,7 @@ static int view_zoomdrag_init(bContext *C, wmOperator *op)
}
/* check if step-zoom can be applied */
-static int view_zoom_poll(bContext *C)
+static bool view_zoom_poll(bContext *C)
{
ARegion *ar = CTX_wm_region(C);
View2D *v2d;
diff --git a/source/blender/editors/lattice/editlattice_tools.c b/source/blender/editors/lattice/editlattice_tools.c
index c39ba44c1dc..8ecb182528a 100644
--- a/source/blender/editors/lattice/editlattice_tools.c
+++ b/source/blender/editors/lattice/editlattice_tools.c
@@ -55,7 +55,7 @@
/** \name Make Regular Operator
* \{ */
-static int make_regular_poll(bContext *C)
+static bool make_regular_poll(bContext *C)
{
Object *ob;
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index 9a2635c37d2..192ada40b5d 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -57,7 +57,7 @@
/********************** generic poll functions *********************/
-int ED_maskedit_poll(bContext *C)
+bool ED_maskedit_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if (sa) {
@@ -73,7 +73,7 @@ int ED_maskedit_poll(bContext *C)
return false;
}
-int ED_maskedit_mask_poll(bContext *C)
+bool ED_maskedit_mask_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if (sa) {
diff --git a/source/blender/editors/mask/mask_intern.h b/source/blender/editors/mask/mask_intern.h
index 66a6c75272e..e9ef06a368f 100644
--- a/source/blender/editors/mask/mask_intern.h
+++ b/source/blender/editors/mask/mask_intern.h
@@ -121,8 +121,8 @@ void ED_mask_select_toggle_all(struct Mask *mask, int action);
void ED_mask_select_flush_all(struct Mask *mask);
/* mask_editor.c */
-int ED_maskedit_poll(struct bContext *C);
-int ED_maskedit_mask_poll(struct bContext *C);
+bool ED_maskedit_poll(struct bContext *C);
+bool ED_maskedit_mask_poll(struct bContext *C);
/* mask_shapekey.c */
void MASK_OT_shape_key_insert(struct wmOperatorType *ot);
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 97d5ee1eff0..cf67a9715a8 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -2105,7 +2105,7 @@ void MASK_OT_feather_weight_clear(wmOperatorType *ot)
/******************** move mask layer operator *********************/
-static int mask_layer_move_poll(bContext *C)
+static bool mask_layer_move_poll(bContext *C)
{
if (ED_maskedit_mask_poll(C)) {
Mask *mask = CTX_data_edit_mask(C);
@@ -2334,7 +2334,7 @@ void MASK_OT_copy_splines(wmOperatorType *ot)
/********************** paste tracks from clipboard operator *********************/
-static int paste_splines_poll(bContext *C)
+static bool paste_splines_poll(bContext *C)
{
if (ED_maskedit_mask_poll(C)) {
return BKE_mask_clipboard_is_empty() == false;
diff --git a/source/blender/editors/mesh/editmesh_select.c b/source/blender/editors/mesh/editmesh_select.c
index 019aa6d4201..968c276c8bd 100644
--- a/source/blender/editors/mesh/editmesh_select.c
+++ b/source/blender/editors/mesh/editmesh_select.c
@@ -3833,7 +3833,7 @@ void MESH_OT_select_random(wmOperatorType *ot)
/** \name Select Ungrouped Operator
* \{ */
-static int edbm_select_ungrouped_poll(bContext *C)
+static bool edbm_select_ungrouped_poll(bContext *C)
{
if (ED_operator_editmesh(C)) {
Object *obedit = CTX_data_edit_object(C);
diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c
index 4500aeda70a..250d8ca23c1 100644
--- a/source/blender/editors/mesh/editmesh_utils.c
+++ b/source/blender/editors/mesh/editmesh_utils.c
@@ -1384,7 +1384,7 @@ DerivedMesh *EDBM_mesh_deform_dm_get(BMEditMesh *em)
* \{ */
/* poll call for mesh operators requiring a view3d context */
-int EDBM_view3d_poll(bContext *C)
+bool EDBM_view3d_poll(bContext *C)
{
if (ED_operator_editmesh(C) && ED_operator_view3d_active(C)) {
return 1;
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 0c0be5ac580..37d3eb22e19 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -521,7 +521,7 @@ bool ED_mesh_color_remove_named(Mesh *me, const char *name)
/*********************** UV texture operators ************************/
-static int layers_poll(bContext *C)
+static bool layers_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -762,7 +762,7 @@ static int mesh_customdata_clear_exec__internal(bContext *C,
}
/* Clear Mask */
-static int mesh_customdata_mask_clear_poll(bContext *C)
+static bool mesh_customdata_mask_clear_poll(bContext *C)
{
Object *ob = ED_object_context(C);
if (ob && ob->type == OB_MESH) {
@@ -835,7 +835,7 @@ static int mesh_customdata_skin_state(bContext *C)
return -1;
}
-static int mesh_customdata_skin_add_poll(bContext *C)
+static bool mesh_customdata_skin_add_poll(bContext *C)
{
return (mesh_customdata_skin_state(C) == 0);
}
@@ -868,7 +868,7 @@ void MESH_OT_customdata_skin_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int mesh_customdata_skin_clear_poll(bContext *C)
+static bool mesh_customdata_skin_clear_poll(bContext *C)
{
return (mesh_customdata_skin_state(C) == 1);
}
diff --git a/source/blender/editors/mesh/mesh_intern.h b/source/blender/editors/mesh/mesh_intern.h
index 74da7405d05..593e6b59d85 100644
--- a/source/blender/editors/mesh/mesh_intern.h
+++ b/source/blender/editors/mesh/mesh_intern.h
@@ -73,7 +73,7 @@ bool EDBM_op_finish(struct BMEditMesh *em, struct BMOperator *bmop,
void EDBM_stats_update(struct BMEditMesh *em);
-int EDBM_view3d_poll(struct bContext *C);
+bool EDBM_view3d_poll(struct bContext *C);
struct BMElem *EDBM_elem_from_selectmode(
struct BMEditMesh *em,
diff --git a/source/blender/editors/mesh/mesh_navmesh.c b/source/blender/editors/mesh/mesh_navmesh.c
index 5cfb269cbc3..b18b6bcb7e7 100644
--- a/source/blender/editors/mesh/mesh_navmesh.c
+++ b/source/blender/editors/mesh/mesh_navmesh.c
@@ -654,7 +654,7 @@ void MESH_OT_navmesh_face_add(struct wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int navmesh_obmode_data_poll(bContext *C)
+static bool navmesh_obmode_data_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
@@ -664,7 +664,7 @@ static int navmesh_obmode_data_poll(bContext *C)
return false;
}
-static int navmesh_obmode_poll(bContext *C)
+static bool navmesh_obmode_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
if (ob && (ob->mode == OB_MODE_OBJECT) && (ob->type == OB_MESH)) {
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c
index f2e1c654141..e977dea6140 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -1582,7 +1582,7 @@ static void curvetomesh(Main *bmain, Scene *scene, Object *ob)
}
}
-static int convert_poll(bContext *C)
+static bool convert_poll(bContext *C)
{
Object *obact = CTX_data_active_object(C);
Scene *scene = CTX_data_scene(C);
@@ -2425,7 +2425,7 @@ void OBJECT_OT_add_named(wmOperatorType *ot)
/**************************** Join *************************/
-static int join_poll(bContext *C)
+static bool join_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -2478,7 +2478,7 @@ void OBJECT_OT_join(wmOperatorType *ot)
/**************************** Join as Shape Key*************************/
-static int join_shapes_poll(bContext *C)
+static bool join_shapes_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c
index 6c178948b70..214c995a26e 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -576,7 +576,7 @@ static const EnumPropertyItem constraint_owner_items[] = {
{0, NULL, 0, NULL, NULL}};
-static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
+static bool edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", rna_type);
Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
@@ -599,7 +599,7 @@ static int edit_constraint_poll_generic(bContext *C, StructRNA *rna_type)
return 1;
}
-static int edit_constraint_poll(bContext *C)
+static bool edit_constraint_poll(bContext *C)
{
return edit_constraint_poll_generic(C, &RNA_Constraint);
}
@@ -1251,7 +1251,7 @@ void ED_object_constraint_dependency_tag_update(Main *bmain, Object *ob, bConstr
DAG_relations_tag_update(bmain);
}
-static int constraint_poll(bContext *C)
+static bool constraint_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "constraint", &RNA_Constraint);
return (ptr.id.data && ptr.data);
diff --git a/source/blender/editors/object/object_data_transfer.c b/source/blender/editors/object/object_data_transfer.c
index 7845cfe1022..384bea3701f 100644
--- a/source/blender/editors/object/object_data_transfer.c
+++ b/source/blender/editors/object/object_data_transfer.c
@@ -445,7 +445,7 @@ static int data_transfer_exec(bContext *C, wmOperator *op)
/* Used by both OBJECT_OT_data_transfer and OBJECT_OT_datalayout_transfer */
/* Note this context poll is only really partial, it cannot check for all possible invalid cases. */
-static int data_transfer_poll(bContext *C)
+static bool data_transfer_poll(bContext *C)
{
Object *ob = ED_object_active_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -613,7 +613,7 @@ void OBJECT_OT_data_transfer(wmOperatorType *ot)
* or as a DataTransfer modifier tool.
*/
-static int datalayout_transfer_poll(bContext *C)
+static bool datalayout_transfer_poll(bContext *C)
{
return (edit_modifier_poll_generic(C, &RNA_DataTransferModifier, (1 << OB_MESH)) || data_transfer_poll(C));
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 056ce6b03c6..fc967dc424e 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -654,7 +654,7 @@ static int editmode_toggle_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int editmode_toggle_poll(bContext *C)
+static bool editmode_toggle_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -1348,7 +1348,7 @@ void OBJECT_OT_paths_calculate(wmOperatorType *ot)
/* --------- */
-static int object_update_paths_poll(bContext *C)
+static bool object_update_paths_poll(bContext *C)
{
if (ED_operator_object_active_editable(C)) {
Object *ob = ED_object_active_context(C);
@@ -1516,7 +1516,7 @@ static int shade_smooth_exec(bContext *C, wmOperator *op)
return (done) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int shade_poll(bContext *C)
+static bool shade_poll(bContext *C)
{
return (CTX_data_edit_object(C) == NULL);
}
@@ -1665,7 +1665,7 @@ static const EnumPropertyItem *object_mode_set_itemsf(
return item;
}
-static int object_mode_set_poll(bContext *C)
+static bool object_mode_set_poll(bContext *C)
{
/* Since Grease Pencil editmode is also handled here,
* we have a special exception for allowing this operator
diff --git a/source/blender/editors/object/object_hook.c b/source/blender/editors/object/object_hook.c
index 3773968c8ee..bfc24d4f325 100644
--- a/source/blender/editors/object/object_hook.c
+++ b/source/blender/editors/object/object_hook.c
@@ -431,7 +431,7 @@ static void object_hook_select(Object *ob, HookModifierData *hmd)
/* special poll operators for hook operators */
/* TODO: check for properties window modifier context too as alternative? */
-static int hook_op_edit_poll(bContext *C)
+static bool hook_op_edit_poll(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
diff --git a/source/blender/editors/object/object_intern.h b/source/blender/editors/object/object_intern.h
index e4c42afe3cb..f962f83844b 100644
--- a/source/blender/editors/object/object_intern.h
+++ b/source/blender/editors/object/object_intern.h
@@ -148,8 +148,8 @@ void GROUP_OT_objects_add_active(struct wmOperatorType *ot);
void GROUP_OT_objects_remove_active(struct wmOperatorType *ot);
/* object_modifier.c */
-int edit_modifier_poll_generic(struct bContext *C, struct StructRNA *rna_type, int obtype_flag);
-int edit_modifier_poll(struct bContext *C);
+bool edit_modifier_poll_generic(struct bContext *C, struct StructRNA *rna_type, int obtype_flag);
+bool edit_modifier_poll(struct bContext *C);
void edit_modifier_properties(struct wmOperatorType *ot);
int edit_modifier_invoke_properties(struct bContext *C, struct wmOperator *op);
struct ModifierData *edit_modifier_property_get(struct wmOperator *op, struct Object *ob, int type);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 9dbb724c9f7..5f3a6d0ac94 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -814,7 +814,7 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot)
/************************ generic functions for operators using mod names and data context *********************/
-int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
+bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "modifier", rna_type);
Object *ob = (ptr.id.data) ? ptr.id.data : ED_object_active_context(C);
@@ -826,7 +826,7 @@ int edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, int obtype_flag
return 1;
}
-int edit_modifier_poll(bContext *C)
+bool edit_modifier_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_Modifier, 0);
}
@@ -1127,7 +1127,7 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot)
/************* multires delete higher levels operator ****************/
-static int multires_poll(bContext *C)
+static bool multires_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_MultiresModifier, (1 << OB_MESH));
}
@@ -1452,13 +1452,13 @@ static void modifier_skin_customdata_delete(Object *ob)
CustomData_free_layer_active(&me->vdata, CD_MVERT_SKIN, me->totvert);
}
-static int skin_poll(bContext *C)
+static bool skin_poll(bContext *C)
{
return (!CTX_data_edit_object(C) &&
edit_modifier_poll_generic(C, &RNA_SkinModifier, (1 << OB_MESH)));
}
-static int skin_edit_poll(bContext *C)
+static bool skin_edit_poll(bContext *C)
{
return (CTX_data_edit_object(C) &&
edit_modifier_poll_generic(C, &RNA_SkinModifier, (1 << OB_MESH)));
@@ -1824,7 +1824,7 @@ void OBJECT_OT_skin_armature_create(wmOperatorType *ot)
}
/************************ delta mush bind operator *********************/
-static int correctivesmooth_poll(bContext *C)
+static bool correctivesmooth_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_CorrectiveSmoothModifier, 0);
}
@@ -1892,7 +1892,7 @@ void OBJECT_OT_correctivesmooth_bind(wmOperatorType *ot)
/************************ mdef bind operator *********************/
-static int meshdeform_poll(bContext *C)
+static bool meshdeform_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_MeshDeformModifier, 0);
}
@@ -1988,7 +1988,7 @@ void OBJECT_OT_meshdeform_bind(wmOperatorType *ot)
/****************** explode refresh operator *********************/
-static int explode_poll(bContext *C)
+static bool explode_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_ExplodeModifier, 0);
}
@@ -2036,7 +2036,7 @@ void OBJECT_OT_explode_refresh(wmOperatorType *ot)
/****************** ocean bake operator *********************/
-static int ocean_bake_poll(bContext *C)
+static bool ocean_bake_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_OceanModifier, 0);
}
@@ -2254,7 +2254,7 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot)
/************************ LaplacianDeform bind operator *********************/
-static int laplaciandeform_poll(bContext *C)
+static bool laplaciandeform_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_LaplacianDeformModifier, 0);
}
@@ -2304,7 +2304,7 @@ void OBJECT_OT_laplaciandeform_bind(wmOperatorType *ot)
/************************ sdef bind operator *********************/
-static int surfacedeform_bind_poll(bContext *C)
+static bool surfacedeform_bind_poll(bContext *C)
{
return edit_modifier_poll_generic(C, &RNA_SurfaceDeformModifier, 0);
}
diff --git a/source/blender/editors/object/object_ops.c b/source/blender/editors/object/object_ops.c
index 9a0b37e6dab..407cddedbb0 100644
--- a/source/blender/editors/object/object_ops.c
+++ b/source/blender/editors/object/object_ops.c
@@ -274,7 +274,7 @@ void ED_operatormacros_object(void)
}
-static int object_mode_poll(bContext *C)
+static bool object_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return (!ob || ob->mode == OB_MODE_OBJECT);
diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c
index e904545d26b..286a7e09581 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -114,7 +114,7 @@
/*********************** Make Vertex Parent Operator ************************/
-static int vertex_parent_set_poll(bContext *C)
+static bool vertex_parent_set_poll(bContext *C)
{
return ED_operator_editmesh(C) || ED_operator_editsurfcurve(C) || ED_operator_editlattice(C);
}
diff --git a/source/blender/editors/object/object_select.c b/source/blender/editors/object/object_select.c
index 6b53807ce1c..2fc6207d6c1 100644
--- a/source/blender/editors/object/object_select.c
+++ b/source/blender/editors/object/object_select.c
@@ -121,7 +121,7 @@ void ED_base_object_activate(bContext *C, Base *base)
/********************** Selection Operators **********************/
-static int objects_selectable_poll(bContext *C)
+static bool objects_selectable_poll(bContext *C)
{
/* we don't check for linked scenes here, selection is
* still allowed then for inspection of scene */
diff --git a/source/blender/editors/object/object_shapekey.c b/source/blender/editors/object/object_shapekey.c
index 286d2e48c7d..eec8b60cef0 100644
--- a/source/blender/editors/object/object_shapekey.c
+++ b/source/blender/editors/object/object_shapekey.c
@@ -222,14 +222,14 @@ static bool object_shape_key_mirror(bContext *C, Object *ob,
/********************** shape key operators *********************/
-static int shape_key_mode_poll(bContext *C)
+static bool shape_key_mode_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
return (ob && !ID_IS_LINKED(ob) && data && !ID_IS_LINKED(data) && ob->mode != OB_MODE_EDIT);
}
-static int shape_key_mode_exists_poll(bContext *C)
+static bool shape_key_mode_exists_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -240,7 +240,7 @@ static int shape_key_mode_exists_poll(bContext *C)
(BKE_keyblock_from_object(ob) != NULL);
}
-static int shape_key_move_poll(bContext *C)
+static bool shape_key_move_poll(bContext *C)
{
/* Same as shape_key_mode_exists_poll above, but ensure we have at least two shapes! */
Object *ob = ED_object_context(C);
@@ -251,7 +251,7 @@ static int shape_key_move_poll(bContext *C)
ob->mode != OB_MODE_EDIT && key && key->totkey > 1);
}
-static int shape_key_poll(bContext *C)
+static bool shape_key_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
diff --git a/source/blender/editors/object/object_vgroup.c b/source/blender/editors/object/object_vgroup.c
index fcb2d45f73b..6c5076ef563 100644
--- a/source/blender/editors/object/object_vgroup.c
+++ b/source/blender/editors/object/object_vgroup.c
@@ -2480,7 +2480,7 @@ static void vgroup_assign_verts(Object *ob, const float weight)
/********************** vertex group operators *********************/
-static int vertex_group_poll(bContext *C)
+static bool vertex_group_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2491,7 +2491,7 @@ static int vertex_group_poll(bContext *C)
ob->defbase.first);
}
-static int vertex_group_supported_poll(bContext *C)
+static bool vertex_group_supported_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2499,7 +2499,7 @@ static int vertex_group_supported_poll(bContext *C)
data && !ID_IS_LINKED(data));
}
-static int vertex_group_mesh_poll(bContext *C)
+static bool vertex_group_mesh_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2510,7 +2510,7 @@ static int vertex_group_mesh_poll(bContext *C)
ob->defbase.first);
}
-static int UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
+static bool UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2518,7 +2518,7 @@ static int UNUSED_FUNCTION(vertex_group_mesh_supported_poll)(bContext *C)
}
-static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
+static bool UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2530,7 +2530,7 @@ static int UNUSED_FUNCTION(vertex_group_poll_edit) (bContext *C)
}
/* editmode _or_ weight paint vertex sel */
-static int vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const short ob_type_flag)
+static bool vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const short ob_type_flag)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2565,25 +2565,25 @@ static int vertex_group_vert_poll_ex(bContext *C, const bool needs_select, const
}
#if 0
-static int vertex_group_vert_poll(bContext *C)
+static bool vertex_group_vert_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, false, 0);
}
#endif
-static int vertex_group_mesh_vert_poll(bContext *C)
+static bool vertex_group_mesh_vert_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, false, (1 << OB_MESH));
}
-static int vertex_group_vert_select_poll(bContext *C)
+static bool vertex_group_vert_select_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, true, 0);
}
#if 0
-static int vertex_group_mesh_vert_select_poll(bContext *C)
+static bool vertex_group_mesh_vert_select_poll(bContext *C)
{
return vertex_group_vert_poll_ex(C, true, (1 << OB_MESH));
}
@@ -2591,7 +2591,7 @@ static int vertex_group_mesh_vert_select_poll(bContext *C)
/* editmode _or_ weight paint vertex sel and active group unlocked */
-static int vertex_group_vert_select_unlocked_poll(bContext *C)
+static bool vertex_group_vert_select_unlocked_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
@@ -2614,7 +2614,7 @@ static int vertex_group_vert_select_unlocked_poll(bContext *C)
return 1;
}
-static int vertex_group_vert_select_mesh_poll(bContext *C)
+static bool vertex_group_vert_select_mesh_poll(bContext *C)
{
Object *ob = ED_object_context(C);
ID *data = (ob) ? ob->data : NULL;
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index dabdea34381..73ed8b016ef 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -86,7 +86,7 @@
/**************************** utilities *******************************/
-int PE_poll(bContext *C)
+bool PE_poll(bContext *C)
{
Main *bmain = CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
@@ -98,7 +98,7 @@ int PE_poll(bContext *C)
return (PE_get_current(bmain, scene, ob) != NULL);
}
-int PE_hair_poll(bContext *C)
+bool PE_hair_poll(bContext *C)
{
Main *bmain = CTX_data_main(C);
Scene *scene= CTX_data_scene(C);
@@ -113,7 +113,7 @@ int PE_hair_poll(bContext *C)
return (edit && edit->psys);
}
-int PE_poll_view3d(bContext *C)
+bool PE_poll_view3d(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
ARegion *ar = CTX_wm_region(C);
@@ -4071,7 +4071,7 @@ void PARTICLE_OT_brush_edit(wmOperatorType *ot)
/*********************** cut shape ***************************/
-static int shape_cut_poll(bContext *C)
+static bool shape_cut_poll(bContext *C)
{
if (PE_hair_poll(C)) {
Scene *scene = CTX_data_scene(C);
@@ -4397,7 +4397,7 @@ void PE_create_particle_edit(Main *bmain, Scene *scene, Object *ob, PointCache *
}
}
-static int particle_edit_toggle_poll(bContext *C)
+static bool particle_edit_toggle_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c
index 873ea196c35..087d3182d8c 100644
--- a/source/blender/editors/physics/particle_object.c
+++ b/source/blender/editors/physics/particle_object.c
@@ -154,7 +154,7 @@ void OBJECT_OT_particle_system_remove(wmOperatorType *ot)
/********************** new particle settings operator *********************/
-static int psys_poll(bContext *C)
+static bool psys_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "particle_system", &RNA_ParticleSystem);
return (ptr.data != NULL);
@@ -1105,7 +1105,7 @@ static bool copy_particle_systems_to_object(Main *bmain,
return true;
}
-static int copy_particle_systems_poll(bContext *C)
+static bool copy_particle_systems_poll(bContext *C)
{
Object *ob;
if (!ED_operator_object_active_editable(C))
@@ -1182,7 +1182,7 @@ void PARTICLE_OT_copy_particle_systems(wmOperatorType *ot)
RNA_def_boolean(ot->srna, "use_active", false, "Use Active", "Use the active particle system from the context");
}
-static int duplicate_particle_systems_poll(bContext *C)
+static bool duplicate_particle_systems_poll(bContext *C)
{
if (!ED_operator_object_active_editable(C)) {
return false;
diff --git a/source/blender/editors/physics/physics_pointcache.c b/source/blender/editors/physics/physics_pointcache.c
index abd95cc37f1..51c5955d507 100644
--- a/source/blender/editors/physics/physics_pointcache.c
+++ b/source/blender/editors/physics/physics_pointcache.c
@@ -56,12 +56,12 @@
#include "physics_intern.h"
-static int ptcache_bake_all_poll(bContext *C)
+static bool ptcache_bake_all_poll(bContext *C)
{
return CTX_data_scene(C) != NULL;
}
-static int ptcache_poll(bContext *C)
+static bool ptcache_poll(bContext *C)
{
PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
return (ptr.data && ptr.id.data);
diff --git a/source/blender/editors/physics/rigidbody_constraint.c b/source/blender/editors/physics/rigidbody_constraint.c
index 85478673f96..0c612cc5855 100644
--- a/source/blender/editors/physics/rigidbody_constraint.c
+++ b/source/blender/editors/physics/rigidbody_constraint.c
@@ -59,7 +59,7 @@
/* ********************************************** */
/* Helper API's for RigidBody Constraint Editing */
-static int ED_operator_rigidbody_con_active_poll(bContext *C)
+static bool ED_operator_rigidbody_con_active_poll(bContext *C)
{
if (ED_operator_object_active_editable(C)) {
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/physics/rigidbody_object.c b/source/blender/editors/physics/rigidbody_object.c
index fa7298489b1..ec6de52ebc1 100644
--- a/source/blender/editors/physics/rigidbody_object.c
+++ b/source/blender/editors/physics/rigidbody_object.c
@@ -65,7 +65,7 @@
/* ********************************************** */
/* Helper API's for RigidBody Objects Editing */
-static int ED_operator_rigidbody_active_poll(bContext *C)
+static bool ED_operator_rigidbody_active_poll(bContext *C)
{
if (ED_operator_object_active_editable(C)) {
Object *ob = ED_object_active_context(C);
@@ -75,7 +75,7 @@ static int ED_operator_rigidbody_active_poll(bContext *C)
return 0;
}
-static int ED_operator_rigidbody_add_poll(bContext *C)
+static bool ED_operator_rigidbody_add_poll(bContext *C)
{
if (ED_operator_object_active_editable(C)) {
Object *ob = ED_object_active_context(C);
diff --git a/source/blender/editors/physics/rigidbody_world.c b/source/blender/editors/physics/rigidbody_world.c
index 8d5258a7522..fe2be86dd98 100644
--- a/source/blender/editors/physics/rigidbody_world.c
+++ b/source/blender/editors/physics/rigidbody_world.c
@@ -58,12 +58,12 @@
/* API */
/* check if there is an active rigid body world */
-static int ED_rigidbody_world_active_poll(bContext *C)
+static bool ED_rigidbody_world_active_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
return (scene && scene->rigidbody_world);
}
-static int ED_rigidbody_world_add_poll(bContext *C)
+static bool ED_rigidbody_world_add_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
return (scene && scene->rigidbody_world == NULL);
diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c
index c27b85c600f..5b198774b71 100644
--- a/source/blender/editors/render/render_shading.c
+++ b/source/blender/editors/render/render_shading.c
@@ -682,7 +682,7 @@ void SCENE_OT_render_layer_remove(wmOperatorType *ot)
/********************** render view operators *********************/
-static int render_view_remove_poll(bContext *C)
+static bool render_view_remove_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
@@ -760,7 +760,7 @@ static bool freestyle_linestyle_check_report(FreestyleLineSet *lineset, ReportLi
return true;
}
-static int freestyle_active_module_poll(bContext *C)
+static bool freestyle_active_module_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "freestyle_module", &RNA_FreestyleModuleSettings);
FreestyleModuleConfig *module = ptr.data;
@@ -893,7 +893,7 @@ void SCENE_OT_freestyle_lineset_add(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
}
-static int freestyle_active_lineset_poll(bContext *C)
+static bool freestyle_active_lineset_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
SceneRenderLayer *srl = BLI_findlink(&scene->r.layers, scene->r.actlay);
@@ -1585,7 +1585,7 @@ static int envmap_save_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED
return OPERATOR_RUNNING_MODAL;
}
-static int envmap_save_poll(bContext *C)
+static bool envmap_save_poll(bContext *C)
{
Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
@@ -1639,7 +1639,7 @@ static int envmap_clear_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int envmap_clear_poll(bContext *C)
+static bool envmap_clear_poll(bContext *C)
{
Tex *tex = CTX_data_pointer_get_type(C, "texture", &RNA_Texture).data;
@@ -1858,7 +1858,7 @@ static int copy_mtex_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int copy_mtex_poll(bContext *C)
+static bool copy_mtex_poll(bContext *C)
{
ID *id = CTX_data_pointer_get_type(C, "texture_slot", &RNA_TextureSlot).id.data;
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index 6418db3e279..411469b539b 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -95,7 +95,7 @@
/** \name Public Poll API
* \{ */
-int ED_operator_regionactive(bContext *C)
+bool ED_operator_regionactive(bContext *C)
{
if (CTX_wm_window(C) == NULL) return 0;
if (CTX_wm_screen(C) == NULL) return 0;
@@ -103,7 +103,7 @@ int ED_operator_regionactive(bContext *C)
return 1;
}
-int ED_operator_areaactive(bContext *C)
+bool ED_operator_areaactive(bContext *C)
{
if (CTX_wm_window(C) == NULL) return 0;
if (CTX_wm_screen(C) == NULL) return 0;
@@ -111,7 +111,7 @@ int ED_operator_areaactive(bContext *C)
return 1;
}
-int ED_operator_screenactive(bContext *C)
+bool ED_operator_screenactive(bContext *C)
{
if (CTX_wm_window(C) == NULL) return 0;
if (CTX_wm_screen(C) == NULL) return 0;
@@ -119,7 +119,7 @@ int ED_operator_screenactive(bContext *C)
}
/* XXX added this to prevent anim state to change during renders */
-static int ED_operator_screenactive_norender(bContext *C)
+static bool ED_operator_screenactive_norender(bContext *C)
{
if (G.is_rendering) return 0;
if (CTX_wm_window(C) == NULL) return 0;
@@ -128,7 +128,7 @@ static int ED_operator_screenactive_norender(bContext *C)
}
/* when mouse is over area-edge */
-int ED_operator_screen_mainwinactive(bContext *C)
+bool ED_operator_screen_mainwinactive(bContext *C)
{
bScreen *screen;
if (CTX_wm_window(C) == NULL) return 0;
@@ -138,7 +138,7 @@ int ED_operator_screen_mainwinactive(bContext *C)
return 1;
}
-int ED_operator_scene(bContext *C)
+bool ED_operator_scene(bContext *C)
{
Scene *scene = CTX_data_scene(C);
if (scene)
@@ -146,7 +146,7 @@ int ED_operator_scene(bContext *C)
return 0;
}
-int ED_operator_scene_editable(bContext *C)
+bool ED_operator_scene_editable(bContext *C)
{
Scene *scene = CTX_data_scene(C);
if (scene && !ID_IS_LINKED(scene))
@@ -154,7 +154,7 @@ int ED_operator_scene_editable(bContext *C)
return 0;
}
-int ED_operator_objectmode(bContext *C)
+bool ED_operator_objectmode(bContext *C)
{
Scene *scene = CTX_data_scene(C);
Object *obact = CTX_data_active_object(C);
@@ -181,12 +181,12 @@ static bool ed_spacetype_test(bContext *C, int type)
return 0;
}
-int ED_operator_view3d_active(bContext *C)
+bool ED_operator_view3d_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_VIEW3D);
}
-int ED_operator_region_view3d_active(bContext *C)
+bool ED_operator_region_view3d_active(bContext *C)
{
if (CTX_wm_region_view3d(C))
return true;
@@ -196,7 +196,7 @@ int ED_operator_region_view3d_active(bContext *C)
}
/* generic for any view2d which uses anim_ops */
-int ED_operator_animview_active(bContext *C)
+bool ED_operator_animview_active(bContext *C)
{
if (ED_operator_areaactive(C)) {
SpaceLink *sl = (SpaceLink *)CTX_wm_space_data(C);
@@ -208,17 +208,17 @@ int ED_operator_animview_active(bContext *C)
return 0;
}
-int ED_operator_timeline_active(bContext *C)
+bool ED_operator_timeline_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_TIME);
}
-int ED_operator_outliner_active(bContext *C)
+bool ED_operator_outliner_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_OUTLINER);
}
-int ED_operator_outliner_active_no_editobject(bContext *C)
+bool ED_operator_outliner_active_no_editobject(bContext *C)
{
if (ed_spacetype_test(C, SPACE_OUTLINER)) {
Object *ob = ED_object_active_context(C);
@@ -231,22 +231,22 @@ int ED_operator_outliner_active_no_editobject(bContext *C)
return 0;
}
-int ED_operator_file_active(bContext *C)
+bool ED_operator_file_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_FILE);
}
-int ED_operator_action_active(bContext *C)
+bool ED_operator_action_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_ACTION);
}
-int ED_operator_buttons_active(bContext *C)
+bool ED_operator_buttons_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_BUTS);
}
-int ED_operator_node_active(bContext *C)
+bool ED_operator_node_active(bContext *C)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -256,7 +256,7 @@ int ED_operator_node_active(bContext *C)
return 0;
}
-int ED_operator_node_editable(bContext *C)
+bool ED_operator_node_editable(bContext *C)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -266,80 +266,80 @@ int ED_operator_node_editable(bContext *C)
return 0;
}
-int ED_operator_graphedit_active(bContext *C)
+bool ED_operator_graphedit_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_IPO);
}
-int ED_operator_sequencer_active(bContext *C)
+bool ED_operator_sequencer_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_SEQ);
}
-int ED_operator_sequencer_active_editable(bContext *C)
+bool ED_operator_sequencer_active_editable(bContext *C)
{
return ed_spacetype_test(C, SPACE_SEQ) && ED_operator_scene_editable(C);
}
-int ED_operator_image_active(bContext *C)
+bool ED_operator_image_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_IMAGE);
}
-int ED_operator_nla_active(bContext *C)
+bool ED_operator_nla_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_NLA);
}
-int ED_operator_logic_active(bContext *C)
+bool ED_operator_logic_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_LOGIC);
}
-int ED_operator_info_active(bContext *C)
+bool ED_operator_info_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_INFO);
}
-int ED_operator_console_active(bContext *C)
+bool ED_operator_console_active(bContext *C)
{
return ed_spacetype_test(C, SPACE_CONSOLE);
}
-static int ed_object_hidden(Object *ob)
+static bool ed_object_hidden(Object *ob)
{
/* if hidden but in edit mode, we still display, can happen with animation */
return ((ob->restrictflag & OB_RESTRICT_VIEW) && !(ob->mode & OB_MODE_EDIT));
}
-int ED_operator_object_active(bContext *C)
+bool ED_operator_object_active(bContext *C)
{
Object *ob = ED_object_active_context(C);
return ((ob != NULL) && !ed_object_hidden(ob));
}
-int ED_operator_object_active_editable(bContext *C)
+bool ED_operator_object_active_editable(bContext *C)
{
Object *ob = ED_object_active_context(C);
return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob));
}
-int ED_operator_object_active_editable_mesh(bContext *C)
+bool ED_operator_object_active_editable_mesh(bContext *C)
{
Object *ob = ED_object_active_context(C);
return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) &&
(ob->type == OB_MESH) && !ID_IS_LINKED(ob->data));
}
-int ED_operator_object_active_editable_font(bContext *C)
+bool ED_operator_object_active_editable_font(bContext *C)
{
Object *ob = ED_object_active_context(C);
return ((ob != NULL) && !ID_IS_LINKED(ob) && !ed_object_hidden(ob) &&
(ob->type == OB_FONT));
}
-int ED_operator_editmesh(bContext *C)
+bool ED_operator_editmesh(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_MESH)
@@ -347,12 +347,12 @@ int ED_operator_editmesh(bContext *C)
return 0;
}
-int ED_operator_editmesh_view3d(bContext *C)
+bool ED_operator_editmesh_view3d(bContext *C)
{
return ED_operator_editmesh(C) && ED_operator_view3d_active(C);
}
-int ED_operator_editmesh_region_view3d(bContext *C)
+bool ED_operator_editmesh_region_view3d(bContext *C)
{
if (ED_operator_editmesh(C) && CTX_wm_region_view3d(C))
return 1;
@@ -361,7 +361,7 @@ int ED_operator_editmesh_region_view3d(bContext *C)
return 0;
}
-int ED_operator_editarmature(bContext *C)
+bool ED_operator_editarmature(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_ARMATURE)
@@ -376,7 +376,7 @@ int ED_operator_editarmature(bContext *C)
* when it comes to transforming bones, but managing bones layers/groups
* can be left for pose mode only. (not weight paint mode)
*/
-int ED_operator_posemode_exclusive(bContext *C)
+bool ED_operator_posemode_exclusive(bContext *C)
{
Object *obact = CTX_data_active_object(C);
@@ -394,7 +394,7 @@ int ED_operator_posemode_exclusive(bContext *C)
/* allows for pinned pose objects to be used in the object buttons
* and the non-active pose object to be used in the 3D view */
-int ED_operator_posemode_context(bContext *C)
+bool ED_operator_posemode_context(bContext *C)
{
Object *obpose = ED_pose_object_from_context(C);
@@ -407,7 +407,7 @@ int ED_operator_posemode_context(bContext *C)
return 0;
}
-int ED_operator_posemode(bContext *C)
+bool ED_operator_posemode(bContext *C)
{
Object *obact = CTX_data_active_object(C);
@@ -423,7 +423,7 @@ int ED_operator_posemode(bContext *C)
return 0;
}
-int ED_operator_posemode_local(bContext *C)
+bool ED_operator_posemode_local(bContext *C)
{
if (ED_operator_posemode(C)) {
Object *ob = BKE_object_pose_armature_get(CTX_data_active_object(C));
@@ -435,21 +435,21 @@ int ED_operator_posemode_local(bContext *C)
}
/* wrapper for ED_space_image_show_uvedit */
-int ED_operator_uvedit(bContext *C)
+bool ED_operator_uvedit(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
Object *obedit = CTX_data_edit_object(C);
return ED_space_image_show_uvedit(sima, obedit);
}
-int ED_operator_uvedit_space_image(bContext *C)
+bool ED_operator_uvedit_space_image(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
Object *obedit = CTX_data_edit_object(C);
return sima && ED_space_image_show_uvedit(sima, obedit);
}
-int ED_operator_uvmap(bContext *C)
+bool ED_operator_uvmap(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
BMEditMesh *em = NULL;
@@ -465,7 +465,7 @@ int ED_operator_uvmap(bContext *C)
return false;
}
-int ED_operator_editsurfcurve(bContext *C)
+bool ED_operator_editsurfcurve(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && ELEM(obedit->type, OB_CURVE, OB_SURF))
@@ -473,7 +473,7 @@ int ED_operator_editsurfcurve(bContext *C)
return 0;
}
-int ED_operator_editsurfcurve_region_view3d(bContext *C)
+bool ED_operator_editsurfcurve_region_view3d(bContext *C)
{
if (ED_operator_editsurfcurve(C) && CTX_wm_region_view3d(C))
return 1;
@@ -482,7 +482,7 @@ int ED_operator_editsurfcurve_region_view3d(bContext *C)
return 0;
}
-int ED_operator_editcurve(bContext *C)
+bool ED_operator_editcurve(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_CURVE)
@@ -490,7 +490,7 @@ int ED_operator_editcurve(bContext *C)
return 0;
}
-int ED_operator_editcurve_3d(bContext *C)
+bool ED_operator_editcurve_3d(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_CURVE) {
@@ -501,7 +501,7 @@ int ED_operator_editcurve_3d(bContext *C)
return 0;
}
-int ED_operator_editsurf(bContext *C)
+bool ED_operator_editsurf(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_SURF)
@@ -509,7 +509,7 @@ int ED_operator_editsurf(bContext *C)
return 0;
}
-int ED_operator_editfont(bContext *C)
+bool ED_operator_editfont(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_FONT)
@@ -517,7 +517,7 @@ int ED_operator_editfont(bContext *C)
return 0;
}
-int ED_operator_editlattice(bContext *C)
+bool ED_operator_editlattice(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_LATTICE)
@@ -525,7 +525,7 @@ int ED_operator_editlattice(bContext *C)
return 0;
}
-int ED_operator_editmball(bContext *C)
+bool ED_operator_editmball(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_MBALL)
@@ -533,7 +533,7 @@ int ED_operator_editmball(bContext *C)
return 0;
}
-int ED_operator_mask(bContext *C)
+bool ED_operator_mask(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if (sa && sa->spacedata.first) {
@@ -567,7 +567,7 @@ int ED_operator_mask(bContext *C)
/** \name Internal Screen Utilities
* \{ */
-static int screen_active_editable(bContext *C)
+static bool screen_active_editable(bContext *C)
{
if (ED_operator_screenactive(C)) {
/* no full window splitting allowed */
@@ -631,7 +631,7 @@ typedef struct sActionzoneData {
} sActionzoneData;
/* quick poll to save operators to be created and handled */
-static int actionzone_area_poll(bContext *C)
+static bool actionzone_area_poll(bContext *C)
{
wmWindow *win = CTX_wm_window(C);
ScrArea *sa = CTX_wm_area(C);
@@ -4391,7 +4391,7 @@ static const EnumPropertyItem space_context_cycle_direction[] = {
{0, NULL, 0, NULL, NULL}
};
-static int space_context_cycle_poll(bContext *C)
+static bool space_context_cycle_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
/* sa might be NULL if called out of window bounds */
@@ -4555,7 +4555,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
}
-static int open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool open_file_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_PATH) {
if (drag->icon == ICON_FILE_BLEND)
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index ec486954ba3..dda75877f50 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -269,7 +269,7 @@ static void screenshot_draw(bContext *UNUSED(C), wmOperator *op)
uiDefAutoButsRNA(layout, &ptr, screenshot_draw_check_prop, '\0');
}
-static int screenshot_poll(bContext *C)
+static bool screenshot_poll(bContext *C)
{
if (G.background)
return false;
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 3c3b9e91ab9..769f6116dc6 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -1103,7 +1103,7 @@ static void paint_draw_cursor(bContext *C, int x, int y, void *UNUSED(unused))
/* Public API */
-void paint_cursor_start(bContext *C, int (*poll)(bContext *C))
+void paint_cursor_start(bContext *C, bool (*poll)(bContext *C))
{
Paint *p = BKE_paint_get_active_from_context(C);
@@ -1114,7 +1114,7 @@ void paint_cursor_start(bContext *C, int (*poll)(bContext *C))
BKE_paint_invalidate_overlay_all();
}
-void paint_cursor_start_explicit(Paint *p, wmWindowManager *wm, int (*poll)(bContext *C))
+void paint_cursor_start_explicit(Paint *p, wmWindowManager *wm, bool (*poll)(bContext *C))
{
if (p && !p->paint_cursor)
p->paint_cursor = WM_paint_cursor_activate(wm, poll, paint_draw_cursor, NULL);
diff --git a/source/blender/editors/sculpt_paint/paint_curve.c b/source/blender/editors/sculpt_paint/paint_curve.c
index 44abdc34ffb..8d31ad19a99 100644
--- a/source/blender/editors/sculpt_paint/paint_curve.c
+++ b/source/blender/editors/sculpt_paint/paint_curve.c
@@ -55,7 +55,7 @@
#define PAINT_CURVE_SELECT_THRESHOLD 40.0f
#define PAINT_CURVE_POINT_SELECT(pcp, i) (*(&pcp->bez.f1 + i) = SELECT)
-int paint_curve_poll(bContext *C)
+bool paint_curve_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
Paint *p;
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 4902fd78e33..3760dec96d0 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -264,7 +264,7 @@ static Brush *image_paint_brush(bContext *C)
return BKE_paint_brush(&settings->imapaint.paint);
}
-static int image_paint_poll(bContext *C)
+static bool image_paint_poll(bContext *C)
{
Object *obact;
@@ -290,7 +290,7 @@ static int image_paint_poll(bContext *C)
return 0;
}
-static int image_paint_2d_clone_poll(bContext *C)
+static bool image_paint_2d_clone_poll(bContext *C)
{
Brush *brush = image_paint_brush(C);
@@ -976,7 +976,7 @@ static int sample_color_modal(bContext *C, wmOperator *op, const wmEvent *event)
return OPERATOR_RUNNING_MODAL;
}
-static int sample_color_poll(bContext *C)
+static bool sample_color_poll(bContext *C)
{
return (image_paint_poll(C) || vertex_paint_poll(C));
}
@@ -1009,7 +1009,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
/******************** texture paint toggle operator ********************/
-static int texture_paint_toggle_poll(bContext *C)
+static bool texture_paint_toggle_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
if (ob == NULL || ob->type != OB_MESH)
@@ -1145,7 +1145,7 @@ static int brush_colors_flip_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int brush_colors_flip_poll(bContext *C)
+static bool brush_colors_flip_poll(bContext *C)
{
if (image_paint_poll(C)) {
Brush *br = image_paint_brush(C);
@@ -1195,7 +1195,7 @@ void ED_imapaint_bucket_fill(struct bContext *C, float color[3], wmOperator *op)
}
-static int texture_paint_poll(bContext *C)
+static bool texture_paint_poll(bContext *C)
{
if (texture_paint_toggle_poll(C))
if (CTX_data_active_object(C)->mode & OB_MODE_TEXTURE_PAINT)
@@ -1204,22 +1204,22 @@ static int texture_paint_poll(bContext *C)
return 0;
}
-int image_texture_paint_poll(bContext *C)
+bool image_texture_paint_poll(bContext *C)
{
return (texture_paint_poll(C) || image_paint_poll(C));
}
-int facemask_paint_poll(bContext *C)
+bool facemask_paint_poll(bContext *C)
{
return BKE_paint_select_face_test(CTX_data_active_object(C));
}
-int vert_paint_poll(bContext *C)
+bool vert_paint_poll(bContext *C)
{
return BKE_paint_select_vert_test(CTX_data_active_object(C));
}
-int mask_paint_poll(bContext *C)
+bool mask_paint_poll(bContext *C)
{
return BKE_paint_select_elem_test(CTX_data_active_object(C));
}
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 4687ec3f5cb..e9fdbdb7f26 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -5921,7 +5921,7 @@ static int add_simple_uvs_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int add_simple_uvs_poll(bContext *C)
+static bool add_simple_uvs_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index e1ac35c3675..8ba773a2fc8 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -87,16 +87,16 @@ struct ViewContext *paint_stroke_view_context(struct PaintStroke *stroke);
void *paint_stroke_mode_data(struct PaintStroke *stroke);
float paint_stroke_distance_get(struct PaintStroke *stroke);
void paint_stroke_set_mode_data(struct PaintStroke *stroke, void *mode_data);
-int paint_poll(struct bContext *C);
-void paint_cursor_start(struct bContext *C, int (*poll)(struct bContext *C));
-void paint_cursor_start_explicit(struct Paint *p, struct wmWindowManager *wm, int (*poll)(struct bContext *C));
+bool paint_poll(struct bContext *C);
+void paint_cursor_start(struct bContext *C, bool (*poll)(struct bContext *C));
+void paint_cursor_start_explicit(struct Paint *p, struct wmWindowManager *wm, bool (*poll)(struct bContext *C));
void paint_cursor_delete_textures(void);
/* paint_vertex.c */
-int weight_paint_poll(struct bContext *C);
-int weight_paint_mode_poll(struct bContext *C);
-int vertex_paint_poll(struct bContext *C);
-int vertex_paint_mode_poll(struct bContext *C);
+bool weight_paint_poll(struct bContext *C);
+bool weight_paint_mode_poll(struct bContext *C);
+bool vertex_paint_poll(struct bContext *C);
+bool vertex_paint_mode_poll(struct bContext *C);
typedef void (*VPaintTransform_Callback)(const float col[3], const void *user_data, float r_col[3]);
@@ -177,7 +177,7 @@ typedef struct ImagePaintPartialRedraw {
#define IMAPAINT_TILE_SIZE (1 << IMAPAINT_TILE_BITS)
#define IMAPAINT_TILE_NUMBER(size) (((size) + IMAPAINT_TILE_SIZE - 1) >> IMAPAINT_TILE_BITS)
-int image_texture_paint_poll(struct bContext *C);
+bool image_texture_paint_poll(struct bContext *C);
void imapaint_image_update(struct SpaceImage *sima, struct Image *image, struct ImBuf *ibuf, short texpaint);
struct ImagePaintPartialRedraw *get_imapaintpartial(void);
void set_imapaintpartial(struct ImagePaintPartialRedraw *ippr);
@@ -237,8 +237,8 @@ struct ListBase *ED_image_undosys_step_get_tiles(struct UndoStep *us_p);
struct ListBase *ED_image_undo_get_tiles(void);
/* sculpt_uv.c */
-int uv_sculpt_poll(struct bContext *C);
-int uv_sculpt_keymap_poll(struct bContext *C);
+bool uv_sculpt_poll(struct bContext *C);
+bool uv_sculpt_keymap_poll(struct bContext *C);
void SCULPT_OT_uv_sculpt_stroke(struct wmOperatorType *ot);
@@ -282,11 +282,11 @@ void PAINT_OT_face_select_reveal(struct wmOperatorType *ot);
void PAINT_OT_vert_select_all(struct wmOperatorType *ot);
void PAINT_OT_vert_select_ungrouped(struct wmOperatorType *ot);
-int vert_paint_poll(struct bContext *C);
-int mask_paint_poll(struct bContext *C);
-int paint_curve_poll(struct bContext *C);
+bool vert_paint_poll(struct bContext *C);
+bool mask_paint_poll(struct bContext *C);
+bool paint_curve_poll(struct bContext *C);
-int facemask_paint_poll(struct bContext *C);
+bool facemask_paint_poll(struct bContext *C);
void flip_v3_v3(float out[3], const float in[3], const char symm);
void flip_qt_qt(float out[3], const float in[3], const char symm);
diff --git a/source/blender/editors/sculpt_paint/paint_ops.c b/source/blender/editors/sculpt_paint/paint_ops.c
index f03c119a09e..89475d0de8a 100644
--- a/source/blender/editors/sculpt_paint/paint_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_ops.c
@@ -183,7 +183,7 @@ static void PALETTE_OT_new(wmOperatorType *ot)
ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO;
}
-static int palette_poll(bContext *C)
+static bool palette_poll(bContext *C)
{
Paint *paint = BKE_paint_get_active_from_context(C);
@@ -778,7 +778,7 @@ static int stencil_control_modal(bContext *C, wmOperator *op, const wmEvent *eve
return OPERATOR_RUNNING_MODAL;
}
-static int stencil_control_poll(bContext *C)
+static bool stencil_control_poll(bContext *C)
{
ePaintMode mode = BKE_paintmode_get_active_from_context(C);
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index afd24f0fe90..a194b1b3e90 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -1312,7 +1312,7 @@ void paint_stroke_set_mode_data(PaintStroke *stroke, void *mode_data)
stroke->mode_data = mode_data;
}
-int paint_poll(bContext *C)
+bool paint_poll(bContext *C)
{
Paint *p = BKE_paint_get_active_from_context(C);
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 77c9dcf8ac6..f215fdcd579 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -571,7 +571,7 @@ static int brush_curve_preset_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int brush_curve_preset_poll(bContext *C)
+static bool brush_curve_preset_poll(bContext *C)
{
Brush *br = BKE_paint_brush(BKE_paint_get_active_from_context(C));
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c
index 71c2b66c8d3..483c8a77ab5 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex.c
@@ -197,14 +197,14 @@ static void paint_last_stroke_update(Scene *scene, ARegion *ar, const float mval
/* polling - retrieve whether cursor should be set or operator should be done */
/* Returns true if vertex paint mode is active */
-int vertex_paint_mode_poll(bContext *C)
+bool vertex_paint_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return ob && ob->mode == OB_MODE_VERTEX_PAINT && ((Mesh *)ob->data)->totpoly;
}
-int vertex_paint_poll(bContext *C)
+bool vertex_paint_poll(bContext *C)
{
if (vertex_paint_mode_poll(C) &&
BKE_paint_brush(&CTX_data_tool_settings(C)->vpaint->paint))
@@ -219,14 +219,14 @@ int vertex_paint_poll(bContext *C)
return 0;
}
-int weight_paint_mode_poll(bContext *C)
+bool weight_paint_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return ob && ob->mode == OB_MODE_WEIGHT_PAINT && ((Mesh *)ob->data)->totpoly;
}
-int weight_paint_poll(bContext *C)
+bool weight_paint_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
ScrArea *sa;
@@ -1232,7 +1232,7 @@ static int wpaint_mode_toggle_exec(bContext *C, wmOperator *op)
}
/* for switching to/from mode */
-static int paint_poll_test(bContext *C)
+static bool paint_poll_test(bContext *C)
{
Object *ob = CTX_data_active_object(C);
if (ob == NULL || ob->type != OB_MESH)
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
index b69ca32e5af..4959c40c65e 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.c
@@ -48,7 +48,7 @@
#include "paint_intern.h" /* own include */
-static int vertex_weight_paint_mode_poll(bContext *C)
+static bool vertex_weight_paint_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
Mesh *me = BKE_mesh_from_object(ob);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 957cb6a7389..fade31fff0d 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -115,7 +115,7 @@ static void wpaint_prev_destroy(struct WPaintPrev *wpp)
/** \name Weight from Bones Operator
* \{ */
-static int weight_from_bones_poll(bContext *C)
+static bool weight_from_bones_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 280e22084cc..74baa267b69 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -4079,25 +4079,25 @@ static void sculpt_update_tex(const Scene *scene, Sculpt *sd, SculptSession *ss)
-int sculpt_mode_poll(bContext *C)
+bool sculpt_mode_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
return ob && ob->mode & OB_MODE_SCULPT;
}
-int sculpt_mode_poll_view3d(bContext *C)
+bool sculpt_mode_poll_view3d(bContext *C)
{
return (sculpt_mode_poll(C) &&
CTX_wm_region_view3d(C));
}
-int sculpt_poll_view3d(bContext *C)
+bool sculpt_poll_view3d(bContext *C)
{
return (sculpt_poll(C) &&
CTX_wm_region_view3d(C));
}
-int sculpt_poll(bContext *C)
+bool sculpt_poll(bContext *C)
{
return sculpt_mode_poll(C) && paint_poll(C);
}
@@ -5527,7 +5527,7 @@ static int sculpt_optimize_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int sculpt_and_dynamic_topology_poll(bContext *C)
+static bool sculpt_and_dynamic_topology_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
@@ -5826,7 +5826,7 @@ static void SCULPT_OT_sculptmode_toggle(wmOperatorType *ot)
}
-static int sculpt_and_dynamic_topology_constant_detail_poll(bContext *C)
+static bool sculpt_and_dynamic_topology_constant_detail_poll(bContext *C)
{
Object *ob = CTX_data_active_object(C);
Sculpt *sd = CTX_data_tool_settings(C)->sculpt;
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h
index 1c94c1d9198..137e957dce6 100644
--- a/source/blender/editors/sculpt_paint/sculpt_intern.h
+++ b/source/blender/editors/sculpt_paint/sculpt_intern.h
@@ -48,11 +48,11 @@ struct Object;
struct SculptUndoNode;
struct SculptOrigVertData;
-int sculpt_mode_poll(struct bContext *C);
-int sculpt_mode_poll_view3d(struct bContext *C);
+bool sculpt_mode_poll(struct bContext *C);
+bool sculpt_mode_poll_view3d(struct bContext *C);
/* checks for a brush, not just sculpt mode */
-int sculpt_poll(struct bContext *C);
-int sculpt_poll_view3d(struct bContext *C);
+bool sculpt_poll(struct bContext *C);
+bool sculpt_poll_view3d(struct bContext *C);
/* Stroke */
bool sculpt_stroke_get_location(struct bContext *C, float out[3], const float mouse[2]);
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 78274332660..7e30c8b5b23 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -158,7 +158,7 @@ static Brush *uv_sculpt_brush(bContext *C)
}
-static int uv_sculpt_brush_poll_do(bContext *C, const bool check_region)
+static bool uv_sculpt_brush_poll_do(bContext *C, const bool check_region)
{
BMEditMesh *em;
int ret;
@@ -186,7 +186,7 @@ static int uv_sculpt_brush_poll_do(bContext *C, const bool check_region)
return ret;
}
-static int uv_sculpt_brush_poll(bContext *C)
+static bool uv_sculpt_brush_poll(bContext *C)
{
return uv_sculpt_brush_poll_do(C, true);
}
@@ -246,8 +246,9 @@ void ED_space_image_uv_sculpt_update(Main *bmain, wmWindowManager *wm, Scene *sc
BKE_paint_init(bmain, scene, ePaintSculptUV, PAINT_CURSOR_SCULPT);
- settings->uvsculpt->paint.paint_cursor = WM_paint_cursor_activate(wm, uv_sculpt_brush_poll,
- brush_drawcursor_uvsculpt, NULL);
+ settings->uvsculpt->paint.paint_cursor = WM_paint_cursor_activate(
+ wm, uv_sculpt_brush_poll,
+ brush_drawcursor_uvsculpt, NULL);
}
else {
if (settings->uvsculpt) {
@@ -257,12 +258,12 @@ void ED_space_image_uv_sculpt_update(Main *bmain, wmWindowManager *wm, Scene *sc
}
}
-int uv_sculpt_poll(bContext *C)
+bool uv_sculpt_poll(bContext *C)
{
return uv_sculpt_brush_poll_do(C, true);
}
-int uv_sculpt_keymap_poll(bContext *C)
+bool uv_sculpt_keymap_poll(bContext *C)
{
return uv_sculpt_brush_poll_do(C, false);
}
diff --git a/source/blender/editors/sound/sound_ops.c b/source/blender/editors/sound/sound_ops.c
index b91ac3ce1ae..356a5f8074b 100644
--- a/source/blender/editors/sound/sound_ops.c
+++ b/source/blender/editors/sound/sound_ops.c
@@ -702,7 +702,7 @@ static void SOUND_OT_mixdown(wmOperatorType *ot)
/* ******************************************************* */
-static int sound_poll(bContext *C)
+static bool sound_poll(bContext *C)
{
Editing *ed = CTX_data_scene(C)->ed;
diff --git a/source/blender/editors/space_action/action_data.c b/source/blender/editors/space_action/action_data.c
index 74c9f2f8cfb..8d4596a79a7 100644
--- a/source/blender/editors/space_action/action_data.c
+++ b/source/blender/editors/space_action/action_data.c
@@ -175,7 +175,7 @@ static void actedit_change_action(bContext *C, bAction *act)
* The NLA Editor is active (i.e. Animation Data panel -> new action)
* 2) The associated AnimData block must not be in tweakmode
*/
-static int action_new_poll(bContext *C)
+static bool action_new_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
@@ -295,7 +295,7 @@ void ACTION_OT_new(wmOperatorType *ot)
* 2) There must be an action active
* 3) The associated AnimData block must not be in tweakmode
*/
-static int action_pushdown_poll(bContext *C)
+static bool action_pushdown_poll(bContext *C)
{
if (ED_operator_action_active(C)) {
SpaceAction *saction = (SpaceAction *)CTX_wm_space_data(C);
@@ -426,7 +426,7 @@ void ACTION_OT_stash(wmOperatorType *ot)
* 1) There must be an dopesheet/action editor, and it must be in a mode which uses actions
* 2) The associated AnimData block must not be in tweakmode
*/
-static int action_stash_create_poll(bContext *C)
+static bool action_stash_create_poll(bContext *C)
{
if (ED_operator_action_active(C)) {
AnimData *adt = ED_actedit_animdata_from_context(C);
@@ -618,7 +618,7 @@ void ED_animedit_unlink_action(bContext *C, ID *id, AnimData *adt, bAction *act,
/* -------------------------- */
-static int action_unlink_poll(bContext *C)
+static bool action_unlink_poll(bContext *C)
{
if (ED_operator_action_active(C)) {
SpaceAction *saction = (SpaceAction *)CTX_wm_space_data(C);
@@ -749,7 +749,7 @@ static void action_layer_switch_strip(AnimData *adt,
/* ********************** One Layer Up Operator ************************** */
-static int action_layer_next_poll(bContext *C)
+static bool action_layer_next_poll(bContext *C)
{
/* Action Editor's action editing modes only */
if (ED_operator_action_active(C)) {
@@ -860,7 +860,7 @@ void ACTION_OT_layer_next(wmOperatorType *ot)
/* ********************* One Layer Down Operator ************************* */
-static int action_layer_prev_poll(bContext *C)
+static bool action_layer_prev_poll(bContext *C)
{
/* Action Editor's action editing modes only */
if (ED_operator_action_active(C)) {
diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
index bbad78c1416..ae320aec6f4 100644
--- a/source/blender/editors/space_action/action_edit.c
+++ b/source/blender/editors/space_action/action_edit.c
@@ -93,7 +93,7 @@
* 3) that the set of markers being shown are the scene markers, not the list we're merging
* 4) that there are some selected markers
*/
-static int act_markers_make_local_poll(bContext *C)
+static bool act_markers_make_local_poll(bContext *C)
{
SpaceAction *sact = CTX_wm_space_action(C);
@@ -1480,7 +1480,7 @@ void ACTION_OT_keyframe_type(wmOperatorType *ot)
/* ***************** Jump to Selected Frames Operator *********************** */
-static int actkeys_framejump_poll(bContext *C)
+static bool actkeys_framejump_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
diff --git a/source/blender/editors/space_clip/clip_dopesheet_ops.c b/source/blender/editors/space_clip/clip_dopesheet_ops.c
index c8675fc390b..a12e8db6daf 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_ops.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_ops.c
@@ -53,7 +53,7 @@
#include "clip_intern.h" // own include
-static int space_clip_dopesheet_poll(bContext *C)
+static bool space_clip_dopesheet_poll(bContext *C)
{
if (ED_space_clip_tracking_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -70,7 +70,7 @@ static int space_clip_dopesheet_poll(bContext *C)
/********************** select channel operator *********************/
-static int dopesheet_select_channel_poll(bContext *C)
+static bool dopesheet_select_channel_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c
index 2a218df2a44..30628b417d4 100644
--- a/source/blender/editors/space_clip/clip_editor.c
+++ b/source/blender/editors/space_clip/clip_editor.c
@@ -76,7 +76,7 @@
/* ******** operactor poll functions ******** */
-int ED_space_clip_poll(bContext *C)
+bool ED_space_clip_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -86,7 +86,7 @@ int ED_space_clip_poll(bContext *C)
return false;
}
-int ED_space_clip_view_clip_poll(bContext *C)
+bool ED_space_clip_view_clip_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -97,7 +97,7 @@ int ED_space_clip_view_clip_poll(bContext *C)
return false;
}
-int ED_space_clip_tracking_poll(bContext *C)
+bool ED_space_clip_tracking_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -107,7 +107,7 @@ int ED_space_clip_tracking_poll(bContext *C)
return false;
}
-int ED_space_clip_maskedit_poll(bContext *C)
+bool ED_space_clip_maskedit_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -118,7 +118,7 @@ int ED_space_clip_maskedit_poll(bContext *C)
return false;
}
-int ED_space_clip_maskedit_mask_poll(bContext *C)
+bool ED_space_clip_maskedit_mask_poll(bContext *C)
{
if (ED_space_clip_maskedit_poll(C)) {
MovieClip *clip = CTX_data_edit_movieclip(C);
diff --git a/source/blender/editors/space_clip/clip_graph_ops.c b/source/blender/editors/space_clip/clip_graph_ops.c
index b572e1893ae..2c6aad36b2a 100644
--- a/source/blender/editors/space_clip/clip_graph_ops.c
+++ b/source/blender/editors/space_clip/clip_graph_ops.c
@@ -54,7 +54,7 @@
/******************** common graph-editing utilities ********************/
-static int ED_space_clip_graph_poll(bContext *C)
+static bool ED_space_clip_graph_poll(bContext *C)
{
if (ED_space_clip_tracking_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -65,7 +65,7 @@ static int ED_space_clip_graph_poll(bContext *C)
return false;
}
-static int clip_graph_knots_poll(bContext *C)
+static bool clip_graph_knots_poll(bContext *C)
{
if (ED_space_clip_graph_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index 172ea0f8554..4754d45a0d1 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -898,7 +898,7 @@ void CLIP_OT_view_selected(wmOperatorType *ot)
/********************** change frame operator *********************/
-static int change_frame_poll(bContext *C)
+static bool change_frame_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
diff --git a/source/blender/editors/space_clip/clip_toolbar.c b/source/blender/editors/space_clip/clip_toolbar.c
index d2a7244eded..fbd73ee4315 100644
--- a/source/blender/editors/space_clip/clip_toolbar.c
+++ b/source/blender/editors/space_clip/clip_toolbar.c
@@ -86,7 +86,7 @@ ARegion *ED_clip_has_properties_region(ScrArea *sa)
return arnew;
}
-static int properties_poll(bContext *C)
+static bool properties_poll(bContext *C)
{
return (CTX_wm_space_clip(C) != NULL);
}
@@ -161,7 +161,7 @@ static ARegion *clip_has_tools_region(ScrArea *sa)
return artool;
}
-static int tools_poll(bContext *C)
+static bool tools_poll(bContext *C)
{
return (CTX_wm_space_clip(C) != NULL);
}
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 58930fa2cf2..2d17460318e 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -848,7 +848,7 @@ static int clip_context(const bContext *C, const char *member, bContextDataResul
}
/* dropboxes */
-static int clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool clip_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_PATH)
if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */
diff --git a/source/blender/editors/space_clip/tracking_ops.c b/source/blender/editors/space_clip/tracking_ops.c
index 50f21c8891c..2a64b476ea4 100644
--- a/source/blender/editors/space_clip/tracking_ops.c
+++ b/source/blender/editors/space_clip/tracking_ops.c
@@ -2106,7 +2106,7 @@ void CLIP_OT_copy_tracks(wmOperatorType *ot)
/********************* paste tracks from clipboard operator ********************/
-static int paste_tracks_poll(bContext *C)
+static bool paste_tracks_poll(bContext *C)
{
if (ED_space_clip_tracking_poll(C)) {
return BKE_tracking_clipboard_has_tracks();
diff --git a/source/blender/editors/space_clip/tracking_ops_orient.c b/source/blender/editors/space_clip/tracking_ops_orient.c
index 8c5be7c9d04..8ad31fc3b9b 100644
--- a/source/blender/editors/space_clip/tracking_ops_orient.c
+++ b/source/blender/editors/space_clip/tracking_ops_orient.c
@@ -106,7 +106,7 @@ static Object *get_orientation_object(bContext *C)
return object;
}
-static int set_orientation_poll(bContext *C)
+static bool set_orientation_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
@@ -746,7 +746,7 @@ void CLIP_OT_set_scale(wmOperatorType *ot)
/********************** set solution scale operator *********************/
-static int set_solution_scale_poll(bContext *C)
+static bool set_solution_scale_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
@@ -806,7 +806,7 @@ void CLIP_OT_set_solution_scale(wmOperatorType *ot)
/********************** apply solution scale operator *********************/
-static int apply_solution_scale_poll(bContext *C)
+static bool apply_solution_scale_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
if (sc != NULL) {
diff --git a/source/blender/editors/space_clip/tracking_ops_stabilize.c b/source/blender/editors/space_clip/tracking_ops_stabilize.c
index a83e5f2af02..e865ee26b20 100644
--- a/source/blender/editors/space_clip/tracking_ops_stabilize.c
+++ b/source/blender/editors/space_clip/tracking_ops_stabilize.c
@@ -49,7 +49,7 @@
/********************* add 2d stabilization tracks operator ********************/
-static int stabilize_2d_poll(bContext *C)
+static bool stabilize_2d_poll(bContext *C)
{
if (ED_space_clip_tracking_poll(C)) {
SpaceClip *sc = CTX_wm_space_clip(C);
diff --git a/source/blender/editors/space_clip/tracking_select.c b/source/blender/editors/space_clip/tracking_select.c
index ecbc1f5ae1e..cf4687dca31 100644
--- a/source/blender/editors/space_clip/tracking_select.c
+++ b/source/blender/editors/space_clip/tracking_select.c
@@ -350,7 +350,7 @@ static int mouse_select(bContext *C, float co[2], int extend)
return OPERATOR_FINISHED;
}
-static int select_poll(bContext *C)
+static bool select_poll(bContext *C)
{
SpaceClip *sc = CTX_wm_space_clip(C);
diff --git a/source/blender/editors/space_console/space_console.c b/source/blender/editors/space_console/space_console.c
index 2dfe02cc333..3f5adf6c1c5 100644
--- a/source/blender/editors/space_console/space_console.c
+++ b/source/blender/editors/space_console/space_console.c
@@ -169,7 +169,7 @@ static void console_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
/* ************* dropboxes ************* */
-static int id_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool id_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
// SpaceConsole *sc = CTX_wm_space_console(C);
if (drag->type == WM_DRAG_ID)
@@ -188,7 +188,7 @@ static void id_drop_copy(wmDrag *drag, wmDropBox *drop)
MEM_freeN(text);
}
-static int path_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool path_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
// SpaceConsole *sc = CTX_wm_space_console(C);
if (drag->type == WM_DRAG_PATH)
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c
index 0cd31ce7ca5..81bc585db82 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -1179,9 +1179,9 @@ int file_cancel_exec(bContext *C, wmOperator *UNUSED(unused))
return OPERATOR_FINISHED;
}
-static int file_operator_poll(bContext *C)
+static bool file_operator_poll(bContext *C)
{
- int poll = ED_operator_file_active(C);
+ bool poll = ED_operator_file_active(C);
SpaceFile *sfile = CTX_wm_space_file(C);
if (!sfile || !sfile->op) poll = 0;
@@ -2202,7 +2202,7 @@ static int file_rename_exec(bContext *C, wmOperator *UNUSED(op))
}
-static int file_rename_poll(bContext *C)
+static bool file_rename_poll(bContext *C)
{
bool poll = ED_operator_file_active(C);
SpaceFile *sfile = CTX_wm_space_file(C);
@@ -2248,9 +2248,9 @@ void FILE_OT_rename(struct wmOperatorType *ot)
}
-static int file_delete_poll(bContext *C)
+static bool file_delete_poll(bContext *C)
{
- int poll = ED_operator_file_active(C);
+ bool poll = ED_operator_file_active(C);
SpaceFile *sfile = CTX_wm_space_file(C);
if (sfile && sfile->params) {
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 90baf967348..c02320de89e 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -57,7 +57,7 @@
#include <string.h>
-static int file_panel_operator_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool file_panel_operator_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceFile *sfile = CTX_wm_space_file(C);
return (sfile && sfile->op);
diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c
index 07041d453ab..94f47d5a6aa 100644
--- a/source/blender/editors/space_file/space_file.c
+++ b/source/blender/editors/space_file/space_file.c
@@ -677,7 +677,7 @@ static void file_ui_region_listener(bScreen *UNUSED(sc), ScrArea *UNUSED(sa), AR
}
}
-static int filepath_drop_poll(bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
+static bool filepath_drop_poll(bContext *C, wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_PATH) {
SpaceFile *sfile = CTX_wm_space_file(C);
diff --git a/source/blender/editors/space_graph/graph_buttons.c b/source/blender/editors/space_graph/graph_buttons.c
index cac379f3786..22ca3275ff9 100644
--- a/source/blender/editors/space_graph/graph_buttons.c
+++ b/source/blender/editors/space_graph/graph_buttons.c
@@ -103,7 +103,7 @@ static int graph_panel_context(const bContext *C, bAnimListElem **ale, FCurve **
return 1;
}
-static int graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool graph_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
return graph_panel_context(C, NULL, NULL);
}
@@ -576,7 +576,7 @@ static void driver_update_flags_cb(bContext *UNUSED(C), void *fcu_v, void *UNUSE
}
/* drivers panel poll */
-static int graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool graph_panel_drivers_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceIpo *sipo = CTX_wm_space_graph(C);
diff --git a/source/blender/editors/space_graph/graph_edit.c b/source/blender/editors/space_graph/graph_edit.c
index 0b8e89160b7..7717b8c8200 100644
--- a/source/blender/editors/space_graph/graph_edit.c
+++ b/source/blender/editors/space_graph/graph_edit.c
@@ -1971,7 +1971,7 @@ void GRAPH_OT_euler_filter(wmOperatorType *ot)
/* ***************** Jump to Selected Frames Operator *********************** */
-static int graphkeys_framejump_poll(bContext *C)
+static bool graphkeys_framejump_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
@@ -2806,7 +2806,7 @@ static int graph_driver_delete_invalid_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int graph_driver_delete_invalid_poll(bContext *C)
+static bool graph_driver_delete_invalid_poll(bContext *C)
{
bAnimContext ac;
ScrArea *sa = CTX_wm_area(C);
diff --git a/source/blender/editors/space_graph/graph_intern.h b/source/blender/editors/space_graph/graph_intern.h
index da352d4ea06..c50e0497519 100644
--- a/source/blender/editors/space_graph/graph_intern.h
+++ b/source/blender/editors/space_graph/graph_intern.h
@@ -170,10 +170,10 @@ void graph_buttons_register(struct ARegionType *art);
struct bAnimListElem *get_active_fcurve_channel(struct bAnimContext *ac);
-int graphop_visible_keyframes_poll(struct bContext *C);
-int graphop_editable_keyframes_poll(struct bContext *C);
-int graphop_active_fcurve_poll(struct bContext *C);
-int graphop_selected_fcurve_poll(struct bContext *C);
+bool graphop_visible_keyframes_poll(struct bContext *C);
+bool graphop_editable_keyframes_poll(struct bContext *C);
+bool graphop_active_fcurve_poll(struct bContext *C);
+bool graphop_selected_fcurve_poll(struct bContext *C);
/* ***************************************** */
/* graph_ops.c */
diff --git a/source/blender/editors/space_graph/graph_ops.c b/source/blender/editors/space_graph/graph_ops.c
index 8bc701928d8..c5d6093dc4a 100644
--- a/source/blender/editors/space_graph/graph_ops.c
+++ b/source/blender/editors/space_graph/graph_ops.c
@@ -67,7 +67,7 @@
* 2) Value Indicator (stored per Graph Editor instance)
*/
-static int graphview_cursor_poll(bContext *C)
+static bool graphview_cursor_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
diff --git a/source/blender/editors/space_graph/graph_utils.c b/source/blender/editors/space_graph/graph_utils.c
index f55a5511e2d..ad59e8c7eda 100644
--- a/source/blender/editors/space_graph/graph_utils.c
+++ b/source/blender/editors/space_graph/graph_utils.c
@@ -90,7 +90,7 @@ bAnimListElem *get_active_fcurve_channel(bAnimContext *ac)
/* Operator Polling Callbacks */
/* Check if there are any visible keyframes (for selection tools) */
-int graphop_visible_keyframes_poll(bContext *C)
+bool graphop_visible_keyframes_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
@@ -139,7 +139,7 @@ int graphop_visible_keyframes_poll(bContext *C)
}
/* Check if there are any visible + editable keyframes (for editing tools) */
-int graphop_editable_keyframes_poll(bContext *C)
+bool graphop_editable_keyframes_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
@@ -189,7 +189,7 @@ int graphop_editable_keyframes_poll(bContext *C)
}
/* has active F-Curve that's editable */
-int graphop_active_fcurve_poll(bContext *C)
+bool graphop_active_fcurve_poll(bContext *C)
{
bAnimContext ac;
bAnimListElem *ale;
@@ -229,7 +229,7 @@ int graphop_active_fcurve_poll(bContext *C)
}
/* has selected F-Curve that's editable */
-int graphop_selected_fcurve_poll(bContext *C)
+bool graphop_selected_fcurve_poll(bContext *C)
{
bAnimContext ac;
ListBase anim_data = {NULL, NULL};
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c
index 886f4377e10..5eaefcc9bb2 100644
--- a/source/blender/editors/space_image/image_edit.c
+++ b/source/blender/editors/space_image/image_edit.c
@@ -386,7 +386,7 @@ bool ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima)
return (sima->mode == SI_MODE_MASK);
}
-int ED_space_image_maskedit_poll(bContext *C)
+bool ED_space_image_maskedit_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
@@ -413,7 +413,7 @@ bool ED_space_image_paint_curve(const bContext *C)
}
-int ED_space_image_maskedit_mask_poll(bContext *C)
+bool ED_space_image_maskedit_mask_poll(bContext *C)
{
if (ED_space_image_maskedit_poll(C)) {
SpaceImage *sima = CTX_wm_space_image(C);
diff --git a/source/blender/editors/space_image/image_intern.h b/source/blender/editors/space_image/image_intern.h
index f56915fd287..f7fec4ed396 100644
--- a/source/blender/editors/space_image/image_intern.h
+++ b/source/blender/editors/space_image/image_intern.h
@@ -54,7 +54,7 @@ void draw_image_grease_pencil(struct bContext *C, bool onlyv2d);
void draw_image_sample_line(struct SpaceImage *sima);
/* image_ops.c */
-int space_image_main_region_poll(struct bContext *C);
+bool space_image_main_region_poll(struct bContext *C);
void IMAGE_OT_view_all(struct wmOperatorType *ot);
void IMAGE_OT_view_pan(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index a441dedc57a..d9f66ef175a 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -179,13 +179,13 @@ static void sima_zoom_set_from_bounds(SpaceImage *sima, ARegion *ar, const rctf
}
#if 0 // currently unused
-static int image_poll(bContext *C)
+static bool image_poll(bContext *C)
{
return (CTX_data_edit_image(C) != NULL);
}
#endif
-static int space_image_buffer_exists_poll(bContext *C)
+static bool space_image_buffer_exists_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
if (sima && ED_space_image_has_buffer(sima)) {
@@ -194,7 +194,7 @@ static int space_image_buffer_exists_poll(bContext *C)
return false;
}
-static int image_not_packed_poll(bContext *C)
+static bool image_not_packed_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
@@ -213,7 +213,7 @@ static bool imbuf_format_writeable(const ImBuf *ibuf)
return (BKE_image_imtype_to_ftype(im_format.imtype, &options_dummy) == ibuf->ftype);
}
-static int space_image_file_exists_poll(bContext *C)
+static bool space_image_file_exists_poll(bContext *C)
{
if (space_image_buffer_exists_poll(C)) {
Main *bmain = CTX_data_main(C);
@@ -249,7 +249,7 @@ static int space_image_file_exists_poll(bContext *C)
}
#if 0 /* UNUSED */
-static int space_image_poll(bContext *C)
+static bool space_image_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
if (sima && sima->image) {
@@ -259,7 +259,7 @@ static int space_image_poll(bContext *C)
}
#endif
-int space_image_main_region_poll(bContext *C)
+bool space_image_main_region_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
/* XXX ARegion *ar = CTX_wm_region(C); */
@@ -271,7 +271,7 @@ int space_image_main_region_poll(bContext *C)
}
/* For IMAGE_OT_curves_point_set to avoid sampling when in uv smooth mode or editmode */
-static int space_image_main_area_not_uv_brush_poll(bContext *C)
+static bool space_image_main_area_not_uv_brush_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
Scene *scene = CTX_data_scene(C);
@@ -283,7 +283,7 @@ static int space_image_main_area_not_uv_brush_poll(bContext *C)
return 0;
}
-static int image_sample_poll(bContext *C)
+static bool image_sample_poll(bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
if (sima) {
@@ -830,7 +830,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_FINISHED;
}
-static int image_view_selected_poll(bContext *C)
+static bool image_view_selected_poll(bContext *C)
{
return (space_image_main_region_poll(C) && (ED_operator_uvedit(C) || ED_operator_mask(C)));
}
@@ -2152,7 +2152,7 @@ static void image_save_as_draw(bContext *UNUSED(C), wmOperator *op)
uiTemplateImageFormatViews(layout, &imf_ptr, op->ptr);
}
-static int image_save_as_poll(bContext *C)
+static bool image_save_as_poll(bContext *C)
{
if (space_image_buffer_exists_poll(C)) {
if (G.is_rendering) {
@@ -2596,7 +2596,7 @@ void IMAGE_OT_new(wmOperatorType *ot)
/********************* invert operators *********************/
-static int image_invert_poll(bContext *C)
+static bool image_invert_poll(bContext *C)
{
Image *ima = CTX_data_edit_image(C);
@@ -3440,7 +3440,7 @@ void IMAGE_OT_record_composite(wmOperatorType *ot)
/********************* cycle render slot operator *********************/
-static int image_cycle_render_slot_poll(bContext *C)
+static bool image_cycle_render_slot_poll(bContext *C)
{
Image *ima = CTX_data_edit_image(C);
@@ -3484,7 +3484,7 @@ void IMAGE_OT_cycle_render_slot(wmOperatorType *ot)
/********************** change frame operator *********************/
-static int change_frame_poll(bContext *C)
+static bool change_frame_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c
index 3cca13ea7dd..b9c0ca66778 100644
--- a/source/blender/editors/space_image/space_image.c
+++ b/source/blender/editors/space_image/space_image.c
@@ -374,7 +374,7 @@ static void image_keymap(struct wmKeyConfig *keyconf)
}
/* dropboxes */
-static int image_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool image_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_PATH)
if (ELEM(drag->icon, 0, ICON_FILE_IMAGE, ICON_FILE_MOVIE, ICON_FILE_BLANK)) /* rule might not work? */
diff --git a/source/blender/editors/space_logic/logic_ops.c b/source/blender/editors/space_logic/logic_ops.c
index 143583a9600..837e8995cc2 100644
--- a/source/blender/editors/space_logic/logic_ops.c
+++ b/source/blender/editors/space_logic/logic_ops.c
@@ -62,7 +62,7 @@
#include "logic_intern.h"
/* ************* Generic Operator Helpers ************* */
-static int edit_sensor_poll(bContext *C)
+static bool edit_sensor_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "sensor", &RNA_Sensor);
@@ -70,7 +70,7 @@ static int edit_sensor_poll(bContext *C)
return 1;
}
-static int edit_controller_poll(bContext *C)
+static bool edit_controller_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "controller", &RNA_Controller);
@@ -78,7 +78,7 @@ static int edit_controller_poll(bContext *C)
return 1;
}
-static int edit_actuator_poll(bContext *C)
+static bool edit_actuator_poll(bContext *C)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "actuator", &RNA_Actuator);
diff --git a/source/blender/editors/space_nla/nla_buttons.c b/source/blender/editors/space_nla/nla_buttons.c
index a26e6b0280e..659a36c4a23 100644
--- a/source/blender/editors/space_nla/nla_buttons.c
+++ b/source/blender/editors/space_nla/nla_buttons.c
@@ -184,31 +184,31 @@ bool nla_panel_context(const bContext *C, PointerRNA *adt_ptr, PointerRNA *nlt_p
}
#if 0
-static int nla_panel_poll(const bContext *C, PanelType *pt)
+static bool nla_panel_poll(const bContext *C, PanelType *pt)
{
return nla_panel_context(C, NULL, NULL);
}
#endif
-static int nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool nla_animdata_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, &ptr, NULL, NULL) && (ptr.data != NULL));
}
-static int nla_track_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool nla_track_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, NULL, &ptr, NULL) && (ptr.data != NULL));
}
-static int nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool nla_strip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
return (nla_panel_context(C, NULL, NULL, &ptr) && (ptr.data != NULL));
}
-static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
NlaStrip *strip;
@@ -222,7 +222,7 @@ static int nla_strip_actclip_panel_poll(const bContext *C, PanelType *UNUSED(pt)
return (strip->type == NLASTRIP_TYPE_CLIP);
}
-static int nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool nla_strip_eval_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
PointerRNA ptr;
NlaStrip *strip;
diff --git a/source/blender/editors/space_nla/nla_channels.c b/source/blender/editors/space_nla/nla_channels.c
index 8fdba4ce60d..9bb25724daf 100644
--- a/source/blender/editors/space_nla/nla_channels.c
+++ b/source/blender/editors/space_nla/nla_channels.c
@@ -509,7 +509,7 @@ void NLA_OT_action_pushdown(wmOperatorType *ot)
/* ******************** Action Unlink ******************************** */
-static int nla_action_unlink_poll(bContext *C)
+static bool nla_action_unlink_poll(bContext *C)
{
if (ED_operator_nla_active(C)) {
return nla_panel_context(C, NULL, NULL, NULL);
diff --git a/source/blender/editors/space_nla/nla_intern.h b/source/blender/editors/space_nla/nla_intern.h
index c090b3b8106..a00e71a192d 100644
--- a/source/blender/editors/space_nla/nla_intern.h
+++ b/source/blender/editors/space_nla/nla_intern.h
@@ -148,8 +148,8 @@ void NLA_OT_selected_objects_add(wmOperatorType *ot);
/* **************************************** */
/* nla_ops.c */
-int nlaop_poll_tweakmode_off(bContext *C);
-int nlaop_poll_tweakmode_on(bContext *C);
+bool nlaop_poll_tweakmode_off(bContext *C);
+bool nlaop_poll_tweakmode_on(bContext *C);
bool nlaedit_is_tweakmode_on(bAnimContext *ac);
diff --git a/source/blender/editors/space_nla/nla_ops.c b/source/blender/editors/space_nla/nla_ops.c
index 0c087fa67b9..5bfd73b8163 100644
--- a/source/blender/editors/space_nla/nla_ops.c
+++ b/source/blender/editors/space_nla/nla_ops.c
@@ -52,7 +52,7 @@
/* ************************** poll callbacks for operators **********************************/
/* tweakmode is NOT enabled */
-int nlaop_poll_tweakmode_off(bContext *C)
+bool nlaop_poll_tweakmode_off(bContext *C)
{
Scene *scene;
@@ -74,7 +74,7 @@ int nlaop_poll_tweakmode_off(bContext *C)
}
/* tweakmode IS enabled */
-int nlaop_poll_tweakmode_on(bContext *C)
+bool nlaop_poll_tweakmode_on(bContext *C)
{
Scene *scene;
diff --git a/source/blender/editors/space_node/node_add.c b/source/blender/editors/space_node/node_add.c
index dd34d14796c..3ae909041c2 100644
--- a/source/blender/editors/space_node/node_add.c
+++ b/source/blender/editors/space_node/node_add.c
@@ -402,7 +402,7 @@ void NODE_OT_add_file(wmOperatorType *ot)
/* ****************** Add Mask Node Operator ******************* */
-static int node_add_mask_poll(bContext *C)
+static bool node_add_mask_poll(bContext *C)
{
SpaceNode *snode = CTX_wm_space_node(C);
diff --git a/source/blender/editors/space_node/node_buttons.c b/source/blender/editors/space_node/node_buttons.c
index 0a656ee1deb..6104761eb49 100644
--- a/source/blender/editors/space_node/node_buttons.c
+++ b/source/blender/editors/space_node/node_buttons.c
@@ -59,7 +59,7 @@
#if 0
/* poll for active nodetree */
-static int active_nodetree_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool active_nodetree_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -67,7 +67,7 @@ static int active_nodetree_poll(const bContext *C, PanelType *UNUSED(pt))
}
#endif
-static int node_sockets_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool node_sockets_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -95,7 +95,7 @@ static void node_sockets_panel(const bContext *C, Panel *pa)
}
}
-static int node_tree_interface_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool node_tree_interface_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -216,7 +216,7 @@ static int node_properties_toggle_exec(bContext *C, wmOperator *UNUSED(op))
}
/* non-standard poll operator which doesn't care if there are any nodes */
-static int node_properties_poll(bContext *C)
+static bool node_properties_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
return (sa && (sa->spacetype == SPACE_NODE));
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 8d8593099a4..c49c8c201c4 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -302,7 +302,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
/* ***************************************** */
/* operator poll callback */
-int composite_node_active(bContext *C)
+bool composite_node_active(bContext *C)
{
if (ED_operator_node_active(C)) {
SpaceNode *snode = CTX_wm_space_node(C);
@@ -313,7 +313,7 @@ int composite_node_active(bContext *C)
}
/* operator poll callback */
-int composite_node_editable(bContext *C)
+bool composite_node_editable(bContext *C)
{
if (ED_operator_node_editable(C)) {
SpaceNode *snode = CTX_wm_space_node(C);
@@ -748,7 +748,7 @@ void ED_node_post_apply_transform(bContext *UNUSED(C), bNodeTree *UNUSED(ntree))
#if 0 /* UNUSED */
-static int edit_node_poll(bContext *C)
+static bool edit_node_poll(bContext *C)
{
return ED_operator_node_active(C);
}
@@ -1680,7 +1680,7 @@ void NODE_OT_delete(wmOperatorType *ot)
/* ****************** Switch View ******************* */
-static int node_switch_view_poll(bContext *C)
+static bool node_switch_view_poll(bContext *C)
{
SpaceNode *snode = CTX_wm_space_node(C);
@@ -2353,7 +2353,7 @@ void NODE_OT_tree_socket_move(wmOperatorType *ot)
/* ********************** Shader Script Update ******************/
-static int node_shader_script_update_poll(bContext *C)
+static bool node_shader_script_update_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
RenderEngineType *type = RE_engines_find(scene->r.engine);
diff --git a/source/blender/editors/space_node/node_group.c b/source/blender/editors/space_node/node_group.c
index 926fff7a3b6..a3294211ff9 100644
--- a/source/blender/editors/space_node/node_group.c
+++ b/source/blender/editors/space_node/node_group.c
@@ -65,7 +65,7 @@
#include "node_intern.h" /* own include */
#include "NOD_common.h"
-static int node_group_operator_active(bContext *C)
+static bool node_group_operator_active(bContext *C)
{
if (ED_operator_node_active(C)) {
SpaceNode *snode = CTX_wm_space_node(C);
@@ -84,7 +84,7 @@ static int node_group_operator_active(bContext *C)
return false;
}
-static int node_group_operator_editable(bContext *C)
+static bool node_group_operator_editable(bContext *C)
{
if (ED_operator_node_editable(C)) {
SpaceNode *snode = CTX_wm_space_node(C);
diff --git a/source/blender/editors/space_node/node_intern.h b/source/blender/editors/space_node/node_intern.h
index 9bcbe94d287..fd62c52bd5a 100644
--- a/source/blender/editors/space_node/node_intern.h
+++ b/source/blender/editors/space_node/node_intern.h
@@ -179,8 +179,8 @@ void snode_dag_update(struct bContext *C, struct SpaceNode *snode);
void snode_set_context(const struct bContext *C);
void snode_update(struct SpaceNode *snode, struct bNode *node);
-int composite_node_active(struct bContext *C);
-int composite_node_editable(struct bContext *C);
+bool composite_node_active(struct bContext *C);
+bool composite_node_editable(struct bContext *C);
int node_has_hidden_sockets(bNode *node);
void node_set_hidden_sockets(SpaceNode *snode, bNode *node, int set);
diff --git a/source/blender/editors/space_node/node_toolbar.c b/source/blender/editors/space_node/node_toolbar.c
index 21278dd9fa5..b4e7e853330 100644
--- a/source/blender/editors/space_node/node_toolbar.c
+++ b/source/blender/editors/space_node/node_toolbar.c
@@ -63,7 +63,7 @@ static int node_toolbar_toggle_exec(bContext *C, wmOperator *UNUSED(op))
}
/* non-standard poll operator which doesn't care if there are any nodes */
-static int node_toolbar_poll(bContext *C)
+static bool node_toolbar_poll(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
return (sa && (sa->spacetype == SPACE_NODE));
diff --git a/source/blender/editors/space_node/space_node.c b/source/blender/editors/space_node/space_node.c
index b63d053b703..33f4847c90f 100644
--- a/source/blender/editors/space_node/space_node.c
+++ b/source/blender/editors/space_node/space_node.c
@@ -664,7 +664,7 @@ static void node_main_region_draw(const bContext *C, ARegion *ar)
/* ************* dropboxes ************* */
-static int node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
@@ -678,7 +678,7 @@ static int node_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *
return 0;
}
-static int node_mask_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool node_mask_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index d547b419d48..6eda2283b6a 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -1439,7 +1439,7 @@ void OUTLINER_OT_show_hierarchy(wmOperatorType *ot)
/* KeyingSet and Driver Creation - Helper functions */
/* specialized poll callback for these operators to work in Datablocks view only */
-static int ed_operator_outliner_datablocks_active(bContext *C)
+static bool ed_operator_outliner_datablocks_active(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if ((sa) && (sa->spacetype == SPACE_OUTLINER)) {
@@ -1927,7 +1927,7 @@ void OUTLINER_OT_keyingset_remove_selected(wmOperatorType *ot)
/* ************************************************************** */
/* ORPHANED DATABLOCKS */
-static int ed_operator_outliner_id_orphans_active(bContext *C)
+static bool ed_operator_outliner_id_orphans_active(bContext *C)
{
ScrArea *sa = CTX_wm_area(C);
if ((sa) && (sa->spacetype == SPACE_OUTLINER)) {
@@ -2164,7 +2164,7 @@ void OUTLINER_OT_parent_drop(wmOperatorType *ot)
RNA_def_enum(ot->srna, "type", prop_make_parent_types, 0, "Type", "");
}
-static int outliner_parenting_poll(bContext *C)
+static bool outliner_parenting_poll(bContext *C)
{
SpaceOops *soops = CTX_wm_space_outliner(C);
diff --git a/source/blender/editors/space_outliner/space_outliner.c b/source/blender/editors/space_outliner/space_outliner.c
index 5faddad980e..413ea8cc3a7 100644
--- a/source/blender/editors/space_outliner/space_outliner.c
+++ b/source/blender/editors/space_outliner/space_outliner.c
@@ -90,7 +90,7 @@ static void outliner_main_region_init(wmWindowManager *wm, ARegion *ar)
WM_event_add_dropbox_handler(&ar->handlers, lb);
}
-static int outliner_parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool outliner_parent_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
@@ -134,7 +134,7 @@ static void outliner_parent_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "child", id->name + 2);
}
-static int outliner_parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool outliner_parent_clear_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
@@ -180,7 +180,7 @@ static void outliner_parent_clear_copy(wmDrag *drag, wmDropBox *drop)
RNA_enum_set(drop->ptr, "type", 0);
}
-static int outliner_scene_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool outliner_scene_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
@@ -205,7 +205,7 @@ static void outliner_scene_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "object", id->name + 2);
}
-static int outliner_material_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool outliner_material_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
@@ -230,7 +230,7 @@ static void outliner_material_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "material", id->name + 2);
}
-static int outliner_group_link_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool outliner_group_link_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
SpaceOops *soops = CTX_wm_space_outliner(C);
diff --git a/source/blender/editors/space_sequencer/sequencer_buttons.c b/source/blender/editors/space_sequencer/sequencer_buttons.c
index 5c8f8a0c4f1..a4bca555490 100644
--- a/source/blender/editors/space_sequencer/sequencer_buttons.c
+++ b/source/blender/editors/space_sequencer/sequencer_buttons.c
@@ -52,7 +52,7 @@
/* **************************** buttons ********************************* */
#if 0
-static int sequencer_grease_pencil_panel_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool sequencer_grease_pencil_panel_poll(const bContext *C, PanelType *UNUSED(pt))
{
SpaceSeq *sseq = CTX_wm_space_seq(C);
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c
index d672bbcc532..679fb71f76b 100644
--- a/source/blender/editors/space_sequencer/sequencer_edit.c
+++ b/source/blender/editors/space_sequencer/sequencer_edit.c
@@ -474,7 +474,7 @@ void recurs_sel_seq(Sequence *seqm)
}
}
-int ED_space_sequencer_maskedit_mask_poll(bContext *C)
+bool ED_space_sequencer_maskedit_mask_poll(bContext *C)
{
/* in this case both funcs are the same, for clip editor not */
return ED_space_sequencer_maskedit_poll(C);
@@ -489,7 +489,7 @@ bool ED_space_sequencer_check_show_maskedit(SpaceSeq *sseq, Scene *scene)
return false;
}
-int ED_space_sequencer_maskedit_poll(bContext *C)
+bool ED_space_sequencer_maskedit_poll(bContext *C)
{
SpaceSeq *sseq = CTX_wm_space_seq(C);
@@ -1147,27 +1147,27 @@ static int seq_get_snaplimit(View2D *v2d)
#endif
/* Operator functions */
-int sequencer_edit_poll(bContext *C)
+bool sequencer_edit_poll(bContext *C)
{
return (BKE_sequencer_editing_get(CTX_data_scene(C), false) != NULL);
}
#if 0 /* UNUSED */
-int sequencer_strip_poll(bContext *C)
+bool sequencer_strip_poll(bContext *C)
{
Editing *ed;
return (((ed = BKE_sequencer_editing_get(CTX_data_scene(C), false)) != NULL) && (ed->act_seq != NULL));
}
#endif
-int sequencer_strip_has_path_poll(bContext *C)
+bool sequencer_strip_has_path_poll(bContext *C)
{
Editing *ed;
Sequence *seq;
return (((ed = BKE_sequencer_editing_get(CTX_data_scene(C), false)) != NULL) && ((seq = ed->act_seq) != NULL) && (SEQ_HAS_PATH(seq)));
}
-int sequencer_view_preview_poll(bContext *C)
+bool sequencer_view_preview_poll(bContext *C)
{
SpaceSeq *sseq = CTX_wm_space_seq(C);
Editing *ed = BKE_sequencer_editing_get(CTX_data_scene(C), false);
@@ -1177,7 +1177,7 @@ int sequencer_view_preview_poll(bContext *C)
return 0;
}
-int sequencer_view_strips_poll(bContext *C)
+bool sequencer_view_strips_poll(bContext *C)
{
SpaceSeq *sseq = CTX_wm_space_seq(C);
if (sseq && ED_space_sequencer_check_show_strip(sseq))
@@ -1935,7 +1935,7 @@ void SEQUENCER_OT_reload(struct wmOperatorType *ot)
}
/* reload operator */
-static int sequencer_refresh_all_poll(bContext *C)
+static bool sequencer_refresh_all_poll(bContext *C)
{
if (G.is_rendering) {
return 0;
@@ -1997,7 +1997,7 @@ static int sequencer_reassign_inputs_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int sequencer_effect_poll(bContext *C)
+static bool sequencer_effect_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
@@ -2991,7 +2991,7 @@ static bool strip_jump_internal(Scene *scene,
return changed;
}
-static int sequencer_strip_jump_poll(bContext *C)
+static bool sequencer_strip_jump_poll(bContext *C)
{
/* prevent changes during render */
if (G.is_rendering)
@@ -3973,7 +3973,7 @@ static int sequencer_export_subtitles_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int sequencer_strip_is_text_poll(bContext *C)
+static bool sequencer_strip_is_text_poll(bContext *C)
{
Editing *ed;
Sequence *seq;
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h
index e796a74c90e..e06f4558f00 100644
--- a/source/blender/editors/space_sequencer/sequencer_intern.h
+++ b/source/blender/editors/space_sequencer/sequencer_intern.h
@@ -76,12 +76,12 @@ void recurs_sel_seq(struct Sequence *seqm);
int seq_effect_find_selected(struct Scene *scene, struct Sequence *activeseq, int type, struct Sequence **selseq1, struct Sequence **selseq2, struct Sequence **selseq3, const char **error_str);
/* operator helpers */
-int sequencer_edit_poll(struct bContext *C);
+bool sequencer_edit_poll(struct bContext *C);
/* UNUSED */
-//int sequencer_strip_poll(struct bContext *C);
-int sequencer_strip_has_path_poll(struct bContext *C);
-int sequencer_view_preview_poll(struct bContext *C);
-int sequencer_view_strips_poll(struct bContext *C);
+//bool sequencer_strip_poll(struct bContext *C);
+bool sequencer_strip_has_path_poll(struct bContext *C);
+bool sequencer_view_preview_poll(struct bContext *C);
+bool sequencer_view_strips_poll(struct bContext *C);
/* externs */
extern EnumPropertyItem sequencer_prop_effect_types[];
diff --git a/source/blender/editors/space_sequencer/sequencer_modifier.c b/source/blender/editors/space_sequencer/sequencer_modifier.c
index 107169a48d8..3c4481b32cb 100644
--- a/source/blender/editors/space_sequencer/sequencer_modifier.c
+++ b/source/blender/editors/space_sequencer/sequencer_modifier.c
@@ -50,7 +50,7 @@
/*********************** Add modifier operator *************************/
-static int strip_modifier_active_poll(bContext *C)
+static bool strip_modifier_active_poll(bContext *C)
{
Scene *scene = CTX_data_scene(C);
Editing *ed = BKE_sequencer_editing_get(scene, false);
diff --git a/source/blender/editors/space_sequencer/sequencer_view.c b/source/blender/editors/space_sequencer/sequencer_view.c
index 4acda8799cb..daf9af7db4b 100644
--- a/source/blender/editors/space_sequencer/sequencer_view.c
+++ b/source/blender/editors/space_sequencer/sequencer_view.c
@@ -219,7 +219,7 @@ static void sample_cancel(bContext *C, wmOperator *op)
sample_exit(C, op);
}
-static int sample_poll(bContext *C)
+static bool sample_poll(bContext *C)
{
SpaceSeq *sseq = CTX_wm_space_seq(C);
return sseq && BKE_sequencer_editing_get(CTX_data_scene(C), false) != NULL;
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c
index 155aafdb9a7..281dafe32c9 100644
--- a/source/blender/editors/space_sequencer/space_sequencer.c
+++ b/source/blender/editors/space_sequencer/space_sequencer.c
@@ -370,7 +370,7 @@ static void sequencer_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn
/* ************* dropboxes ************* */
-static int image_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool image_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
@@ -384,7 +384,7 @@ static int image_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return 0;
}
-static int movie_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool movie_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
@@ -397,7 +397,7 @@ static int movie_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
return 0;
}
-static int sound_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool sound_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
ARegion *ar = CTX_wm_region(C);
Scene *scene = CTX_data_scene(C);
diff --git a/source/blender/editors/space_text/space_text.c b/source/blender/editors/space_text/space_text.c
index a9e60c84a87..3bc859dcf17 100644
--- a/source/blender/editors/space_text/space_text.c
+++ b/source/blender/editors/space_text/space_text.c
@@ -469,7 +469,7 @@ static void text_cursor(wmWindow *win, ScrArea *sa, ARegion *ar)
/* ************* dropboxes ************* */
-static int text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool text_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_PATH) {
/* rule might not work? */
@@ -486,7 +486,7 @@ static void text_drop_copy(wmDrag *drag, wmDropBox *drop)
RNA_string_set(drop->ptr, "filepath", drag->path);
}
-static int text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool text_drop_paste_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID)
return true;
diff --git a/source/blender/editors/space_text/text_header.c b/source/blender/editors/space_text/text_header.c
index c02aaf716cf..f9bfa45c23a 100644
--- a/source/blender/editors/space_text/text_header.c
+++ b/source/blender/editors/space_text/text_header.c
@@ -72,7 +72,7 @@ static ARegion *text_has_properties_region(ScrArea *sa)
return arnew;
}
-static int text_properties_poll(bContext *C)
+static bool text_properties_poll(bContext *C)
{
return (CTX_wm_space_text(C) != NULL);
}
diff --git a/source/blender/editors/space_text/text_intern.h b/source/blender/editors/space_text/text_intern.h
index 56ce62d0b14..02948d35623 100644
--- a/source/blender/editors/space_text/text_intern.h
+++ b/source/blender/editors/space_text/text_intern.h
@@ -142,7 +142,7 @@ void TEXT_OT_to_3d_object(struct wmOperatorType *ot);
void TEXT_OT_resolve_conflict(struct wmOperatorType *ot);
-int text_space_edit_poll(struct bContext *C);
+bool text_space_edit_poll(struct bContext *C);
/* text_autocomplete.c */
void TEXT_OT_autocomplete(struct wmOperatorType *ot);
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c
index 52440be4c4b..c8e9167edf9 100644
--- a/source/blender/editors/space_text/text_ops.c
+++ b/source/blender/editors/space_text/text_ops.c
@@ -80,12 +80,12 @@ BLI_INLINE int text_pixel_x_to_column(SpaceText *st, const int x)
return (x + (st->cwidth / 2)) / st->cwidth;
}
-static int text_new_poll(bContext *UNUSED(C))
+static bool text_new_poll(bContext *UNUSED(C))
{
return 1;
}
-static int text_edit_poll(bContext *C)
+static bool text_edit_poll(bContext *C)
{
Text *text = CTX_data_edit_text(C);
@@ -100,7 +100,7 @@ static int text_edit_poll(bContext *C)
return 1;
}
-int text_space_edit_poll(bContext *C)
+bool text_space_edit_poll(bContext *C)
{
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
@@ -116,7 +116,7 @@ int text_space_edit_poll(bContext *C)
return 1;
}
-static int text_region_edit_poll(bContext *C)
+static bool text_region_edit_poll(bContext *C)
{
SpaceText *st = CTX_wm_space_text(C);
Text *text = CTX_data_edit_text(C);
@@ -361,7 +361,7 @@ void TEXT_OT_reload(wmOperatorType *ot)
/******************* delete operator *********************/
-static int text_unlink_poll(bContext *C)
+static bool text_unlink_poll(bContext *C)
{
/* it should be possible to unlink texts if they're lib-linked in... */
return CTX_data_edit_text(C) != NULL;
@@ -447,7 +447,7 @@ void TEXT_OT_make_internal(wmOperatorType *ot)
/******************* save operator *********************/
-static int text_save_poll(bContext *C)
+static bool text_save_poll(bContext *C)
{
Text *text = CTX_data_edit_text(C);
@@ -590,7 +590,7 @@ void TEXT_OT_save_as(wmOperatorType *ot)
/******************* run script operator *********************/
-static int text_run_script_poll(bContext *C)
+static bool text_run_script_poll(bContext *C)
{
return (CTX_data_edit_text(C) != NULL);
}
@@ -2140,7 +2140,7 @@ typedef struct TextScroll {
int zone;
} TextScroll;
-static int text_scroll_poll(bContext *C)
+static bool text_scroll_poll(bContext *C)
{
/* it should be possible to still scroll linked texts to read them, even if they can't be edited... */
return CTX_data_edit_text(C) != NULL;
@@ -2323,7 +2323,7 @@ void TEXT_OT_scroll(wmOperatorType *ot)
/******************** scroll bar operator *******************/
-static int text_region_scroll_poll(bContext *C)
+static bool text_region_scroll_poll(bContext *C)
{
/* same as text_region_edit_poll except it works on libdata too */
SpaceText *st = CTX_wm_space_text(C);
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 1bd1973a4db..63ae3bbb657 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -579,7 +579,7 @@ static void view3d_main_region_exit(wmWindowManager *wm, ARegion *ar)
}
}
-static int view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
@@ -589,7 +589,7 @@ static int view3d_ob_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent
return 0;
}
-static int view3d_group_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool view3d_group_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
@@ -599,7 +599,7 @@ static int view3d_group_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEve
return 0;
}
-static int view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
@@ -609,7 +609,7 @@ static int view3d_mat_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent
return 0;
}
-static int view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
+static bool view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent *UNUSED(event))
{
if (drag->type == WM_DRAG_ID) {
ID *id = drag->poin;
@@ -623,7 +623,7 @@ static int view3d_ima_drop_poll(bContext *UNUSED(C), wmDrag *drag, const wmEvent
return 0;
}
-static int view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
if (event->ctrl)
return false;
@@ -634,7 +634,7 @@ static int view3d_ima_bg_drop_poll(bContext *C, wmDrag *drag, const wmEvent *eve
return 0;
}
-static int view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
Base *base = ED_view3d_give_base_under_cursor(C, event->mval);
@@ -648,7 +648,7 @@ static int view3d_ima_empty_drop_poll(bContext *C, wmDrag *drag, const wmEvent *
return 0;
}
-static int view3d_ima_mesh_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
+static bool view3d_ima_mesh_drop_poll(bContext *C, wmDrag *drag, const wmEvent *event)
{
Base *base = ED_view3d_give_base_under_cursor(C, event->mval);
diff --git a/source/blender/editors/space_view3d/view3d_buttons.c b/source/blender/editors/space_view3d/view3d_buttons.c
index fbbc5bd7bb9..63786e87b1f 100644
--- a/source/blender/editors/space_view3d/view3d_buttons.c
+++ b/source/blender/editors/space_view3d/view3d_buttons.c
@@ -784,7 +784,7 @@ static void do_view3d_vgroup_buttons(bContext *C, void *UNUSED(arg), int event)
}
}
-static int view3d_panel_vgroup_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool view3d_panel_vgroup_poll(const bContext *C, PanelType *UNUSED(pt))
{
Scene *scene = CTX_data_scene(C);
Object *ob = OBACT;
@@ -1117,7 +1117,7 @@ static void do_view3d_region_buttons(bContext *C, void *UNUSED(index), int event
WM_event_add_notifier(C, NC_SPACE | ND_SPACE_VIEW3D, v3d);
}
-static int view3d_panel_transform_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool view3d_panel_transform_poll(const bContext *C, PanelType *UNUSED(pt))
{
Scene *scene = CTX_data_scene(C);
return (scene->basact != NULL);
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index 5cf167165cd..f34866b00cd 100644
--- a/source/blender/editors/space_view3d/view3d_edit.c
+++ b/source/blender/editors/space_view3d/view3d_edit.c
@@ -928,7 +928,7 @@ static int viewrotate_invoke(bContext *C, wmOperator *op, const wmEvent *event)
}
/* test for unlocked camera view in quad view */
-static int view3d_camera_user_poll(bContext *C)
+static bool view3d_camera_user_poll(bContext *C)
{
View3D *v3d;
ARegion *ar;
@@ -943,7 +943,7 @@ static int view3d_camera_user_poll(bContext *C)
return 0;
}
-static int view3d_lock_poll(bContext *C)
+static bool view3d_lock_poll(bContext *C)
{
View3D *v3d = CTX_wm_view3d(C);
if (v3d) {
diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c
index 124bd33f227..27dda99e715 100644
--- a/source/blender/editors/space_view3d/view3d_header.c
+++ b/source/blender/editors/space_view3d/view3d_header.c
@@ -200,7 +200,7 @@ static int view3d_layers_invoke(bContext *C, wmOperator *op, const wmEvent *even
return OPERATOR_FINISHED;
}
-static int view3d_layers_poll(bContext *C)
+static bool view3d_layers_poll(bContext *C)
{
return (ED_operator_view3d_active(C) && CTX_wm_view3d(C)->localvd == NULL);
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index c3a8374d82e..12eb2fc0f2b 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -269,7 +269,7 @@ static void view3d_userdata_lassoselect_init(
r_data->is_changed = false;
}
-static int view3d_selectable_data(bContext *C)
+static bool view3d_selectable_data(bContext *C)
{
Object *ob = CTX_data_active_object(C);
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index 3cab43ba463..a812950254f 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -460,7 +460,7 @@ static int view3d_camera_to_view_exec(bContext *C, wmOperator *UNUSED(op))
}
-static int view3d_camera_to_view_poll(bContext *C)
+static bool view3d_camera_to_view_poll(bContext *C)
{
View3D *v3d;
ARegion *ar;
@@ -658,7 +658,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-int ED_operator_rv3d_user_region_poll(bContext *C)
+bool ED_operator_rv3d_user_region_poll(bContext *C)
{
View3D *v3d_dummy;
ARegion *ar_dummy;
@@ -1398,7 +1398,7 @@ static void game_set_commmandline_options(GameData *gm)
#endif /* WITH_GAMEENGINE */
-static int game_engine_poll(bContext *C)
+static bool game_engine_poll(bContext *C)
{
bScreen *screen;
/* we need a context and area to launch BGE
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index a7bf9612fbb..3f9534751c1 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -1680,7 +1680,7 @@ static void drawArc(float size, float angle_start, float angle_end, int segments
glEnd();
}
-static int helpline_poll(bContext *C)
+static bool helpline_poll(bContext *C)
{
ARegion *ar = CTX_wm_region(C);
diff --git a/source/blender/editors/transform/transform_ops.c b/source/blender/editors/transform/transform_ops.c
index 56d6983f581..7505a0ba7fe 100644
--- a/source/blender/editors/transform/transform_ops.c
+++ b/source/blender/editors/transform/transform_ops.c
@@ -221,7 +221,7 @@ static int delete_orientation_invoke(bContext *C, wmOperator *op, const wmEvent
return delete_orientation_exec(C, op);
}
-static int delete_orientation_poll(bContext *C)
+static bool delete_orientation_poll(bContext *C)
{
int selected_index = -1;
View3D *v3d = CTX_wm_view3d(C);
@@ -623,7 +623,7 @@ static void TRANSFORM_OT_resize(struct wmOperatorType *ot)
ot, P_CONSTRAINT | P_PROPORTIONAL | P_MIRROR | P_GEO_SNAP | P_OPTIONS | P_GPENCIL_EDIT | P_CENTER);
}
-static int skin_resize_poll(bContext *C)
+static bool skin_resize_poll(bContext *C)
{
struct Object *obedit = CTX_data_edit_object(C);
if (obedit && obedit->type == OB_MESH) {
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index 4472b8f9a09..5f5b7b330f9 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -237,7 +237,7 @@ static int ed_undo_redo_exec(bContext *C, wmOperator *UNUSED(op))
return ret ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
}
-static int ed_undo_redo_poll(bContext *C)
+static bool ed_undo_redo_poll(bContext *C)
{
wmOperator *last_op = WM_operator_last_redo(C);
return last_op && ED_operator_screenactive(C) &&
diff --git a/source/blender/editors/util/ed_transverts.c b/source/blender/editors/util/ed_transverts.c
index c3fb653979c..e6b13569d6a 100644
--- a/source/blender/editors/util/ed_transverts.c
+++ b/source/blender/editors/util/ed_transverts.c
@@ -496,7 +496,7 @@ void ED_transverts_free(TransVertStore *tvs)
tvs->transverts_tot = 0;
}
-int ED_transverts_poll(bContext *C)
+bool ED_transverts_poll(bContext *C)
{
Object *obedit = CTX_data_edit_object(C);
if (obedit) {
diff --git a/source/blender/editors/uvedit/uvedit_buttons.c b/source/blender/editors/uvedit/uvedit_buttons.c
index 2eb2d8bc80d..f9c5dd89179 100644
--- a/source/blender/editors/uvedit/uvedit_buttons.c
+++ b/source/blender/editors/uvedit/uvedit_buttons.c
@@ -214,7 +214,7 @@ static void do_uvedit_vertex(bContext *C, void *UNUSED(arg), int event)
/* Panels */
-static int image_panel_uv_poll(const bContext *C, PanelType *UNUSED(pt))
+static bool image_panel_uv_poll(const bContext *C, PanelType *UNUSED(pt))
{
Object *obedit = CTX_data_edit_object(C);
return ED_uvedit_test(obedit);
diff --git a/source/blender/editors/uvedit/uvedit_ops.c b/source/blender/editors/uvedit/uvedit_ops.c
index 0fa5fb9a48d..3aacd9b4605 100644
--- a/source/blender/editors/uvedit/uvedit_ops.c
+++ b/source/blender/editors/uvedit/uvedit_ops.c
@@ -112,7 +112,7 @@ bool ED_uvedit_test(Object *obedit)
return ret;
}
-static int ED_operator_uvedit_can_uv_sculpt(struct bContext *C)
+static bool ED_operator_uvedit_can_uv_sculpt(struct bContext *C)
{
SpaceImage *sima = CTX_wm_space_image(C);
ToolSettings *toolsettings = CTX_data_tool_settings(C);
@@ -4053,7 +4053,7 @@ static void UV_OT_reveal(wmOperatorType *ot)
/** \name Set 2D Cursor Operator
* \{ */
-static int uv_set_2d_cursor_poll(bContext *C)
+static bool uv_set_2d_cursor_poll(bContext *C)
{
return ED_operator_uvedit_space_image(C) ||
ED_space_image_maskedit_poll(C) ||
diff --git a/source/blender/editors/uvedit/uvedit_unwrap_ops.c b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
index dbe8796ba8b..06eae0ee63d 100644
--- a/source/blender/editors/uvedit/uvedit_unwrap_ops.c
+++ b/source/blender/editors/uvedit/uvedit_unwrap_ops.c
@@ -1398,7 +1398,7 @@ static int uv_from_view_exec(bContext *C, wmOperator *op)
return OPERATOR_FINISHED;
}
-static int uv_from_view_poll(bContext *C)
+static bool uv_from_view_poll(bContext *C)
{
RegionView3D *rv3d = CTX_wm_region_view3d(C);
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index 25a810f5bfd..7e55eb4633e 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -317,7 +317,7 @@ typedef struct wmKeyMap {
/* runtime */
/** Verify if enabled in the current context, use #WM_keymap_poll instead of direct calls. */
- int (*poll)(struct bContext *);
+ bool (*poll)(struct bContext *);
/** For modal, #EnumPropertyItem for now. */
const void *modal_items;
} wmKeyMap;
diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h
index 8367cc39647..ffada6efd02 100644
--- a/source/blender/makesrna/RNA_access.h
+++ b/source/blender/makesrna/RNA_access.h
@@ -873,7 +873,7 @@ bool RNA_property_enum_item_from_value_gettexted(
int RNA_property_enum_bitflag_identifiers(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier);
StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop);
-int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value);
+bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value);
bool RNA_property_editable(PointerRNA *ptr, PropertyRNA *prop);
bool RNA_property_editable_info(PointerRNA *ptr, PropertyRNA *prop, const char **r_info);
diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h
index 0f4e20a02ab..bbd4ac3753f 100644
--- a/source/blender/makesrna/RNA_enum_types.h
+++ b/source/blender/makesrna/RNA_enum_types.h
@@ -208,18 +208,18 @@ int rna_node_tree_type_to_enum(struct bNodeTreeType *typeinfo);
int rna_node_tree_idname_to_enum(const char *idname);
struct bNodeTreeType *rna_node_tree_type_from_enum(int value);
const EnumPropertyItem *rna_node_tree_type_itemf(
- void *data, int (*poll)(void *data, struct bNodeTreeType *), bool *r_free);
+ void *data, bool (*poll)(void *data, struct bNodeTreeType *), bool *r_free);
int rna_node_type_to_enum(struct bNodeType *typeinfo);
int rna_node_idname_to_enum(const char *idname);
struct bNodeType *rna_node_type_from_enum(int value);
-const EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, struct bNodeType *), bool *r_free);
+const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data, struct bNodeType *), bool *r_free);
int rna_node_socket_type_to_enum(struct bNodeSocketType *typeinfo);
int rna_node_socket_idname_to_enum(const char *idname);
struct bNodeSocketType *rna_node_socket_type_from_enum(int value);
const EnumPropertyItem *rna_node_socket_type_itemf(
- void *data, int (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
+ void *data, bool (*poll)(void *data, struct bNodeSocketType *), bool *r_free);
struct bContext;
struct PointerRNA;
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index c042c024652..2a74aedd60a 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -1362,7 +1362,7 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
return &RNA_UnknownType;
}
-int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
+bool RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *value)
{
prop = rna_ensure_property(prop);
diff --git a/source/blender/makesrna/intern/rna_action.c b/source/blender/makesrna/intern/rna_action.c
index 6985cb54359..675ed42a6d2 100644
--- a/source/blender/makesrna/intern/rna_action.c
+++ b/source/blender/makesrna/intern/rna_action.c
@@ -223,7 +223,7 @@ static void rna_Action_frame_range_get(PointerRNA *ptr, float *values)
/* used to check if an action (value pointer) is suitable to be assigned to the ID-block that is ptr */
-int rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
+bool rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
{
ID *srcId = (ID *)ptr->id.data;
bAction *act = (bAction *)value.id.data;
@@ -243,7 +243,7 @@ int rna_Action_id_poll(PointerRNA *ptr, PointerRNA value)
}
/* used to check if an action (value pointer) can be assigned to Action Editor given current mode */
-int rna_Action_actedit_assign_poll(PointerRNA *ptr, PointerRNA value)
+bool rna_Action_actedit_assign_poll(PointerRNA *ptr, PointerRNA value)
{
SpaceAction *saction = (SpaceAction *)ptr->data;
bAction *act = (bAction *)value.id.data;
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c
index 8f964389963..623eccc9ee5 100644
--- a/source/blender/makesrna/intern/rna_animation.c
+++ b/source/blender/makesrna/intern/rna_animation.c
@@ -138,7 +138,7 @@ static void rna_AnimData_tweakmode_set(PointerRNA *ptr, const int value)
/* ****************************** */
/* wrapper for poll callback */
-static int RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
+static bool RKS_POLL_rna_internal(KeyingSetInfo *ksi, bContext *C)
{
extern FunctionRNA rna_KeyingSetInfo_poll_func;
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c
index d8389093593..4b563bf6659 100644
--- a/source/blender/makesrna/intern/rna_constraint.c
+++ b/source/blender/makesrna/intern/rna_constraint.c
@@ -399,7 +399,7 @@ static void rna_SplineIKConstraint_joint_bindings_set(PointerRNA *ptr, const flo
memcpy(ikData->points, values, ikData->numpoints * sizeof(float));
}
-static int rna_Constraint_cameraObject_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_Constraint_cameraObject_poll(PointerRNA *ptr, PointerRNA value)
{
Object *ob = (Object *)value.data;
@@ -446,7 +446,7 @@ static void rna_Constraint_followTrack_depthObject_set(PointerRNA *ptr, PointerR
}
}
-static int rna_Constraint_followTrack_depthObject_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_Constraint_followTrack_depthObject_poll(PointerRNA *ptr, PointerRNA value)
{
Object *ob = (Object *)value.data;
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index 50abf00714b..3c4baa70c5f 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -393,7 +393,7 @@ static void rna_Curve_bevelObject_set(PointerRNA *ptr, PointerRNA value)
}
}
-static int rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_Curve_otherObject_poll(PointerRNA *ptr, PointerRNA value)
{
Curve *cu = (Curve *)ptr->id.data;
Object *ob = (Object *)value.data;
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index f0f7dc13d2d..fac0f39b11c 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -240,16 +240,16 @@ void rna_Mesh_update_draw(struct Main *bmain, struct Scene *scene, struct Pointe
void rna_TextureSlot_update(struct Main *bmain, struct Scene *scene, struct PointerRNA *ptr);
/* basic poll functions for object types */
-int rna_Armature_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Camera_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Curve_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Lamp_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Lattice_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Mesh_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Armature_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Camera_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Curve_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Lamp_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Lattice_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Mesh_object_poll(struct PointerRNA *ptr, struct PointerRNA value);
/* basic poll functions for actions (to prevent actions getting set in wrong places) */
-int rna_Action_id_poll(struct PointerRNA *ptr, struct PointerRNA value);
-int rna_Action_actedit_assign_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Action_id_poll(struct PointerRNA *ptr, struct PointerRNA value);
+bool rna_Action_actedit_assign_poll(struct PointerRNA *ptr, struct PointerRNA value);
char *rna_TextureSlot_path(struct PointerRNA *ptr);
char *rna_Node_ImageUser_path(struct PointerRNA *ptr);
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h
index 3e678b52050..f9929cec7b1 100644
--- a/source/blender/makesrna/intern/rna_internal_types.h
+++ b/source/blender/makesrna/intern/rna_internal_types.h
@@ -94,8 +94,8 @@ typedef const EnumPropertyItem *(*PropEnumItemFunc)(
typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr);
typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr);
typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value);
-typedef int (*PropPointerPollFunc)(struct PointerRNA *ptr, const PointerRNA value);
-typedef int (*PropPointerPollFuncPy)(struct PointerRNA *ptr, const PointerRNA value, const PropertyRNA *prop);
+typedef bool (*PropPointerPollFunc)(struct PointerRNA *ptr, const PointerRNA value);
+typedef bool (*PropPointerPollFuncPy)(struct PointerRNA *ptr, const PointerRNA value, const PropertyRNA *prop);
typedef void (*PropCollectionBeginFunc)(struct CollectionPropertyIterator *iter, struct PointerRNA *ptr);
typedef void (*PropCollectionNextFunc)(struct CollectionPropertyIterator *iter);
typedef void (*PropCollectionEndFunc)(struct CollectionPropertyIterator *iter);
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index a29f10684bb..27fd02c9be7 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -1155,7 +1155,7 @@ static void rna_MeshSequenceCache_object_path_update(Main *bmain, Scene *scene,
rna_Modifier_update(bmain, scene, ptr);
}
-static int rna_ParticleInstanceModifier_particle_system_poll(PointerRNA *ptr, const PointerRNA value)
+static bool rna_ParticleInstanceModifier_particle_system_poll(PointerRNA *ptr, const PointerRNA value)
{
ParticleInstanceModifierData *psmd = ptr->data;
ParticleSystem *psys = value.data;
@@ -1164,7 +1164,7 @@ static int rna_ParticleInstanceModifier_particle_system_poll(PointerRNA *ptr, co
return false;
/* make sure psys is in the object */
- return BLI_findindex(&psmd->ob->particlesystem, psys) >= 0;
+ return BLI_findindex(&psmd->ob->particlesystem, psys) != -1;
}
static PointerRNA rna_ParticleInstanceModifier_particle_system_get(PointerRNA *ptr)
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 37f229a1402..38e969fedb5 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -244,7 +244,7 @@ bNodeTreeType *rna_node_tree_type_from_enum(int value)
return result;
}
-const EnumPropertyItem *rna_node_tree_type_itemf(void *data, int (*poll)(void *data, bNodeTreeType *), bool *r_free)
+const EnumPropertyItem *rna_node_tree_type_itemf(void *data, bool (*poll)(void *data, bNodeTreeType *), bool *r_free)
{
EnumPropertyItem tmp = {0};
EnumPropertyItem *item = NULL;
@@ -320,7 +320,7 @@ bNodeType *rna_node_type_from_enum(int value)
return result;
}
-const EnumPropertyItem *rna_node_type_itemf(void *data, int (*poll)(void *data, bNodeType *), bool *r_free)
+const EnumPropertyItem *rna_node_type_itemf(void *data, bool (*poll)(void *data, bNodeType *), bool *r_free)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0};
@@ -395,7 +395,7 @@ bNodeSocketType *rna_node_socket_type_from_enum(int value)
}
const EnumPropertyItem *rna_node_socket_type_itemf(
- void *data, int (*poll)(void *data, bNodeSocketType *), bool *r_free)
+ void *data, bool (*poll)(void *data, bNodeSocketType *), bool *r_free)
{
EnumPropertyItem *item = NULL;
EnumPropertyItem tmp = {0};
@@ -527,7 +527,7 @@ static StructRNA *rna_NodeTree_refine(struct PointerRNA *ptr)
return &RNA_NodeTree;
}
-static int rna_NodeTree_poll(const bContext *C, bNodeTreeType *ntreetype)
+static bool rna_NodeTree_poll(const bContext *C, bNodeTreeType *ntreetype)
{
extern FunctionRNA rna_NodeTree_poll_func;
@@ -1141,7 +1141,7 @@ char *rna_Node_ImageUser_path(PointerRNA *ptr)
return NULL;
}
-static int rna_Node_poll(bNodeType *ntype, bNodeTree *ntree)
+static bool rna_Node_poll(bNodeType *ntype, bNodeTree *ntree)
{
extern FunctionRNA rna_Node_poll_func;
@@ -1149,7 +1149,7 @@ static int rna_Node_poll(bNodeType *ntype, bNodeTree *ntree)
ParameterList list;
FunctionRNA *func;
void *ret;
- int visible;
+ bool visible;
RNA_pointer_create(NULL, ntype->ext.srna, NULL, &ptr); /* dummy */
func = &rna_Node_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
@@ -1166,7 +1166,7 @@ static int rna_Node_poll(bNodeType *ntype, bNodeTree *ntree)
return visible;
}
-static int rna_Node_poll_instance(bNode *node, bNodeTree *ntree)
+static bool rna_Node_poll_instance(bNode *node, bNodeTree *ntree)
{
extern FunctionRNA rna_Node_poll_instance_func;
@@ -1174,7 +1174,7 @@ static int rna_Node_poll_instance(bNode *node, bNodeTree *ntree)
ParameterList list;
FunctionRNA *func;
void *ret;
- int visible;
+ bool visible;
RNA_pointer_create(NULL, node->typeinfo->ext.srna, node, &ptr); /* dummy */
func = &rna_Node_poll_instance_func; /* RNA_struct_find_function(&ptr, "poll_instance"); */
@@ -1191,7 +1191,7 @@ static int rna_Node_poll_instance(bNode *node, bNodeTree *ntree)
return visible;
}
-static int rna_Node_poll_instance_default(bNode *node, bNodeTree *ntree)
+static bool rna_Node_poll_instance_default(bNode *node, bNodeTree *ntree)
{
/* use the basic poll function */
return rna_Node_poll(node->typeinfo, ntree);
@@ -1557,7 +1557,7 @@ static void rna_Node_parent_set(PointerRNA *ptr, PointerRNA value)
}
}
-static int rna_Node_parent_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_Node_parent_poll(PointerRNA *ptr, PointerRNA value)
{
bNode *node = ptr->data;
bNode *parent = value.data;
@@ -2520,7 +2520,7 @@ static void rna_NodeGroup_node_tree_set(PointerRNA *ptr, const PointerRNA value)
}
}
-static int rna_NodeGroup_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
+static bool rna_NodeGroup_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
{
bNodeTree *ntree = ptr->id.data;
bNodeTree *ngroup = value.data;
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index d0ae06bd048..9b741cf044a 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1477,32 +1477,32 @@ static float rna_VertexGroup_weight(ID *id, bDeformGroup *dg, ReportList *report
}
/* generic poll functions */
-int rna_Lattice_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Lattice_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_LATTICE;
}
-int rna_Curve_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Curve_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_CURVE;
}
-int rna_Armature_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Armature_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_ARMATURE;
}
-int rna_Mesh_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Mesh_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_MESH;
}
-int rna_Camera_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Camera_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_CAMERA;
}
-int rna_Lamp_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+bool rna_Lamp_object_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
return ((Object *)value.id.data)->type == OB_LAMP;
}
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c
index 882a1989672..890aa532943 100644
--- a/source/blender/makesrna/intern/rna_sculpt_paint.c
+++ b/source/blender/makesrna/intern/rna_sculpt_paint.c
@@ -244,7 +244,7 @@ static char *rna_ParticleEdit_path(PointerRNA *UNUSED(ptr))
return BLI_strdup("tool_settings.particle_edit");
}
-static int rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_Brush_mode_poll(PointerRNA *ptr, PointerRNA value)
{
Scene *scene = (Scene *)ptr->id.data;
ToolSettings *ts = scene->toolsettings;
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index fb6953904b3..aa3ab1742aa 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -1046,7 +1046,7 @@ static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
}
-static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
+static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
{
Scene *scene = (Scene *) ptr->id.data;
Editing *ed = BKE_sequencer_editing_get(scene, false);
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 93ae2f29f82..23ed021b190 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -1479,7 +1479,7 @@ static void rna_SpaceNodeEditor_node_tree_set(PointerRNA *ptr, const PointerRNA
ED_node_tree_start(snode, (bNodeTree *)value.data, NULL, NULL);
}
-static int rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
+static bool rna_SpaceNodeEditor_node_tree_poll(PointerRNA *ptr, const PointerRNA value)
{
SpaceNode *snode = (SpaceNode *)ptr->data;
bNodeTree *ntree = (bNodeTree *)value.data;
@@ -1503,7 +1503,7 @@ static void rna_SpaceNodeEditor_tree_type_set(PointerRNA *ptr, int value)
SpaceNode *snode = (SpaceNode *)ptr->data;
ED_node_set_tree_type(snode, rna_node_tree_type_from_enum(value));
}
-static int rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
+static bool rna_SpaceNodeEditor_tree_type_poll(void *Cv, bNodeTreeType *type)
{
bContext *C = (bContext *)Cv;
if (type->poll)
diff --git a/source/blender/makesrna/intern/rna_ui.c b/source/blender/makesrna/intern/rna_ui.c
index 23d24ebaf82..840fe86ea04 100644
--- a/source/blender/makesrna/intern/rna_ui.c
+++ b/source/blender/makesrna/intern/rna_ui.c
@@ -105,7 +105,7 @@ static ARegionType *region_type_find(ReportList *reports, int space_type, int re
/* Panel */
-static int panel_poll(const bContext *C, PanelType *pt)
+static bool panel_poll(const bContext *C, PanelType *pt)
{
extern FunctionRNA rna_Panel_poll_func;
@@ -643,7 +643,7 @@ static StructRNA *rna_Header_refine(PointerRNA *htr)
/* Menu */
-static int menu_poll(const bContext *C, MenuType *pt)
+static bool menu_poll(const bContext *C, MenuType *pt)
{
extern FunctionRNA rna_Menu_poll_func;
@@ -651,7 +651,7 @@ static int menu_poll(const bContext *C, MenuType *pt)
ParameterList list;
FunctionRNA *func;
void *ret;
- int visible;
+ bool visible;
RNA_pointer_create(NULL, pt->ext.srna, NULL, &ptr); /* dummy */
func = &rna_Menu_poll_func; /* RNA_struct_find_function(&ptr, "poll"); */
diff --git a/source/blender/makesrna/intern/rna_wm.c b/source/blender/makesrna/intern/rna_wm.c
index 0de69b9729b..44e01cf8d44 100644
--- a/source/blender/makesrna/intern/rna_wm.c
+++ b/source/blender/makesrna/intern/rna_wm.c
@@ -640,7 +640,7 @@ static void rna_Window_screen_set(PointerRNA *ptr, PointerRNA value)
win->newscreen = value.data;
}
-static int rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
+static bool rna_Window_screen_assign_poll(PointerRNA *UNUSED(ptr), PointerRNA value)
{
bScreen *screen = (bScreen *)value.id.data;
@@ -943,7 +943,7 @@ static void rna_wmClipboard_set(PointerRNA *UNUSED(ptr), const char *value)
#ifdef WITH_PYTHON
-static int rna_operator_poll_cb(bContext *C, wmOperatorType *ot)
+static bool rna_operator_poll_cb(bContext *C, wmOperatorType *ot)
{
extern FunctionRNA rna_Operator_poll_func;
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c
index 022794e8d42..3f67804685c 100644
--- a/source/blender/nodes/composite/node_composite_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -32,7 +32,7 @@
#include "node_composite_util.h"
-int cmp_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
+bool cmp_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
{
return STREQ(ntree->idname, "CompositorNodeTree");
}
diff --git a/source/blender/nodes/composite/node_composite_util.h b/source/blender/nodes/composite/node_composite_util.h
index 193cdb90003..3f05d7d1bef 100644
--- a/source/blender/nodes/composite/node_composite_util.h
+++ b/source/blender/nodes/composite/node_composite_util.h
@@ -60,7 +60,7 @@
#define CMP_SCALE_MAX 12000
-int cmp_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
+bool cmp_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
void cmp_node_update_default(struct bNodeTree *UNUSED(ntree), struct bNode *node);
void cmp_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index bf50070e5cb..52e58a0ebd3 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -388,7 +388,7 @@ static void node_composit_init_rlayers(const bContext *C, PointerRNA *ptr)
}
}
-static int node_composit_poll_rlayers(bNodeType *UNUSED(ntype), bNodeTree *ntree)
+static bool node_composit_poll_rlayers(bNodeType *UNUSED(ntype), bNodeTree *ntree)
{
if (STREQ(ntree->idname, "CompositorNodeTree")) {
Scene *scene;
diff --git a/source/blender/nodes/intern/node_common.c b/source/blender/nodes/intern/node_common.c
index 4a47bf7035c..cb04b341c26 100644
--- a/source/blender/nodes/intern/node_common.c
+++ b/source/blender/nodes/intern/node_common.c
@@ -81,7 +81,7 @@ void node_group_label(bNodeTree *UNUSED(ntree), bNode *node, char *label, int ma
BLI_strncpy(label, (node->id) ? node->id->name + 2 : IFACE_("Missing Data-Block"), maxlen);
}
-int node_group_poll_instance(bNode *node, bNodeTree *nodetree)
+bool node_group_poll_instance(bNode *node, bNodeTree *nodetree)
{
if (node->typeinfo->poll(node->typeinfo, nodetree)) {
bNodeTree *grouptree = (bNodeTree *)node->id;
diff --git a/source/blender/nodes/intern/node_common.h b/source/blender/nodes/intern/node_common.h
index edc1f19f554..737489474f9 100644
--- a/source/blender/nodes/intern/node_common.h
+++ b/source/blender/nodes/intern/node_common.h
@@ -38,7 +38,7 @@
struct bNodeTree;
void node_group_label(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen);
-int node_group_poll_instance(struct bNode *node, struct bNodeTree *nodetree);
+bool node_group_poll_instance(struct bNode *node, struct bNodeTree *nodetree);
void ntree_update_reroute_nodes(struct bNodeTree *ntree);
diff --git a/source/blender/nodes/shader/node_shader_tree.c b/source/blender/nodes/shader/node_shader_tree.c
index e63dd1d9990..16fda773040 100644
--- a/source/blender/nodes/shader/node_shader_tree.c
+++ b/source/blender/nodes/shader/node_shader_tree.c
@@ -64,7 +64,7 @@
#include "node_util.h"
#include "node_shader_util.h"
-static int shader_tree_poll(const bContext *C, bNodeTreeType *UNUSED(treetype))
+static bool shader_tree_poll(const bContext *C, bNodeTreeType *UNUSED(treetype))
{
Scene *scene = CTX_data_scene(C);
/* allow empty engine string too, this is from older versions that didn't have registerable engines yet */
diff --git a/source/blender/nodes/shader/node_shader_util.c b/source/blender/nodes/shader/node_shader_util.c
index 57a08045126..3103057cbcf 100644
--- a/source/blender/nodes/shader/node_shader_util.c
+++ b/source/blender/nodes/shader/node_shader_util.c
@@ -37,7 +37,7 @@
#include "node_exec.h"
-int sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
+bool sh_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
{
return STREQ(ntree->idname, "ShaderNodeTree");
}
diff --git a/source/blender/nodes/shader/node_shader_util.h b/source/blender/nodes/shader/node_shader_util.h
index 51643d63f5e..e2c1fe7897b 100644
--- a/source/blender/nodes/shader/node_shader_util.h
+++ b/source/blender/nodes/shader/node_shader_util.h
@@ -80,7 +80,7 @@
#include "GPU_material.h"
-int sh_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
+bool sh_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
void sh_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
diff --git a/source/blender/nodes/texture/node_texture_util.c b/source/blender/nodes/texture/node_texture_util.c
index 0682fa9f414..6b9f29475b5 100644
--- a/source/blender/nodes/texture/node_texture_util.c
+++ b/source/blender/nodes/texture/node_texture_util.c
@@ -50,7 +50,7 @@
#include "node_texture_util.h"
-int tex_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
+bool tex_node_poll_default(bNodeType *UNUSED(ntype), bNodeTree *ntree)
{
return STREQ(ntree->idname, "TextureNodeTree");
}
diff --git a/source/blender/nodes/texture/node_texture_util.h b/source/blender/nodes/texture/node_texture_util.h
index c3ccd08b275..389be543d7e 100644
--- a/source/blender/nodes/texture/node_texture_util.h
+++ b/source/blender/nodes/texture/node_texture_util.h
@@ -116,7 +116,7 @@ typedef struct TexDelegate {
} TexDelegate;
-int tex_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
+bool tex_node_poll_default(struct bNodeType *ntype, struct bNodeTree *ntree);
void tex_node_type_base(struct bNodeType *ntype, int type, const char *name, short nclass, short flag);
void tex_input_rgba(float *out, bNodeStack *in, TexParams *params, short thread);
diff --git a/source/blender/python/intern/bpy_props.c b/source/blender/python/intern/bpy_props.c
index a7f55116cd4..edcc2bef0c5 100644
--- a/source/blender/python/intern/bpy_props.c
+++ b/source/blender/python/intern/bpy_props.c
@@ -378,7 +378,7 @@ static void bpy_prop_boolean_set_cb(struct PointerRNA *ptr, struct PropertyRNA *
}
}
-static int bpy_prop_poll_cb(struct PointerRNA *self, PointerRNA candidate, struct PropertyRNA *prop)
+static bool bpy_prop_poll_cb(struct PointerRNA *self, PointerRNA candidate, struct PropertyRNA *prop)
{
PyObject *py_self;
PyObject *py_candidate;
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h
index cfaef2c3f58..95d5a481385 100644
--- a/source/blender/windowmanager/WM_api.h
+++ b/source/blender/windowmanager/WM_api.h
@@ -129,10 +129,11 @@ void WM_cursor_grab_enable(struct wmWindow *win, bool wrap, bool hide, int boun
void WM_cursor_grab_disable(struct wmWindow *win, const int mouse_ungrab_xy[2]);
void WM_cursor_time (struct wmWindow *win, int nr);
-void *WM_paint_cursor_activate(struct wmWindowManager *wm,
- int (*poll)(struct bContext *C),
- void (*draw)(struct bContext *C, int, int, void *customdata),
- void *customdata);
+void *WM_paint_cursor_activate(
+ struct wmWindowManager *wm,
+ bool (*poll)(struct bContext *C),
+ void (*draw)(struct bContext *C, int, int, void *customdata),
+ void *customdata);
void WM_paint_cursor_end(struct wmWindowManager *wm, void *handle);
void WM_paint_cursor_tag_redraw(struct wmWindow *win, struct ARegion *ar);
@@ -238,7 +239,7 @@ int WM_operator_confirm (struct bContext *C, struct wmOperator *op, const str
int WM_operator_filesel (struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFormatData *im_format);
/* poll callback, context checks */
-int WM_operator_winactive (struct bContext *C);
+bool WM_operator_winactive (struct bContext *C);
/* invoke callback, exec + redo popup */
int WM_operator_props_popup_confirm(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
int WM_operator_props_popup_call(struct bContext *C, struct wmOperator *op, const struct wmEvent *event);
@@ -273,8 +274,8 @@ struct wmOperatorType *WM_operatortype_append_macro(const char *idname, const ch
struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *ot, const char *idname);
-int WM_operator_poll (struct bContext *C, struct wmOperatorType *ot);
-int WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context);
+bool WM_operator_poll (struct bContext *C, struct wmOperatorType *ot);
+bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context);
int WM_operator_call_ex(struct bContext *C, struct wmOperator *op, const bool store);
int WM_operator_call (struct bContext *C, struct wmOperator *op);
int WM_operator_call_notest(struct bContext *C, struct wmOperator *op);
@@ -417,8 +418,9 @@ void WM_event_drag_image(struct wmDrag *, struct ImBuf *, float scale, int sx
void WM_drag_free(struct wmDrag *drag);
void WM_drag_free_list(struct ListBase *lb);
-struct wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event),
- void (*copy)(struct wmDrag *, struct wmDropBox *));
+struct wmDropBox *WM_dropbox_add(
+ ListBase *lb, const char *idname, bool (*poll)(struct bContext *, struct wmDrag *, const struct wmEvent *event),
+ void (*copy)(struct wmDrag *, struct wmDropBox *));
ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid);
/* Set a subwindow active in pixelspace view, with optional scissor subset */
diff --git a/source/blender/windowmanager/WM_types.h b/source/blender/windowmanager/WM_types.h
index 80f1e8e1ee1..3d4080eb600 100644
--- a/source/blender/windowmanager/WM_types.h
+++ b/source/blender/windowmanager/WM_types.h
@@ -569,7 +569,7 @@ typedef struct wmOperatorType {
/* verify if the operator can be executed in the current context, note
* that the operator might still fail to execute even if this return true */
- int (*poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT;
+ bool (*poll)(struct bContext *) ATTR_WARN_UNUSED_RESULT;
/* optional panel for redo and repeat, autogenerated if not set */
void (*ui)(struct bContext *, struct wmOperator *);
@@ -591,7 +591,7 @@ typedef struct wmOperatorType {
struct wmKeyMap *modalkeymap;
/* python needs the operator type as well */
- int (*pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT;
+ bool (*pyop_poll)(struct bContext *, struct wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT;
/* RNA integration */
ExtensionRNA ext;
@@ -661,7 +661,7 @@ typedef struct wmDropBox {
struct wmDropBox *next, *prev;
/* test if the dropbox is active, then can print optype name */
- int (*poll)(struct bContext *, struct wmDrag *, const wmEvent *);
+ bool (*poll)(struct bContext *, struct wmDrag *, const wmEvent *);
/* before exec, this copies drag info to wmDrop properties */
void (*copy)(struct wmDrag *, struct wmDropBox *);
diff --git a/source/blender/windowmanager/intern/wm_dragdrop.c b/source/blender/windowmanager/intern/wm_dragdrop.c
index 7a5e3e90166..8bb4bf4f304 100644
--- a/source/blender/windowmanager/intern/wm_dragdrop.c
+++ b/source/blender/windowmanager/intern/wm_dragdrop.c
@@ -95,8 +95,9 @@ ListBase *WM_dropboxmap_find(const char *idname, int spaceid, int regionid)
-wmDropBox *WM_dropbox_add(ListBase *lb, const char *idname, int (*poll)(bContext *, wmDrag *, const wmEvent *),
- void (*copy)(wmDrag *, wmDropBox *))
+wmDropBox *WM_dropbox_add(
+ ListBase *lb, const char *idname, bool (*poll)(bContext *, wmDrag *, const wmEvent *),
+ void (*copy)(wmDrag *, wmDropBox *))
{
wmDropBox *drop = MEM_callocN(sizeof(wmDropBox), "wmDropBox");
diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c
index cd436899410..3a300877750 100644
--- a/source/blender/windowmanager/intern/wm_event_system.c
+++ b/source/blender/windowmanager/intern/wm_event_system.c
@@ -520,7 +520,7 @@ static void wm_handler_ui_cancel(bContext *C)
/* ********************* operators ******************* */
-int WM_operator_poll(bContext *C, wmOperatorType *ot)
+bool WM_operator_poll(bContext *C, wmOperatorType *ot)
{
wmOperatorTypeMacro *otmacro;
@@ -541,7 +541,7 @@ int WM_operator_poll(bContext *C, wmOperatorType *ot)
}
/* sets up the new context and calls 'wm_operator_invoke()' with poll_only */
-int WM_operator_poll_context(bContext *C, wmOperatorType *ot, short context)
+bool WM_operator_poll_context(bContext *C, wmOperatorType *ot, short context)
{
return wm_operator_call_internal(C, ot, NULL, NULL, context, true);
}
diff --git a/source/blender/windowmanager/intern/wm_files.c b/source/blender/windowmanager/intern/wm_files.c
index c10b6638608..cb4949d4062 100644
--- a/source/blender/windowmanager/intern/wm_files.c
+++ b/source/blender/windowmanager/intern/wm_files.c
@@ -1882,7 +1882,7 @@ static int wm_revert_mainfile_exec(bContext *C, wmOperator *op)
}
}
-static int wm_revert_mainfile_poll(bContext *UNUSED(C))
+static bool wm_revert_mainfile_poll(bContext *UNUSED(C))
{
return G.relbase_valid;
}
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c
index 8e11e548aec..72973d3de56 100644
--- a/source/blender/windowmanager/intern/wm_files_link.c
+++ b/source/blender/windowmanager/intern/wm_files_link.c
@@ -87,7 +87,7 @@
/* **************** link/append *************** */
-static int wm_link_append_poll(bContext *C)
+static bool wm_link_append_poll(bContext *C)
{
if (WM_operator_winactive(C)) {
/* linking changes active object which is pretty useful in general,
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index ed2cb1134d8..b81790abaad 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1265,7 +1265,7 @@ bool WM_operator_filesel_ensure_ext_imtype(wmOperator *op, const struct ImageFor
}
/* op->poll */
-int WM_operator_winactive(bContext *C)
+bool WM_operator_winactive(bContext *C)
{
if (CTX_wm_window(C) == NULL) return 0;
return 1;
@@ -2028,7 +2028,7 @@ static int wm_search_menu_invoke(bContext *C, wmOperator *UNUSED(op), const wmEv
}
/* op->poll */
-static int wm_search_menu_poll(bContext *C)
+static bool wm_search_menu_poll(bContext *C)
{
if (CTX_wm_window(C) == NULL) {
return 0;
@@ -2115,7 +2115,7 @@ static void WM_OT_call_menu_pie(wmOperatorType *ot)
/* this poll functions is needed in place of WM_operator_winactive
* while it crashes on full screen */
-static int wm_operator_winactive_normal(bContext *C)
+static bool wm_operator_winactive_normal(bContext *C)
{
wmWindow *win = CTX_wm_window(C);
@@ -2212,8 +2212,9 @@ static void WM_OT_console_toggle(wmOperatorType *ot)
* - draw(bContext): drawing callback for paint cursor
*/
-void *WM_paint_cursor_activate(wmWindowManager *wm, int (*poll)(bContext *C),
- wmPaintCursorDraw draw, void *customdata)
+void *WM_paint_cursor_activate(
+ wmWindowManager *wm, bool (*poll)(bContext *C),
+ wmPaintCursorDraw draw, void *customdata)
{
wmPaintCursor *pc = MEM_callocN(sizeof(wmPaintCursor), "paint cursor");
diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h
index 42b1b2a5fb4..c0b0e731f4b 100644
--- a/source/blender/windowmanager/wm.h
+++ b/source/blender/windowmanager/wm.h
@@ -39,7 +39,7 @@ typedef struct wmPaintCursor {
void *customdata;
- int (*poll)(struct bContext *C);
+ bool (*poll)(struct bContext *C);
void (*draw)(bContext *C, int, int, void *customdata);
} wmPaintCursor;
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 862ff23faf3..5c9b214eeff 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -689,8 +689,8 @@ struct wmOperatorTypeMacro *WM_operatortype_macro_define(struct wmOperatorType *
int WM_operator_call_py(struct bContext *C, struct wmOperatorType *ot, short context, struct PointerRNA *properties, struct ReportList *reports, const bool is_undo) RET_ZERO
void WM_operatortype_remove_ptr(struct wmOperatorType *ot) RET_NONE
bool WM_operatortype_remove(const char *idname) RET_ZERO
-int WM_operator_poll(struct bContext *C, struct wmOperatorType *ot) RET_ZERO
-int WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context) RET_ZERO
+bool WM_operator_poll(struct bContext *C, struct wmOperatorType *ot) RET_ZERO
+bool WM_operator_poll_context(struct bContext *C, struct wmOperatorType *ot, short context) RET_ZERO
int WM_operator_props_popup(struct bContext *C, struct wmOperator *op, const struct wmEvent *event) RET_ZERO
void WM_operator_properties_free(struct PointerRNA *ptr) RET_NONE
void WM_operator_properties_create(struct PointerRNA *ptr, const char *opstring) RET_NONE