forked from bartvdbraak/blender
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.
This commit is contained in:
parent
3862e757d0
commit
e8f6caa384
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user