diff options
Diffstat (limited to 'source/blender/blenkernel/intern/blender.c')
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index b2bcd9aa6aa..6e343e874f1 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -1,6 +1,4 @@ /* - * $Id$ - * * ***** BEGIN GPL LICENSE BLOCK ***** * * This program is free software; you can redistribute it and/or @@ -63,6 +61,7 @@ #include "BLI_callbacks.h" #include "IMB_imbuf.h" +#include "IMB_moviecache.h" #include "BKE_blender.h" #include "BKE_context.h" @@ -113,6 +112,7 @@ void free_blender(void) BLI_cb_finalize(); seq_stripelem_cache_destruct(); + IMB_moviecache_destruct(); free_nodesystem(); } @@ -160,22 +160,19 @@ static void clear_global(void) G.main= NULL; } +static int clean_paths_visit_cb(void *UNUSED(userdata), char *path_dst, const char *path_src) +{ + strcpy(path_dst, path_src); + BLI_clean(path_dst); + return (strcmp(path_dst, path_src) == 0) ? FALSE : TRUE; +} + /* make sure path names are correct for OS */ static void clean_paths(Main *main) { - struct BPathIterator *bpi; - char filepath_expanded[1024]; Scene *scene; - for(BLI_bpathIterator_init(&bpi, main, main->name, BPATH_USE_PACKED); !BLI_bpathIterator_isDone(bpi); BLI_bpathIterator_step(bpi)) { - BLI_bpathIterator_getPath(bpi, filepath_expanded); - - BLI_clean(filepath_expanded); - - BLI_bpathIterator_setPath(bpi, filepath_expanded); - } - - BLI_bpathIterator_free(bpi); + bpath_traverse_main(main, clean_paths_visit_cb, 0, NULL); for(scene= main->scene.first; scene; scene= scene->id.next) { BLI_clean(scene->r.pic); |