diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-11-22 00:19:58 +0400 |
commit | 0e2c8cdcdd13a49560e6f105de530c2ef94ed4e4 (patch) | |
tree | 0f53d799ec422ddc96dd948136061e08233abdf4 /source/blender/blenkernel/intern/ocean.c | |
parent | e0482b2def521df87f09c7aa23e58909f5e19b90 (diff) |
move image settings into their own structure so the interface can be shared where image saving settings are needed.
currently file out node and render output share this struct & UI.
Diffstat (limited to 'source/blender/blenkernel/intern/ocean.c')
-rw-r--r-- | source/blender/blenkernel/intern/ocean.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index 85b9b0fbf22..dbcdf5555ab 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -1185,6 +1185,8 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v * before use - campbell */ OceanResult ocr; + ImageFormatData imf= {0}; + int f, i=0, x, y, cancel=0; float progress; @@ -1201,6 +1203,13 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v BLI_srand(0); + /* setup image format */ + imf.imtype= R_OPENEXR; + imf.depth= R_IMF_CHAN_DEPTH_16; + imf.exr_codec= 2; /* ZIP */ + + + for (f=och->start, i=0; f<=och->end; f++, i++) { /* create a new imbuf to store image for this frame */ @@ -1292,18 +1301,18 @@ void BKE_bake_ocean(struct Ocean *o, struct OceanCache *och, void (*update_cb)(v /* write the images */ cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_DISPLACE); - if(0 == BKE_write_ibuf(ibuf_disp, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec + if(0 == BKE_write_ibuf(ibuf_disp, string, &imf)) // 2 == ZIP exr codec printf("Cannot save Displacement File Output to %s\n", string); if (o->_do_jacobian) { cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_FOAM); - if(0 == BKE_write_ibuf(ibuf_foam, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec + if(0 == BKE_write_ibuf(ibuf_foam, string, &imf)) // 2 == ZIP exr codec printf("Cannot save Foam File Output to %s\n", string); } if (o->_do_normals) { cache_filename(string, och->bakepath, och->relbase, f, CACHE_TYPE_NORMAL); - if(0 == BKE_write_ibuf(ibuf_normal, string, R_OPENEXR, R_OPENEXR_HALF, 2)) // 2 == ZIP exr codec + if(0 == BKE_write_ibuf(ibuf_normal, string, &imf)) // 2 == ZIP exr codec printf("Cannot save Normal File Output to %s\n", string); } |