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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-03-26 15:44:03 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-03-26 15:44:03 +0400
commit261e92f864834db45407476aa19ae740b5531d29 (patch)
treed3988a70ba9e0bd9f1925f22b3fca3880857f3fe /source/blender/editors/space_image/image_buttons.c
parent843964946418025543da036055bb9db9bf7fa207 (diff)
Fix #30430: Can only alt+scroll image buffer slot once
Issue was caused by mapping old buttons to new buttons. Render slot button in header holds RenerResult for particular slot, but in N-panel it holds RenderResult from RenderEngine. So what was happening is: switching render slot to empty slot makes slot button in header contain NULL as button function's argument, but old button holds RenderResult for rendered image, so this two buttons aren't equal and so button isn't getting activated and no scrolling happens. Making slot button hold RenderResult directly from RenderEngine (as it's happening with buttons in N-panel) makes old->new buttons mapping work correct and it's possible to alt-scroll smoothly
Diffstat (limited to 'source/blender/editors/space_image/image_buttons.c')
-rw-r--r--source/blender/editors/space_image/image_buttons.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c
index dbee8f207ec..8e39f745497 100644
--- a/source/blender/editors/space_image/image_buttons.c
+++ b/source/blender/editors/space_image/image_buttons.c
@@ -874,14 +874,16 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr)
void uiTemplateImageLayers(uiLayout *layout, bContext *C, Image *ima, ImageUser *iuser)
{
Scene *scene= CTX_data_scene(C);
+ Render *re;
RenderResult *rr;
/* render layers and passes */
if (ima && iuser) {
- const float dpi_fac= UI_DPI_FAC;
- rr= BKE_image_acquire_renderresult(scene, ima);
+ const float dpi_fac = UI_DPI_FAC;
+ re = RE_GetRender(scene->id.name);
+ rr = RE_AcquireResultRead(re);
uiblock_layer_pass_buttons(layout, rr, iuser, 160 * dpi_fac, (ima->type==IMA_TYPE_R_RESULT)? &ima->render_slot: NULL);
- BKE_image_release_renderresult(scene, ima);
+ RE_ReleaseResult(re);
}
}