diff options
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_buttons.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_edit.c | 14 | ||||
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 003476882f7..dd302829f8e 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -241,7 +241,7 @@ static void preview_cb(ScrArea *sa, struct uiBlock *block) } -static int is_preview_allowed(ScrArea *cur) +static bool is_preview_allowed(ScrArea *cur) { SpaceImage *sima = cur->spacedata.first; ScrArea *sa; @@ -677,13 +677,13 @@ void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char if (ima->source != IMA_SRC_GENERATED) { if (compact == 0) { /* background image view doesnt need these */ ImBuf *ibuf = BKE_image_acquire_ibuf(ima, iuser, NULL); - int has_alpha = TRUE; + bool has_alpha = true; if (ibuf) { int imtype = BKE_ftype_to_imtype(ibuf->ftype); char valid_channels = BKE_imtype_valid_channels(imtype); - has_alpha = valid_channels & IMA_CHAN_FLAG_ALPHA; + has_alpha = (valid_channels & IMA_CHAN_FLAG_ALPHA) != 0; BKE_image_release_ibuf(ima, ibuf, NULL); } @@ -764,7 +764,7 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr, int color_man PropertyRNA *prop; const int depth_ok = BKE_imtype_valid_depths(imf->imtype); /* some settings depend on this being a scene thats rendered */ - const short is_render_out = (id && GS(id->name) == ID_SCE); + const bool is_render_out = (id && GS(id->name) == ID_SCE); uiLayout *col, *row, *split, *sub; int show_preview = FALSE; diff --git a/source/blender/editors/space_image/image_edit.c b/source/blender/editors/space_image/image_edit.c index 217a9687c01..9b9c13a1d4f 100644 --- a/source/blender/editors/space_image/image_edit.c +++ b/source/blender/editors/space_image/image_edit.c @@ -135,11 +135,11 @@ void ED_space_image_release_buffer(SpaceImage *sima, ImBuf *ibuf, void *lock) BKE_image_release_ibuf(sima->image, ibuf, lock); } -int ED_space_image_has_buffer(SpaceImage *sima) +bool ED_space_image_has_buffer(SpaceImage *sima) { ImBuf *ibuf; void *lock; - int has_buffer; + bool has_buffer; ibuf = ED_space_image_acquire_buffer(sima, &lock); has_buffer = (ibuf != NULL); @@ -291,12 +291,12 @@ void ED_image_point_pos__reverse(SpaceImage *sima, ARegion *ar, const float co[2 r_co[1] = (co[1] * height * zoomy) + (float)sy; } -int ED_space_image_show_render(SpaceImage *sima) +bool ED_space_image_show_render(SpaceImage *sima) { return (sima->image && ELEM(sima->image->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)); } -int ED_space_image_show_paint(SpaceImage *sima) +bool ED_space_image_show_paint(SpaceImage *sima) { if (ED_space_image_show_render(sima)) return 0; @@ -304,7 +304,7 @@ int ED_space_image_show_paint(SpaceImage *sima) return (sima->mode == SI_MODE_PAINT); } -int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) +bool ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) { if (sima && (ED_space_image_show_render(sima) || ED_space_image_show_paint(sima))) return 0; @@ -321,7 +321,7 @@ int ED_space_image_show_uvedit(SpaceImage *sima, Object *obedit) return 0; } -int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) +bool ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) { if (ED_space_image_show_render(sima)) return 0; @@ -340,7 +340,7 @@ int ED_space_image_show_uvshadow(SpaceImage *sima, Object *obedit) } /* matches clip function */ -int ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima) +bool ED_space_image_check_show_maskedit(Scene *scene, SpaceImage *sima) { /* check editmode - this is reserved for UV editing */ Object *ob = OBACT; diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 28027e74f13..38d19923c3d 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -1344,12 +1344,12 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, if (ibuf) { Image *ima = sima->image; - short is_depth_set = FALSE; + bool is_depth_set = false; if (ELEM(ima->type, IMA_TYPE_R_RESULT, IMA_TYPE_COMPOSITE)) { /* imtype */ simopts->im_format = scene->r.im_format; - is_depth_set = TRUE; + is_depth_set = true; } else { if (ima->source == IMA_SRC_GENERATED) { @@ -1376,7 +1376,7 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, } /* depth, account for float buffer and format support */ - if (is_depth_set == FALSE) { + if (is_depth_set == false) { simopts->im_format.depth = imtype_best_depth(ibuf, simopts->im_format.imtype); } @@ -2311,12 +2311,12 @@ static void image_sample_draw(const bContext *C, ARegion *ar, void *arg_info) /* returns color in SRGB */ /* matching ED_space_node_color_sample() */ -int ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], float r_col[3]) +bool ED_space_image_color_sample(SpaceImage *sima, ARegion *ar, int mval[2], float r_col[3]) { void *lock; ImBuf *ibuf = ED_space_image_acquire_buffer(sima, &lock); float fx, fy; - int ret = FALSE; + bool ret = false; if (ibuf == NULL) { ED_space_image_release_buffer(sima, ibuf, lock); |