diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 13:03:56 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-02 13:03:56 +0300 |
commit | b076b3853c99d947806e05fe2dec29ca5fa944fa (patch) | |
tree | 3d975903096066e33f8cfdcff60e118685deacf8 /source/blender/editors/gpencil | |
parent | ad5a20efcef8114b589ff66d09166eabdc8e67ad (diff) | |
parent | b88e51dd55c62bdc160f33f9b2ae1727a892560a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_convert.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_data.c | 6 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 16 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_intern.h | 12 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_interpolate.c | 4 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_ops.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_select.c | 2 | ||||
-rw-r--r-- | source/blender/editors/gpencil/gpencil_utils.c | 10 |
10 files changed, 29 insertions, 29 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index d877ea03c5d..75e4c510bcf 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -1187,7 +1187,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 d2301337c0e..ccdbcba71f9 100644 --- a/source/blender/editors/gpencil/gpencil_convert.c +++ b/source/blender/editors/gpencil/gpencil_convert.c @@ -1291,7 +1291,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 45caadf3742..ec67b2da161 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -86,7 +86,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; } @@ -131,7 +131,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; @@ -517,7 +517,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 @@ -784,7 +784,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 */ @@ -864,7 +864,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); @@ -916,7 +916,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); @@ -1370,7 +1370,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); @@ -2090,7 +2090,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 67b88efa285..90ff1e0bb25 100644 --- a/source/blender/editors/gpencil/gpencil_intern.h +++ b/source/blender/editors/gpencil/gpencil_intern.h @@ -94,12 +94,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 1b18c6f6731..cc30d7ec266 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); @@ -1036,7 +1036,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 28d8c8c295b..5e930c03bd4 100644 --- a/source/blender/editors/gpencil/gpencil_ops.c +++ b/source/blender/editors/gpencil/gpencil_ops.c @@ -118,7 +118,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 416649cdfaf..483966c0c78 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -203,7 +203,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 4ee3bdd587e..8b65855f7c4 100644 --- a/source/blender/editors/gpencil/gpencil_utils.c +++ b/source/blender/editors/gpencil/gpencil_utils.c @@ -262,14 +262,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); @@ -278,7 +278,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); @@ -287,7 +287,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); @@ -296,7 +296,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); |