Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_image/image_buttons.c')
-rw-r--r--source/blender/editors/space_image/image_buttons.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index d0c21f85472..bc367a99d6b 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -869,7 +869,8 @@ void uiTemplateImage(uiLayout *layout,
uiItemS(col);
uiItemR(col, &imaptr, "generated_type", UI_ITEM_R_EXPAND, IFACE_("Type"), ICON_NONE);
- if (ima->gen_type == IMA_GENTYPE_BLANK) {
+ ImageTile *base_tile = BKE_image_get_tile(ima, 0);
+ if (base_tile->gen_type == IMA_GENTYPE_BLANK) {
uiItemR(col, &imaptr, "generated_color", 0, NULL, ICON_NONE);
}
}
@@ -921,7 +922,7 @@ void uiTemplateImage(uiLayout *layout,
}
}
- /* Colorspace and alpha */
+ /* Color-space and alpha. */
{
uiItemS(layout);
@@ -1211,6 +1212,11 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
ofs += BLI_strncpy_rlen(str + ofs, TIP_(" + Z"), len - ofs);
}
+ eGPUTextureFormat texture_format = IMB_gpu_get_texture_format(
+ ibuf, ima->flag & IMA_HIGH_BITDEPTH, ibuf->planes >= 8);
+ const char *texture_format_description = GPU_texture_format_description(texture_format);
+ ofs += BLI_snprintf_rlen(str + ofs, len - ofs, TIP_(", %s"), texture_format_description);
+
uiItemL(col, str, ICON_NONE);
}
@@ -1218,7 +1224,7 @@ void uiTemplateImageInfo(uiLayout *layout, bContext *C, Image *ima, ImageUser *i
if (ELEM(ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
/* don't use iuser->framenr directly because it may not be updated if auto-refresh is off */
Scene *scene = CTX_data_scene(C);
- const int framenr = BKE_image_user_frame_get(iuser, CFRA, NULL);
+ const int framenr = BKE_image_user_frame_get(iuser, scene->r.cfra, NULL);
char str[MAX_IMAGE_INFO_LEN];
int duration = 0;