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/render/render_internal.c | |
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/render/render_internal.c')
-rw-r--r-- | source/blender/editors/render/render_internal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index a47235024dd..71bf67220fe 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -1237,3 +1237,13 @@ void ED_viewport_render_kill_jobs(const bContext *C, bool free_database) } } +Scene *ED_render_job_get_scene(const bContext *C) +{ + wmWindowManager *wm = CTX_wm_manager(C); + RenderJob *rj = (RenderJob *)WM_jobs_customdata_from_type(wm, WM_JOB_TYPE_RENDER); + + if (rj) + return rj->scene; + + return NULL; +} |