diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-31 21:20:31 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2013-10-31 21:20:31 +0400 |
commit | c9fdec14f5114c2ea34fc8e0c301ba83be0630ac (patch) | |
tree | 7f13dda14e1c0f310a4caf67ad6777022d258ba8 /source/blender/editors/space_image | |
parent | beae4f498da5a730889e9deb17455263a6e2f054 (diff) |
Fix #37261 Rendering a Render Layer from another scene doesn't update.
The scene pointer used for looking up the appropriate source of render result images in the image editor was always taken from context. This means that render results for a different scene would never be
displayed in the image editor.
To give feedback on running renders, try to get the running render job's scene pointer in the image editor for render result type images. This only happens during rendering, apart from that the regular
context scene result is displayed.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 7b20af340ae..2ba9123b30b 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -56,6 +56,7 @@ #include "ED_mask.h" #include "ED_mesh.h" #include "ED_node.h" +#include "ED_render.h" #include "ED_space_api.h" #include "ED_screen.h" #include "ED_uvedit.h" @@ -653,7 +654,16 @@ static void image_main_area_draw(const bContext *C, ARegion *ar) glClear(GL_COLOR_BUFFER_BIT); /* put scene context variable in iuser */ - sima->iuser.scene = scene; + if (sima->image && sima->image->type == IMA_TYPE_R_RESULT) { + /* for render result, try to use the currently rendering scene */ + Scene *render_scene = ED_render_job_get_scene(C); + if (render_scene) + sima->iuser.scene = render_scene; + else + sima->iuser.scene = scene; + } + else + sima->iuser.scene = scene; /* we set view2d from own zoom and offset each time */ image_main_area_set_view2d(sima, ar); |