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:
authorTon Roosendaal <ton@blender.org>2010-12-02 19:12:55 +0300
committerTon Roosendaal <ton@blender.org>2010-12-02 19:12:55 +0300
commit30179f4dc66ff45a5e0077962c0151d7e7865ca1 (patch)
treeed79fc491edececa7cd26cf6040125351dc5da40 /source/blender/blenkernel/intern/image.c
parent5ca7c1b0f88ec3f48a83dc641f864d6ee4979ae2 (diff)
IRC comment fix:
Option "free all texture-images" after render, was also freeing unsaved painted images. Now it skips them.
Diffstat (limited to 'source/blender/blenkernel/intern/image.c')
-rw-r--r--source/blender/blenkernel/intern/image.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 31eae70f159..da1d59a0835 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -607,15 +607,21 @@ void BKE_image_free_all_textures(void)
for(ima= G.main->image.first; ima; ima= ima->id.next) {
if(ima->ibufs.first && (ima->id.flag & LIB_DOIT)) {
- /*
ImBuf *ibuf;
+
for(ibuf= ima->ibufs.first; ibuf; ibuf= ibuf->next) {
- if(ibuf->mipmap[0])
+ /* escape when image is painted on */
+ if(ibuf->userflags & IB_BITMAPDIRTY)
+ break;
+
+ /* if(ibuf->mipmap[0])
totsize+= 1.33*ibuf->x*ibuf->y*4;
else
- totsize+= ibuf->x*ibuf->y*4;
- } */
- image_free_buffers(ima);
+ totsize+= ibuf->x*ibuf->y*4;*/
+
+ }
+ if(ibuf==NULL)
+ image_free_buffers(ima);
}
}
/* printf("freed total %d MB\n", totsize/(1024*1024)); */