diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-12-10 10:28:25 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-12-10 10:28:25 +0400 |
commit | 02e378bf19d349031fb7397ccf7e26885289f34d (patch) | |
tree | 1b47a665ff8c24c16318cd3177299f0f54499a1b | |
parent | 8dc80e9d736a9262947de8fb80df40dc010e37b4 (diff) |
Fix for fix: Paths and copying object
Fix for T37471 made path copying modify local paths,
now apply the same logic used for save-as.
-rw-r--r-- | source/blender/blenkernel/intern/blender.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 38765aa61b8..96adadebb48 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -897,6 +897,12 @@ int BKE_copybuffer_save(const char *filename, ReportList *reports) ListBase *lbarray[MAX_LIBARRAY], *fromarray[MAX_LIBARRAY]; int a, retval; + /* path backup/restore */ + void *path_list_backup; + const int path_list_flag = (BKE_BPATH_TRAVERSE_SKIP_LIBRARY | BKE_BPATH_TRAVERSE_SKIP_MULTIFILE); + + path_list_backup = BKE_bpath_list_backup(G.main, path_list_flag); + BLO_main_expander(copybuffer_doit); BLO_expand_main(NULL, G.main); @@ -938,6 +944,11 @@ int BKE_copybuffer_save(const char *filename, ReportList *reports) /* set id flag to zero; */ flag_all_listbases_ids(LIB_NEED_EXPAND | LIB_DOIT, 0); + if (path_list_backup) { + BKE_bpath_list_restore(G.main, path_list_flag, path_list_backup); + BKE_bpath_list_free(path_list_backup); + } + return retval; } |