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/space_image | |
parent | ad5a20efcef8114b589ff66d09166eabdc8e67ad (diff) | |
parent | b88e51dd55c62bdc160f33f9b2ae1727a892560a (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_edit.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_intern.h | 2 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 26 | ||||
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 2 |
4 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 8bbca25538a..4388accc534 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -388,7 +388,7 @@ bool ED_space_image_check_show_maskedit(SpaceImage *sima, ViewLayer *view_layer) 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); @@ -415,7 +415,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 3725f1d5195..5d9c496d584 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 40311594512..3efdce3ea6d 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); @@ -284,7 +284,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) { @@ -833,7 +833,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))); } @@ -2157,7 +2157,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) { @@ -2600,7 +2600,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); @@ -3444,7 +3444,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); @@ -3580,7 +3580,7 @@ void IMAGE_OT_remove_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 792dc25981e..907b7e51c42 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -387,7 +387,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? */ |