diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 12:47:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 12:51:31 +0300 |
commit | b88e51dd55c62bdc160f33f9b2ae1727a892560a (patch) | |
tree | c9b9e00d51be18250df443c47ad31b1341a50f01 /source/blender/editors/animation | |
parent | bfbfb1c47e8c60732f45638513ed7e39bedc730a (diff) |
Cleanup: use bool for poll functions
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_edit.c | 10 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_markers.c | 6 | ||||
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/drivers.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 2 | ||||
-rw-r--r-- | source/blender/editors/animation/keyingsets.c | 6 |
6 files changed, 14 insertions, 14 deletions
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; |