[Bf-blender-cvs] [19691e3ae2e] master: Image Info

Jeroen Bakker noreply at git.blender.org
Tue Jun 4 15:15:15 CEST 2019


Commit: 19691e3ae2ec97ede5d2973e1e055b027474bbdb
Author: Jeroen Bakker
Date:   Fri May 31 15:02:38 2019 +0200
Branches: master
https://developer.blender.org/rB19691e3ae2ec97ede5d2973e1e055b027474bbdb

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

===================================================================

M	source/blender/editors/space_image/image_buttons.c

===================================================================

diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 26512cb232d..17710734c80 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -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 */



More information about the Bf-blender-cvs mailing list