Image Info

The image information for multilayer openexr files are only shown on the
first draw. In the second draw the render result property is filled of
the image, making blender think the image is a render result and it want
to display information about the renderpasses. Which are not present.

It could be that in the first draw the image data is not requested as
the buttons are drawn, before the main area

This change will display both information. We should investigate how to
actually detect if this is a render result or not as similar code is
present in the `node_shader_buts_tex_environment_ex`.

Reviewed By: brecht

Maniphest Tasks: T65345

Differential Revision: https://developer.blender.org/D4987
This commit is contained in:
Jeroen Bakker
2019-05-31 15:02:38 +02:00
parent 7484ed9bdc
commit 19691e3ae2

View File

@@ -894,13 +894,7 @@ void uiTemplateImage(uiLayout *layout,
}
/* Image layers and Info */
if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) {
uiItemS(layout);
const float dpi_fac = UI_DPI_FAC;
uiblock_layer_pass_buttons(layout, ima, ima->rr, iuser, 230 * dpi_fac, NULL);
}
else if (ima->source == IMA_SRC_GENERATED) {
if (ima->source == IMA_SRC_GENERATED) {
uiItemS(layout);
/* Generated */
@@ -923,6 +917,12 @@ void uiTemplateImage(uiLayout *layout,
else if (compact == 0) {
uiTemplateImageInfo(layout, C, ima, iuser);
}
if (ima->type == IMA_TYPE_MULTILAYER && ima->rr) {
uiItemS(layout);
const float dpi_fac = UI_DPI_FAC;
uiblock_layer_pass_buttons(layout, ima, ima->rr, iuser, 230 * dpi_fac, NULL);
}
if (BKE_image_is_animated(ima)) {
/* Animation */