diff options
Diffstat (limited to 'source/blender/editors/render/render_internal.c')
-rw-r--r-- | source/blender/editors/render/render_internal.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/editors/render/render_internal.c b/source/blender/editors/render/render_internal.c index baf25a49f7c..fcc90fa57d5 100644 --- a/source/blender/editors/render/render_internal.c +++ b/source/blender/editors/render/render_internal.c @@ -75,10 +75,8 @@ #include "RE_engine.h" #include "IMB_colormanagement.h" -#include "IMB_imbuf.h" #include "IMB_imbuf_types.h" -#include "GPU_extensions.h" #include "BIF_gl.h" #include "BIF_glutil.h" @@ -86,7 +84,6 @@ #include "RNA_access.h" #include "RNA_define.h" -#include "wm_window.h" #include "render_intern.h" @@ -343,7 +340,11 @@ static void render_freejob(void *rjv) } /* str is IMA_MAX_RENDER_TEXT in size */ -static void make_renderinfo_string(RenderStats *rs, Scene *scene, bool v3d_override, char *str) +static void make_renderinfo_string(const RenderStats *rs, + const Scene *scene, + const bool v3d_override, + const char *error, + char *str) { char info_time_str[32]; // used to be extern to header_info.c uintptr_t mem_in_use, mmap_in_use, peak_memory; @@ -416,8 +417,12 @@ static void make_renderinfo_string(RenderStats *rs, Scene *scene, bool v3d_overr spos += sprintf(spos, IFACE_("| Full Sample %d "), rs->curfsa); /* extra info */ - if (rs->infostr && rs->infostr[0]) + if (rs->infostr && rs->infostr[0]) { spos += sprintf(spos, "| %s ", rs->infostr); + } + else if (error && error[0]) { + spos += sprintf(spos, "| %s ", error); + } /* very weak... but 512 characters is quite safe */ if (spos >= str + IMA_MAX_RENDER_TEXT) @@ -438,7 +443,8 @@ static void image_renderinfo_cb(void *rjv, RenderStats *rs) if (rr->text == NULL) rr->text = MEM_callocN(IMA_MAX_RENDER_TEXT, "rendertext"); - make_renderinfo_string(rs, rj->scene, rj->v3d_override, rr->text); + make_renderinfo_string(rs, rj->scene, rj->v3d_override, + rr->error, rr->text); } RE_ReleaseResult(rj->re); @@ -1121,7 +1127,7 @@ static void render_view3d_renderinfo_cb(void *rjp, RenderStats *rs) *rp->stop = 1; } else { - make_renderinfo_string(rs, rp->scene, false, rp->engine->text); + make_renderinfo_string(rs, rp->scene, false, NULL, rp->engine->text); /* make jobs timer to send notifier */ *(rp->do_update) = true; @@ -1551,10 +1557,10 @@ void render_view3d_draw(RenderEngine *engine, const bContext *C) RE_ReleaseResultImage(re); } -void ED_viewport_render_kill_jobs(const bContext *C, bool free_database) +void ED_viewport_render_kill_jobs(wmWindowManager *wm, + Main *bmain, + bool free_database) { - wmWindowManager *wm = CTX_wm_manager(C); - Main *bmain = CTX_data_main(C); bScreen *sc; ScrArea *sa; ARegion *ar; |