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/readfile.c')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 1aedfb329e4..426d15c82e3 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -8714,8 +8714,10 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
if (image == blo_do_versions_newlibadr(fd, otex->id.lib, otex->ima))
break;
- /* no duplication for packed files */
- if (otex && image->packedfile == NULL) {
+ /* no duplication if the texture and image datablock are not
+ * from the same .blend file, the image datablock may not have
+ * been loaded from a library file otherwise */
+ if (otex && (tex->id.lib == image->id.lib)) {
/* copy image datablock */
nimage = BKE_image_copy(main, image);
nimage->flag |= IMA_IGNORE_ALPHA|IMA_DONE_TAG;