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:
authorBastien Montagne <montagne29@wanadoo.fr>2015-05-31 19:28:28 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-05-31 19:28:28 +0300
commita8d6c69d7601e7df31c30887940ddcff41592bef (patch)
tree953ed294a27a733831f868823f892fb6cef8a3ea /source/blender/blenloader
parent3ca0870023bb71bc929925a8fc8d172c09df710f (diff)
Fix T44894: Broken packed image import from older .blend file.
rBe5fbeba0b3a6e9eea not only restored forward compat, it also broke backward compat... for no reason at all even, exising ima->packedfile is only used by read/versionning code if .blend version is below 274.4 (i.e. no multi-image packing exists).
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a22e882937c..68326a02da2 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1536,6 +1536,10 @@ void blo_make_packed_pointer_map(FileData *fd, Main *oldmain)
for (ima = oldmain->image.first; ima; ima = ima->id.next) {
ImagePackedFile *imapf;
+
+ if (ima->packedfile)
+ insert_packedmap(fd, ima->packedfile);
+
for (imapf = ima->packedfiles.first; imapf; imapf = imapf->next)
if (imapf->packedfile)
insert_packedmap(fd, imapf->packedfile);
@@ -1574,6 +1578,9 @@ void blo_end_packed_pointer_map(FileData *fd, Main *oldmain)
for (ima = oldmain->image.first; ima; ima = ima->id.next) {
ImagePackedFile *imapf;
+
+ ima->packedfile = newpackedadr(fd, ima->packedfile);
+
for (imapf = ima->packedfiles.first; imapf; imapf = imapf->next)
imapf->packedfile = newpackedadr(fd, imapf->packedfile);
}
@@ -3432,7 +3439,6 @@ static void direct_link_image(FileData *fd, Image *ima)
link_list(fd, &(ima->views));
link_list(fd, &(ima->packedfiles));
- ima->packedfile = NULL;
for (imapf = ima->packedfiles.first; imapf; imapf = imapf->next) {
imapf->packedfile = direct_link_packedfile(fd, imapf->packedfile);
}