diff options
author | Martin Poirier <theeth@yahoo.com> | 2010-01-07 23:25:51 +0300 |
---|---|---|
committer | Martin Poirier <theeth@yahoo.com> | 2010-01-07 23:25:51 +0300 |
commit | 00a099e44ec5a33ed3c9b9f86810c98c0e2a781b (patch) | |
tree | 5d33b9423aa26ceae6a7a9c75d19fe340d673781 /source/blender/makesrna/intern/rna_image_api.c | |
parent | 9f2c6296cb93aa8839e3a0ecc5b29ce8fa9d3f7f (diff) |
rna image api: with dummy ImageUser, this can save RenderResults now.
Diffstat (limited to 'source/blender/makesrna/intern/rna_image_api.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_image_api.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c index 343172be18e..497891a4de8 100644 --- a/source/blender/makesrna/intern/rna_image_api.c +++ b/source/blender/makesrna/intern/rna_image_api.c @@ -69,10 +69,16 @@ static void rna_Image_save(Image *image, bContext *C, ReportList *reports, char Scene *scene = CTX_data_scene(C); if (scene) { - ibuf = BKE_image_get_ibuf(image, NULL); + ImageUser iuser; + void *lock; - if (BKE_write_ibuf(NULL, ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality)) { + iuser.scene = scene; + iuser.ok = 1; + + ibuf = BKE_image_acquire_ibuf(image, &iuser, &lock); + if (BKE_write_ibuf(NULL, ibuf, path, scene->r.imtype, scene->r.subimtype, scene->r.quality)) { + /* save successful */ } else { BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path); } |