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).
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user