Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenloader/intern/readblenentry.c')
-rw-r--r--source/blender/blenloader/intern/readblenentry.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readblenentry.c b/source/blender/blenloader/intern/readblenentry.c
index a4b96c9e59c..085e500f7e5 100644
--- a/source/blender/blenloader/intern/readblenentry.c
+++ b/source/blender/blenloader/intern/readblenentry.c
@@ -363,17 +363,17 @@ BlendFileData *BLO_read_from_memory(const void *mem,
BlendFileData *BLO_read_from_memfile(Main *oldmain,
const char *filename,
MemFile *memfile,
- eBLOReadSkip skip_flags,
+ const struct BlendFileReadParams *params,
ReportList *reports)
{
BlendFileData *bfd = NULL;
FileData *fd;
ListBase old_mainlist;
- fd = blo_filedata_from_memfile(memfile, reports);
+ fd = blo_filedata_from_memfile(memfile, params, reports);
if (fd) {
fd->reports = reports;
- fd->skip_flags = skip_flags;
+ fd->skip_flags = params->skip_flags;
BLI_strncpy(fd->relabase, filename, sizeof(fd->relabase));
/* clear ob->proxy_from pointers in old main */
@@ -384,6 +384,12 @@ BlendFileData *BLO_read_from_memfile(Main *oldmain,
/* add the library pointers in oldmap lookup */
blo_add_library_pointer_map(&old_mainlist, fd);
+ if ((params->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0) {
+ /* Build idmap of old main (we only care about local data here, so we can do that after
+ * split_main() call. */
+ blo_make_old_idmap_from_main(fd, old_mainlist.first);
+ }
+
/* makes lookup of existing images in old main */
blo_make_image_pointer_map(fd, oldmain);