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:
authorJulian Eisel <eiseljulian@gmail.com>2015-04-23 14:33:29 +0300
committerJulian Eisel <eiseljulian@gmail.com>2015-04-23 14:33:29 +0300
commit2dfbf31a41308ca440a440d5a66f59bf63df7589 (patch)
treed443b184814de7a9abdc5cce543c4a42a7b5d7f1 /source/blender/editors/space_image
parent85e455b2458f68c1d2c75fed7b5963fce4a70027 (diff)
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 ;)
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r--source/blender/editors/space_image/image_buttons.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index 09ee5a26634..1c668c33597 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);
}
}