diff options
author | Lukas Stockner <lukas.stockner@freenet.de> | 2020-01-16 04:21:32 +0300 |
---|---|---|
committer | Lukas Stockner <lukas.stockner@freenet.de> | 2020-01-16 04:21:32 +0300 |
commit | 7f571aad22724a1b0cb2427ee5e6829580050140 (patch) | |
tree | 331f0ed0de3b8c32449a5ac1b0d94aeb16f0cf91 /source/blender/blenloader/intern/readfile.c | |
parent | eca8bae6718d2cba788713bfb677f92f2fa3ca4e (diff) | |
parent | 7d8a186335400cb7ad69d24aab89e7a215a70348 (diff) |
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 32 |
1 files changed, 11 insertions, 21 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index fbe270dd060..6a54fc8f59e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1910,11 +1910,9 @@ void blo_make_image_pointer_map(FileData *fd, Main *oldmain) if (ima->cache) { oldnewmap_insert(fd->imamap, ima->cache, ima->cache, 0); } - LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { - for (a = 0; a < TEXTARGET_COUNT; a++) { - if (tile->gputexture[a] != NULL) { - oldnewmap_insert(fd->imamap, tile->gputexture[a], tile->gputexture[a], 0); - } + for (a = 0; a < TEXTARGET_COUNT; a++) { + if (ima->gputexture[a] != NULL) { + oldnewmap_insert(fd->imamap, ima->gputexture[a], ima->gputexture[a], 0); } } if (ima->rr) { @@ -1958,10 +1956,8 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain) if (ima->cache == NULL) { ima->gpuflag = 0; ima->gpuframenr = INT_MAX; - LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { - for (i = 0; i < TEXTARGET_COUNT; i++) { - tile->gputexture[i] = NULL; - } + for (i = 0; i < TEXTARGET_COUNT; i++) { + ima->gputexture[i] = NULL; } ima->rr = NULL; } @@ -1969,10 +1965,8 @@ void blo_end_image_pointer_map(FileData *fd, Main *oldmain) slot->render = newimaadr(fd, slot->render); } - LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { - for (i = 0; i < TEXTARGET_COUNT; i++) { - tile->gputexture[i] = newimaadr(fd, tile->gputexture[i]); - } + for (i = 0; i < TEXTARGET_COUNT; i++) { + ima->gputexture[i] = newimaadr(fd, ima->gputexture[i]); } ima->rr = newimaadr(fd, ima->rr); } @@ -4274,18 +4268,14 @@ static void direct_link_image(FileData *fd, Image *ima) if (!ima->cache) { ima->gpuflag = 0; ima->gpuframenr = INT_MAX; - LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { - for (int i = 0; i < TEXTARGET_COUNT; i++) { - tile->gputexture[i] = NULL; - } + for (int i = 0; i < TEXTARGET_COUNT; i++) { + ima->gputexture[i] = NULL; } ima->rr = NULL; } else { - LISTBASE_FOREACH (ImageTile *, tile, &ima->tiles) { - for (int i = 0; i < TEXTARGET_COUNT; i++) { - tile->gputexture[i] = newimaadr(fd, tile->gputexture[i]); - } + for (int i = 0; i < TEXTARGET_COUNT; i++) { + ima->gputexture[i] = newimaadr(fd, ima->gputexture[i]); } ima->rr = newimaadr(fd, ima->rr); } |