Commit: 2dfbf31a41308ca440a440d5a66f59bf63df7589
Author: Julian Eisel
Date:   Thu Apr 23 13:33:29 2015 +0200
Branches: master
https://developer.blender.org/rB2dfbf31a41308ca440a440d5a66f59bf63df7589

Display slot menu in Properties Region even if render slot is empty

For the records, this one is caused by 31f984bc3ffcc838343, it wasn't
implemented at all ;)

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

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 09ee5a2..1c668c3 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -868,10 +868,16 @@ void uiTemplateImage(uiLayout *layout, bContext *C, 
PointerRNA *ptr, const char
                                /* browse layer/passes */
                                RenderResult *rr;
                                const float dpi_fac = UI_DPI_FAC;
+                               const int menus_width = 230 * dpi_fac;
 
                                /* use BKE_image_acquire_renderresult  so we 
get the correct slot in the menu */
                                rr = BKE_image_acquire_renderresult(scene, ima);
-                               uiblock_layer_pass_arrow_buttons(layout, ima, 
rr, iuser, 230 * dpi_fac, &ima->render_slot);
+                               if (rr) {
+                                       
uiblock_layer_pass_arrow_buttons(layout, ima, rr, iuser, menus_width, 
&ima->render_slot);
+                               }
+                               else {
+                                       uiblock_layer_pass_buttons(layout, ima, 
rr, iuser, menus_width, &ima->render_slot);
+                               }
                                BKE_image_release_renderresult(scene, ima);
                        }
                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to