diff options
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 26c59129914..f111640145f 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -78,6 +78,7 @@ #include "BKE_screen.h" #include "BKE_sequencer.h" #include "BKE_sound.h" +#include "RE_pipeline.h" #include "BLO_undofile.h" @@ -199,6 +200,11 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath recover= (G.fileflags & G_FILE_RECOVER); + /* Free all render results, without this stale data gets displayed after loading files */ + if (mode != 'u') { + RE_FreeAllRenderResults(); + } + /* Only make filepaths compatible when loading for real (not undo) */ if (mode != 'u') { clean_paths(bfd->main); @@ -275,7 +281,7 @@ static void setup_app_data(bContext *C, BlendFileData *bfd, const char *filepath /* special cases, override loaded flags: */ if (G.f != bfd->globalf) { - const int flags_keep= (G_DEBUG | G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); + const int flags_keep = (G_SWAP_EXCHANGE | G_SCRIPT_AUTOEXEC | G_SCRIPT_OVERRIDE_PREF); bfd->globalf= (bfd->globalf & ~flags_keep) | (G.f & flags_keep); } @@ -600,20 +606,19 @@ void BKE_undo_step(bContext *C, int step) /* curundo should never be NULL, after restart or load file it should call undo_save */ if (curundo==NULL || curundo->prev==NULL) ; // XXX error("No undo available"); else { - if (G.f & G_DEBUG) printf("undo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("undo %s\n", curundo->name); curundo= curundo->prev; read_undosave(C, curundo); } } else { - /* curundo has to remain current situation! */ if (curundo==NULL || curundo->next==NULL) ; // XXX error("No redo available"); else { read_undosave(C, curundo->next); curundo= curundo->next; - if (G.f & G_DEBUG) printf("redo %s\n", curundo->name); + if (G.debug & G_DEBUG) printf("redo %s\n", curundo->name); } } } |