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/gpencil/gpencil_edit.c | |
parent | bfbfb1c47e8c60732f45638513ed7e39bedc730a (diff) |
Cleanup: use bool for poll functions
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 16 |
1 files changed, 8 insertions, 8 deletions
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 |