diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-03-26 12:10:12 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-03-26 12:10:12 +0400 |
commit | ce4eb573017550c37e8119681a1e83c2e646c66f (patch) | |
tree | 6095b0d2f19876eb1371a164479d7c64f3986fed /source/blender/render | |
parent | 4ade85612c95c81d3d45826a93bd24ee9c3c9dd4 (diff) |
fix [#30653] Wrong image at UV/Image Editor window
render results would be displayed on loading new files if the scene names matches, now free render-results so as not to display stale data - also saves some memory.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/extern/include/RE_pipeline.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/source/pipeline.c | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/render/extern/include/RE_pipeline.h b/source/blender/render/extern/include/RE_pipeline.h index b81066201e7..315995475e9 100644 --- a/source/blender/render/extern/include/RE_pipeline.h +++ b/source/blender/render/extern/include/RE_pipeline.h @@ -165,6 +165,8 @@ void RE_InitRenderCB(struct Render *re); void RE_FreeRender (struct Render *re); /* only called on exit */ void RE_FreeAllRender (void); +/* only call on file load */ +void RE_FreeAllRenderResults(void); /* get results and statistics */ void RE_FreeRenderResult(struct RenderResult *rr); diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index 5db59fcdcc0..a4a244daf43 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -410,6 +410,20 @@ void RE_FreeAllRender(void) } } +/* on file load, free all re */ +void RE_FreeAllRenderResults(void) +{ + Render *re; + + for (re = RenderGlobal.renderlist.first; re; re = re->next) { + render_result_free(re->result); + render_result_free(re->pushedresult); + + re->result = NULL; + re->pushedresult = NULL; + } +} + /* ********* initialize state ******** */ |