Fix T41920: Changing Use Alpha settings doesn't refresh viewport properly

This commit is contained in:
Sergey Sharybin 2014-10-03 11:27:05 +02:00
parent 59c5aaf447
commit 7fe3161611
Notes: blender-bot 2023-02-14 10:03:37 +01:00
Referenced by issue #41920, png color and alpha with unexpected behaviour in cycles
1 changed files with 8 additions and 0 deletions

View File

@ -176,6 +176,10 @@ int ImageManager::add_image(const string& filename, void *builtin_data, bool ani
img->frame = frame;
img->need_load = true;
}
if(img->use_alpha != use_alpha) {
img->use_alpha = use_alpha;
img->need_load = true;
}
img->users++;
return slot;
}
@ -219,6 +223,10 @@ int ImageManager::add_image(const string& filename, void *builtin_data, bool ani
img->frame = frame;
img->need_load = true;
}
if(img->use_alpha != use_alpha) {
img->use_alpha = use_alpha;
img->need_load = true;
}
img->users++;
return slot+tex_image_byte_start;
}