Exclude generated images when checking if an image is already loaded, it can be very confusing when you don't appear to have the image loaded anywhere.

This commit is contained in:
Campbell Barton
2007-11-10 19:56:06 +00:00
parent 90b4ed9543
commit 2abb50d1ea

View File

@@ -343,7 +343,7 @@ Image *BKE_add_image_file(const char *name)
/* first search an identical image */
for(ima= G.main->image.first; ima; ima= ima->id.next) {
if(ima->source!=IMA_SRC_VIEWER) {
if(ima->source!=IMA_SRC_VIEWER && ima->source!=IMA_SRC_GENERATED) {
BLI_strncpy(strtest, ima->name, sizeof(ima->name));
BLI_convertstringcode(strtest, G.sce, G.scene->r.cfra);