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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-24 00:24:02 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-24 00:24:02 +0400
commite8f6caa384e3d60d6a860c99fb35a0a083e1ef29 (patch)
tree13f9652458388f25039b6e0239a9886c373ad1d5 /source/blender/blenloader
parent3862e757d05a74af1584396d118d33451fcbe5a8 (diff)
Fix for image alpha version patch with library linked files where the image
datablock is in a different library than the texture datablock. Adjusted the fix in 54790 to check for this case specifically so it keeps working on other files that have packed images. The problem is that blo_do_versions_newlibadr will not return a valid datablock in some cases with linked libraries. This function is used in various places in the version patching code and would likely cause problems there as well, needs to be investigated further.
Diffstat (limited to 'source/blender/blenloader')
-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;