From 743d2f8c0f4359eef120eab4db7bfe00b5185e05 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 Nov 2011 00:35:26 +0000 Subject: rename image type defines to be less ambiguous, also set BMP as not supporting alpha (it reads but cant write) --- source/blender/blenkernel/intern/dynamicpaint.c | 6 +- source/blender/blenkernel/intern/image.c | 172 ++++++++++----------- source/blender/blenkernel/intern/ocean.c | 6 +- source/blender/blenkernel/intern/scene.c | 2 +- source/blender/blenkernel/intern/writeavi.c | 10 +- source/blender/blenkernel/intern/writeffmpeg.c | 8 +- source/blender/blenloader/intern/readfile.c | 12 +- source/blender/editors/space_image/image_buttons.c | 8 +- source/blender/editors/space_image/image_ops.c | 6 +- source/blender/makesdna/DNA_scene_types.h | 84 +++++----- source/blender/makesrna/intern/rna_scene.c | 88 +++++------ .../composite/nodes/node_composite_outputFile.c | 2 +- source/blender/quicktime/apple/qtkit_export.m | 2 +- source/blender/quicktime/apple/quicktime_export.c | 2 +- source/blender/render/intern/source/pipeline.c | 8 +- 15 files changed, 212 insertions(+), 204 deletions(-) (limited to 'source/blender') diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 36ae764198a..d31dad8f8fa 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -2527,13 +2527,13 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam PaintSurfaceData *sData = surface->data; ImgSeqFormatData *f_data = (ImgSeqFormatData*)sData->format_data; /* OpenEXR or PNG */ - int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_OPENEXR : R_PNG; + int format = (surface->image_fileformat & MOD_DPAINT_IMGFORMAT_OPENEXR) ? R_IMF_IMTYPE_OPENEXR : R_IMF_IMTYPE_PNG; char output_file[FILE_MAX]; if (!sData || !sData->type_data) {setError(surface->canvas, "Image save failed: Invalid surface.");return;} /* if selected format is openexr, but current build doesnt support one */ #ifndef WITH_OPENEXR - if (format == R_OPENEXR) format = R_PNG; + if (format == R_IMF_IMTYPE_OPENEXR) format = R_IMF_IMTYPE_PNG; #endif BLI_strncpy(output_file, filename, sizeof(output_file)); BKE_add_image_extension(output_file, format); @@ -2622,7 +2622,7 @@ void dynamicPaint_outputSurfaceImage(DynamicPaintSurface *surface, char* filenam /* Set output format, png in case exr isnt supported */ ibuf->ftype= PNG|95; #ifdef WITH_OPENEXR - if (format == R_OPENEXR) { /* OpenEXR 32-bit float */ + if (format == R_IMF_IMTYPE_OPENEXR) { /* OpenEXR 32-bit float */ ibuf->ftype = OPENEXR | OPENEXR_COMPRESS; } #endif diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index c98c973789d..ef764f2394d 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -802,38 +802,38 @@ void BKE_image_all_free_anim_ibufs(int cfra) int BKE_imtype_to_ftype(const char imtype) { - if(imtype==R_TARGA) + if(imtype==R_IMF_IMTYPE_TARGA) return TGA; - else if(imtype==R_RAWTGA) + else if(imtype==R_IMF_IMTYPE_RAWTGA) return RAWTGA; - else if(imtype== R_IRIS) + else if(imtype== R_IMF_IMTYPE_IRIS) return IMAGIC; #ifdef WITH_HDR - else if (imtype==R_RADHDR) + else if (imtype==R_IMF_IMTYPE_RADHDR) return RADHDR; #endif - else if (imtype==R_PNG) + else if (imtype==R_IMF_IMTYPE_PNG) return PNG; #ifdef WITH_DDS - else if (imtype==R_DDS) + else if (imtype==R_IMF_IMTYPE_DDS) return DDS; #endif - else if (imtype==R_BMP) + else if (imtype==R_IMF_IMTYPE_BMP) return BMP; #ifdef WITH_TIFF - else if (imtype==R_TIFF) + else if (imtype==R_IMF_IMTYPE_TIFF) return TIF; #endif - else if (imtype==R_OPENEXR || imtype==R_MULTILAYER) + else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER) return OPENEXR; #ifdef WITH_CINEON - else if (imtype==R_CINEON) + else if (imtype==R_IMF_IMTYPE_CINEON) return CINEON; - else if (imtype==R_DPX) + else if (imtype==R_IMF_IMTYPE_DPX) return DPX; #endif #ifdef WITH_OPENJPEG - else if(imtype==R_JP2) + else if(imtype==R_IMF_IMTYPE_JP2) return JP2; #endif else @@ -843,58 +843,58 @@ int BKE_imtype_to_ftype(const char imtype) char BKE_ftype_to_imtype(const int ftype) { if(ftype==0) - return R_TARGA; + return R_IMF_IMTYPE_TARGA; else if(ftype == IMAGIC) - return R_IRIS; + return R_IMF_IMTYPE_IRIS; #ifdef WITH_HDR else if (ftype & RADHDR) - return R_RADHDR; + return R_IMF_IMTYPE_RADHDR; #endif else if (ftype & PNG) - return R_PNG; + return R_IMF_IMTYPE_PNG; #ifdef WITH_DDS else if (ftype & DDS) - return R_DDS; + return R_IMF_IMTYPE_DDS; #endif else if (ftype & BMP) - return R_BMP; + return R_IMF_IMTYPE_BMP; #ifdef WITH_TIFF else if (ftype & TIF) - return R_TIFF; + return R_IMF_IMTYPE_TIFF; #endif else if (ftype & OPENEXR) - return R_OPENEXR; + return R_IMF_IMTYPE_OPENEXR; #ifdef WITH_CINEON else if (ftype & CINEON) - return R_CINEON; + return R_IMF_IMTYPE_CINEON; else if (ftype & DPX) - return R_DPX; + return R_IMF_IMTYPE_DPX; #endif else if (ftype & TGA) - return R_TARGA; + return R_IMF_IMTYPE_TARGA; else if(ftype & RAWTGA) - return R_RAWTGA; + return R_IMF_IMTYPE_RAWTGA; #ifdef WITH_OPENJPEG else if(ftype & JP2) - return R_JP2; + return R_IMF_IMTYPE_JP2; #endif else - return R_JPEG90; + return R_IMF_IMTYPE_JPEG90; } int BKE_imtype_is_movie(const char imtype) { switch(imtype) { - case R_AVIRAW: - case R_AVIJPEG: - case R_AVICODEC: - case R_QUICKTIME: - case R_FFMPEG: - case R_H264: - case R_THEORA: - case R_XVID: - case R_FRAMESERVER: + case R_IMF_IMTYPE_AVIRAW: + case R_IMF_IMTYPE_AVIJPEG: + case R_IMF_IMTYPE_AVICODEC: + case R_IMF_IMTYPE_QUICKTIME: + case R_IMF_IMTYPE_FFMPEG: + case R_IMF_IMTYPE_H264: + case R_IMF_IMTYPE_THEORA: + case R_IMF_IMTYPE_XVID: + case R_IMF_IMTYPE_FRAMESERVER: return 1; } return 0; @@ -903,16 +903,16 @@ int BKE_imtype_is_movie(const char imtype) int BKE_imtype_supports_alpha(const char imtype) { switch(imtype) { - case R_TARGA: - case R_IRIS: - case R_PNG: - case R_BMP: - case R_RADHDR: - case R_TIFF: - case R_OPENEXR: - case R_MULTILAYER: - case R_DDS: - case R_JP2: + case R_IMF_IMTYPE_TARGA: + case R_IMF_IMTYPE_IRIS: + case R_IMF_IMTYPE_PNG: + /* case R_IMF_IMTYPE_BMP: */ /* read but not write */ + case R_IMF_IMTYPE_RADHDR: + case R_IMF_IMTYPE_TIFF: + case R_IMF_IMTYPE_OPENEXR: + case R_IMF_IMTYPE_MULTILAYER: + case R_IMF_IMTYPE_DDS: + case R_IMF_IMTYPE_JP2: return 1; } return 0; @@ -921,8 +921,8 @@ int BKE_imtype_supports_alpha(const char imtype) int BKE_imtype_supports_zbuf(const char imtype) { switch(imtype) { - case R_IRIZ: - case R_OPENEXR: /* but not R_MULTILAYER */ + case R_IMF_IMTYPE_IRIZ: + case R_IMF_IMTYPE_OPENEXR: /* but not R_IMF_IMTYPE_MULTILAYER */ return 1; } return 0; @@ -931,7 +931,7 @@ int BKE_imtype_supports_zbuf(const char imtype) int BKE_imtype_supports_compress(const char imtype) { switch(imtype) { - case R_PNG: + case R_IMF_IMTYPE_PNG: return 1; } return 0; @@ -940,9 +940,9 @@ int BKE_imtype_supports_compress(const char imtype) int BKE_imtype_supports_quality(const char imtype) { switch(imtype) { - case R_JPEG90: - case R_JP2: - case R_AVIJPEG: + case R_IMF_IMTYPE_JPEG90: + case R_IMF_IMTYPE_JP2: + case R_IMF_IMTYPE_AVIJPEG: return 1; } return 0; @@ -951,19 +951,19 @@ int BKE_imtype_supports_quality(const char imtype) char BKE_imtype_valid_depths(const char imtype) { switch (imtype) { - case R_RADHDR: + case R_IMF_IMTYPE_RADHDR: return R_IMF_CHAN_DEPTH_32; - case R_TIFF: + case R_IMF_IMTYPE_TIFF: return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_16; - case R_OPENEXR: + case R_IMF_IMTYPE_OPENEXR: return R_IMF_CHAN_DEPTH_16 | R_IMF_CHAN_DEPTH_32; - case R_MULTILAYER: + case R_IMF_IMTYPE_MULTILAYER: return R_IMF_CHAN_DEPTH_32; /* eeh, cineone does some strange 10bits per channel */ - case R_DPX: - case R_CINEON: + case R_IMF_IMTYPE_DPX: + case R_IMF_IMTYPE_CINEON: return R_IMF_CHAN_DEPTH_12; - case R_JP2: + case R_IMF_IMTYPE_JP2: return R_IMF_CHAN_DEPTH_8 | R_IMF_CHAN_DEPTH_12 | R_IMF_CHAN_DEPTH_16; /* most formats are 8bit only */ default: @@ -975,71 +975,71 @@ int BKE_add_image_extension(char *string, const char imtype) { const char *extension= NULL; - if(imtype== R_IRIS) { + if(imtype== R_IMF_IMTYPE_IRIS) { if(!BLI_testextensie(string, ".rgb")) extension= ".rgb"; } - else if(imtype==R_IRIZ) { + else if(imtype==R_IMF_IMTYPE_IRIZ) { if(!BLI_testextensie(string, ".rgb")) extension= ".rgb"; } #ifdef WITH_HDR - else if(imtype==R_RADHDR) { + else if(imtype==R_IMF_IMTYPE_RADHDR) { if(!BLI_testextensie(string, ".hdr")) extension= ".hdr"; } #endif - else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { + else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) { if(!BLI_testextensie(string, ".png")) extension= ".png"; } #ifdef WITH_DDS - else if(imtype==R_DDS) { + else if(imtype==R_IMF_IMTYPE_DDS) { if(!BLI_testextensie(string, ".dds")) extension= ".dds"; } #endif - else if(imtype==R_RAWTGA) { + else if(imtype==R_IMF_IMTYPE_RAWTGA) { if(!BLI_testextensie(string, ".tga")) extension= ".tga"; } - else if(imtype==R_BMP) { + else if(imtype==R_IMF_IMTYPE_BMP) { if(!BLI_testextensie(string, ".bmp")) extension= ".bmp"; } #ifdef WITH_TIFF - else if(imtype==R_TIFF) { + else if(imtype==R_IMF_IMTYPE_TIFF) { if(!BLI_testextensie(string, ".tif") && !BLI_testextensie(string, ".tiff")) extension= ".tif"; } #endif #ifdef WITH_OPENEXR - else if( ELEM(imtype, R_OPENEXR, R_MULTILAYER)) { + else if( ELEM(imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) { if(!BLI_testextensie(string, ".exr")) extension= ".exr"; } #endif #ifdef WITH_CINEON - else if(imtype==R_CINEON){ + else if(imtype==R_IMF_IMTYPE_CINEON){ if (!BLI_testextensie(string, ".cin")) extension= ".cin"; } - else if(imtype==R_DPX){ + else if(imtype==R_IMF_IMTYPE_DPX){ if (!BLI_testextensie(string, ".dpx")) extension= ".dpx"; } #endif - else if(imtype==R_TARGA) { + else if(imtype==R_IMF_IMTYPE_TARGA) { if(!BLI_testextensie(string, ".tga")) extension= ".tga"; } #ifdef WITH_OPENJPEG - else if(imtype==R_JP2) { + else if(imtype==R_IMF_IMTYPE_JP2) { if(!BLI_testextensie(string, ".jp2")) extension= ".jp2"; } #endif - else { // R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc + else { // R_IMF_IMTYPE_AVICODEC, R_IMF_IMTYPE_AVIRAW, R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JPEG90, R_IMF_IMTYPE_QUICKTIME etc if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg"))) extension= ".jpg"; } @@ -1453,31 +1453,31 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf) if(imtype == -1) { /* use whatever existing image type is set by 'ibuf' */ } - else if(imtype== R_IRIS) { + else if(imtype== R_IMF_IMTYPE_IRIS) { ibuf->ftype= IMAGIC; } #ifdef WITH_HDR - else if (imtype==R_RADHDR) { + else if (imtype==R_IMF_IMTYPE_RADHDR) { ibuf->ftype= RADHDR; } #endif - else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { + else if (ELEM5(imtype, R_IMF_IMTYPE_PNG, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_THEORA, R_IMF_IMTYPE_XVID)) { ibuf->ftype= PNG; - if(imtype==R_PNG) + if(imtype==R_IMF_IMTYPE_PNG) ibuf->ftype |= compress; } #ifdef WITH_DDS - else if (imtype==R_DDS) { + else if (imtype==R_IMF_IMTYPE_DDS) { ibuf->ftype= DDS; } #endif - else if (imtype==R_BMP) { + else if (imtype==R_IMF_IMTYPE_BMP) { ibuf->ftype= BMP; } #ifdef WITH_TIFF - else if (imtype==R_TIFF) { + else if (imtype==R_IMF_IMTYPE_TIFF) { ibuf->ftype= TIF; if(imf->depth == R_IMF_CHAN_DEPTH_16) @@ -1485,7 +1485,7 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf) } #endif #ifdef WITH_OPENEXR - else if (imtype==R_OPENEXR || imtype==R_MULTILAYER) { + else if (imtype==R_IMF_IMTYPE_OPENEXR || imtype==R_IMF_IMTYPE_MULTILAYER) { ibuf->ftype= OPENEXR; if(imf->depth == R_IMF_CHAN_DEPTH_16) ibuf->ftype |= OPENEXR_HALF; @@ -1497,21 +1497,21 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf) } #endif #ifdef WITH_CINEON - else if (imtype==R_CINEON) { + else if (imtype==R_IMF_IMTYPE_CINEON) { ibuf->ftype = CINEON; } - else if (imtype==R_DPX) { + else if (imtype==R_IMF_IMTYPE_DPX) { ibuf->ftype = DPX; } #endif - else if (imtype==R_TARGA) { + else if (imtype==R_IMF_IMTYPE_TARGA) { ibuf->ftype= TGA; } - else if(imtype==R_RAWTGA) { + else if(imtype==R_IMF_IMTYPE_RAWTGA) { ibuf->ftype= RAWTGA; } #ifdef WITH_OPENJPEG - else if(imtype==R_JP2) { + else if(imtype==R_IMF_IMTYPE_JP2) { if(quality < 10) quality= 90; ibuf->ftype= JP2|quality; @@ -1533,7 +1533,7 @@ int BKE_write_ibuf(ImBuf *ibuf, const char *name, ImageFormatData *imf) } #endif else { - /* R_JPEG90, etc. default we save jpegs */ + /* R_IMF_IMTYPE_JPEG90, etc. default we save jpegs */ if(quality < 10) quality= 90; ibuf->ftype= JPG|quality; if(ibuf->planes==32) ibuf->planes= 24; /* unsupported feature only confuses other s/w */ diff --git a/source/blender/blenkernel/intern/ocean.c b/source/blender/blenkernel/intern/ocean.c index dbcdf5555ab..b8f96fa732d 100644 --- a/source/blender/blenkernel/intern/ocean.c +++ b/source/blender/blenkernel/intern/ocean.c @@ -1018,7 +1018,7 @@ static void cache_filename(char *string, const char *path, const char *relbase, BLI_join_dirfile(cachepath, sizeof(cachepath), path, fname); - BKE_makepicstring(string, cachepath, relbase, frame, R_OPENEXR, 1, TRUE); + BKE_makepicstring(string, cachepath, relbase, frame, R_IMF_IMTYPE_OPENEXR, 1, TRUE); } void BKE_free_ocean_cache(struct OceanCache *och) @@ -1204,9 +1204,9 @@ 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.imtype= R_IMF_IMTYPE_OPENEXR; imf.depth= R_IMF_CHAN_DEPTH_16; - imf.exr_codec= 2; /* ZIP */ + imf.exr_codec= R_IMF_EXR_CODEC_ZIP; /* ZIP */ diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c index ea0593aba66..b7aa02b2f7b 100644 --- a/source/blender/blenkernel/intern/scene.c +++ b/source/blender/blenkernel/intern/scene.c @@ -349,7 +349,7 @@ Scene *add_scene(const char *name) sce->r.size= 50; sce->r.im_format.planes= R_IMF_PLANES_RGB; - sce->r.im_format.imtype= R_PNG; + sce->r.im_format.imtype= R_IMF_IMTYPE_PNG; sce->r.im_format.quality= 90; sce->r.displaymode= R_OUTPUT_AREA; diff --git a/source/blender/blenkernel/intern/writeavi.c b/source/blender/blenkernel/intern/writeavi.c index c70d2bdf3de..8cd30912840 100644 --- a/source/blender/blenkernel/intern/writeavi.c +++ b/source/blender/blenkernel/intern/writeavi.c @@ -80,14 +80,14 @@ bMovieHandle *BKE_get_movie_handle(const char imtype) /* do the platform specific handles */ #if defined(_WIN32) && !defined(FREE_WINDOWS) - if (imtype == R_AVICODEC) { + if (imtype == R_IMF_IMTYPE_AVICODEC) { //XXX mh.start_movie= start_avi_codec; //XXX mh.append_movie= append_avi_codec; //XXX mh.end_movie= end_avi_codec; } #endif #ifdef WITH_QUICKTIME - if (imtype == R_QUICKTIME) { + if (imtype == R_IMF_IMTYPE_QUICKTIME) { mh.start_movie= start_qt; mh.append_movie= append_qt; mh.end_movie= end_qt; @@ -95,7 +95,7 @@ bMovieHandle *BKE_get_movie_handle(const char imtype) } #endif #ifdef WITH_FFMPEG - if (ELEM4(imtype, R_FFMPEG, R_H264, R_XVID, R_THEORA)) { + if (ELEM4(imtype, R_IMF_IMTYPE_FFMPEG, R_IMF_IMTYPE_H264, R_IMF_IMTYPE_XVID, R_IMF_IMTYPE_THEORA)) { mh.start_movie = start_ffmpeg; mh.append_movie = append_ffmpeg; mh.end_movie = end_ffmpeg; @@ -103,7 +103,7 @@ bMovieHandle *BKE_get_movie_handle(const char imtype) } #endif #ifdef WITH_FRAMESERVER - if (imtype == R_FRAMESERVER) { + if (imtype == R_IMF_IMTYPE_FRAMESERVER) { mh.start_movie = start_frameserver; mh.append_movie = append_frameserver; mh.end_movie = end_frameserver; @@ -162,7 +162,7 @@ static int start_avi(Scene *scene, RenderData *rd, int rectx, int recty, ReportL /* RPW 11-21-2002 if (rd->imtype != AVI_FORMAT_MJPEG) format = AVI_FORMAT_AVI_RGB; */ - if (rd->im_format.imtype != R_AVIJPEG ) format = AVI_FORMAT_AVI_RGB; + if (rd->im_format.imtype != R_IMF_IMTYPE_AVIJPEG ) format = AVI_FORMAT_AVI_RGB; else format = AVI_FORMAT_MJPEG; if (AVI_open_compress (name, avi, 1, format) != AVI_ERROR_NONE) { diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index 3af724b4e30..aa7d71b1577 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -1337,7 +1337,7 @@ void ffmpeg_verify_image_type(RenderData *rd) { int audio= 0; - if(rd->imtype == R_FFMPEG) { + if(rd->imtype == R_IMF_IMTYPE_FFMPEG) { if(rd->ffcodecdata.type <= 0 || rd->ffcodecdata.codec <= 0 || rd->ffcodecdata.audio_codec <= 0 || @@ -1353,19 +1353,19 @@ void ffmpeg_verify_image_type(RenderData *rd) audio= 1; } - else if(rd->imtype == R_H264) { + else if(rd->imtype == R_IMF_IMTYPE_H264) { if(rd->ffcodecdata.codec != CODEC_ID_H264) { ffmpeg_set_preset(rd, FFMPEG_PRESET_H264); audio= 1; } } - else if(rd->imtype == R_XVID) { + else if(rd->imtype == R_IMF_IMTYPE_XVID) { if(rd->ffcodecdata.codec != CODEC_ID_MPEG4) { ffmpeg_set_preset(rd, FFMPEG_PRESET_XVID); audio= 1; } } - else if(rd->imtype == R_THEORA) { + else if(rd->imtype == R_IMF_IMTYPE_THEORA) { if(rd->ffcodecdata.codec != CODEC_ID_THEORA) { ffmpeg_set_preset(rd, FFMPEG_PRESET_THEORA); audio= 1; diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index dcde4ac421b..a6aecac1c34 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7364,10 +7364,10 @@ void do_versions_image_settings_2_60(Scene *sce) imf->depth= R_IMF_CHAN_DEPTH_8; /* openexr */ - imf->exr_codec = rd->quality & 7; /* strange but true! 0-4 are valid values */ + imf->exr_codec = rd->quality & 7; /* strange but true! 0-4 are valid values, OPENEXR_COMPRESS */ switch (imf->imtype) { - case R_OPENEXR: + case R_IMF_IMTYPE_OPENEXR: imf->depth= (rd->subimtype & R_OPENEXR_HALF) ? R_IMF_CHAN_DEPTH_16 : R_IMF_CHAN_DEPTH_32; if (rd->subimtype & R_PREVIEW_JPG) { imf->flag |= R_IMF_FLAG_PREVIEW_JPG; @@ -7376,12 +7376,12 @@ void do_versions_image_settings_2_60(Scene *sce) imf->flag |= R_IMF_FLAG_ZBUF; } break; - case R_TIFF: + case R_IMF_IMTYPE_TIFF: if (rd->subimtype & R_TIFF_16BIT) { imf->depth= R_IMF_CHAN_DEPTH_16; } break; - case R_JP2: + case R_IMF_IMTYPE_JP2: if (rd->subimtype & R_JPEG2K_16BIT) { imf->depth= R_IMF_CHAN_DEPTH_16; } @@ -7399,8 +7399,8 @@ void do_versions_image_settings_2_60(Scene *sce) imf->jp2_flag |= R_IMF_JP2_FLAG_CINE_48; } break; - case R_CINEON: - case R_DPX: + case R_IMF_IMTYPE_CINEON: + case R_IMF_IMTYPE_DPX: if (rd->subimtype & R_CINEON_LOG) { imf->cineon_flag |= R_IMF_CINEON_FLAG_LOG; } diff --git a/source/blender/editors/space_image/image_buttons.c b/source/blender/editors/space_image/image_buttons.c index 892ab9daf25..c1ddad3c012 100644 --- a/source/blender/editors/space_image/image_buttons.c +++ b/source/blender/editors/space_image/image_buttons.c @@ -859,21 +859,21 @@ void uiTemplateImageSettings(uiLayout *layout, PointerRNA *imfptr) uiItemR(col, imfptr, "use_zbuffer", 0, NULL, ICON_NONE); } - if (ELEM(imf->imtype, R_OPENEXR, R_MULTILAYER)) { + if (ELEM(imf->imtype, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER)) { uiItemR(col, imfptr, "exr_codec", 0, NULL, ICON_NONE); - if (is_render_out && (imf->imtype == R_OPENEXR)) { + if (is_render_out && (imf->imtype == R_IMF_IMTYPE_OPENEXR)) { uiItemR(col, imfptr, "use_preview", 0, NULL, ICON_NONE); } } - if (imf->imtype == R_JP2) { + if (imf->imtype == R_IMF_IMTYPE_JP2) { uiItemR(col, imfptr, "use_jpeg2k_ycc", 0, NULL, ICON_NONE); uiItemR(col, imfptr, "use_jpeg2k_cinema_preset", 0, NULL, ICON_NONE); uiItemR(col, imfptr, "use_jpeg2k_cinema_48", 0, NULL, ICON_NONE); } - if (imf->imtype == R_CINEON) { + if (imf->imtype == R_IMF_IMTYPE_CINEON) { #if 1 uiItemL(col, "FIXME: hard coded Non-Linear, Gamma:1.0", ICON_NONE); #else diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index 6d9fd661125..bff2d82e041 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -918,7 +918,7 @@ static void save_image_options_defaults(SaveImageOptions *simopts) { memset(&simopts->im_format, 0, sizeof(simopts->im_format)); simopts->im_format.planes= R_IMF_PLANES_RGB; - simopts->im_format.imtype= R_PNG; + simopts->im_format.imtype= R_IMF_IMTYPE_PNG; simopts->im_format.quality= 90; simopts->im_format.compress= 90; simopts->filepath[0]= '\0'; @@ -962,7 +962,7 @@ static int save_image_options_init(SaveImageOptions *simopts, SpaceImage *sima, is_depth_set= TRUE; } else if (ima->source == IMA_SRC_GENERATED) { - simopts->im_format.imtype= R_PNG; + simopts->im_format.imtype= R_IMF_IMTYPE_PNG; } else { simopts->im_format.imtype= BKE_ftype_to_imtype(ibuf->ftype); @@ -1062,7 +1062,7 @@ static void save_image_doit(bContext *C, SpaceImage *sima, wmOperator *op, SaveI } } - if(simopts->im_format.imtype==R_MULTILAYER) { + if(simopts->im_format.imtype==R_IMF_IMTYPE_MULTILAYER) { Scene *scene= CTX_data_scene(C); RenderResult *rr= BKE_image_acquire_renderresult(scene, ima); if(rr) { diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 15e7c82d60f..42cd45034fe 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -212,7 +212,7 @@ typedef struct SceneRenderLayer { /* generic image format settings, * no video codec info however */ typedef struct ImageFormatData { - char imtype; /* R_PNG, R_... */ + char imtype; /* R_IMF_IMTYPE_PNG, R_... */ /* note, video types should only ever be set from this * structure when used from RenderData */ char depth; /* bits per channel, R_IMF_CHAN_DEPTH_8 -> 32, @@ -242,18 +242,40 @@ typedef struct ImageFormatData { } ImageFormatData; + +/* ImageFormatData.imtype */ +#define R_IMF_IMTYPE_TARGA 0 +#define R_IMF_IMTYPE_IRIS 1 +/* #define R_HAMX 2 */ /* hamx is nomore */ +/* #define R_FTYPE 3 */ /* ftype is nomore */ +#define R_IMF_IMTYPE_JPEG90 4 +/* #define R_MOVIE 5 */ /* movie is nomore */ +#define R_IMF_IMTYPE_IRIZ 7 +#define R_IMF_IMTYPE_RAWTGA 14 +#define R_IMF_IMTYPE_AVIRAW 15 +#define R_IMF_IMTYPE_AVIJPEG 16 +#define R_IMF_IMTYPE_PNG 17 +#define R_IMF_IMTYPE_AVICODEC 18 +#define R_IMF_IMTYPE_QUICKTIME 19 +#define R_IMF_IMTYPE_BMP 20 +#define R_IMF_IMTYPE_RADHDR 21 +#define R_IMF_IMTYPE_TIFF 22 +#define R_IMF_IMTYPE_OPENEXR 23 +#define R_IMF_IMTYPE_FFMPEG 24 +#define R_IMF_IMTYPE_FRAMESERVER 25 +#define R_IMF_IMTYPE_CINEON 26 +#define R_IMF_IMTYPE_DPX 27 +#define R_IMF_IMTYPE_MULTILAYER 28 +#define R_IMF_IMTYPE_DDS 29 +#define R_IMF_IMTYPE_JP2 30 +#define R_IMF_IMTYPE_H264 31 +#define R_IMF_IMTYPE_XVID 32 +#define R_IMF_IMTYPE_THEORA 33 + /* ImageFormatData.flag */ #define R_IMF_FLAG_ZBUF (1<<0) /* was R_OPENEXR_ZBUF */ #define R_IMF_FLAG_PREVIEW_JPG (1<<1) /* was R_PREVIEW_JPG */ -/* ImageFormatData.jp2_flag */ -#define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */ -#define R_IMF_JP2_FLAG_CINE_PRESET (1<<1) /* was R_JPEG2K_CINE_PRESET */ -#define R_IMF_JP2_FLAG_CINE_48 (1<<2) /* was R_JPEG2K_CINE_48FPS */ - -/* ImageFormatData.cineon_flag */ -#define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */ - /* return values from BKE_imtype_valid_depths, note this is depts per channel */ #define R_IMF_CHAN_DEPTH_1 (1<<0) /* 1bits (unused) */ #define R_IMF_CHAN_DEPTH_8 (1<<1) /* 8bits (default) */ @@ -267,6 +289,21 @@ typedef struct ImageFormatData { #define R_IMF_PLANES_RGBA 32 #define R_IMF_PLANES_BW 8 +/* ImageFormatData.exr_codec */ +#define R_IMF_EXR_CODEC_NONE 0 +#define R_IMF_EXR_CODEC_PXR24 1 +#define R_IMF_EXR_CODEC_ZIP 2 +#define R_IMF_EXR_CODEC_PIZ 3 +#define R_IMF_EXR_CODEC_RLE 4 + +/* ImageFormatData.jp2_flag */ +#define R_IMF_JP2_FLAG_YCC (1<<0) /* when disabled use RGB */ /* was R_JPEG2K_YCC */ +#define R_IMF_JP2_FLAG_CINE_PRESET (1<<1) /* was R_JPEG2K_CINE_PRESET */ +#define R_IMF_JP2_FLAG_CINE_48 (1<<2) /* was R_JPEG2K_CINE_48FPS */ + +/* ImageFormatData.cineon_flag */ +#define R_IMF_CINEON_FLAG_LOG (1<<0) /* was R_CINEON_LOG */ + typedef struct RenderData { struct ImageFormatData im_format; @@ -1051,35 +1088,6 @@ typedef struct Scene { /* color_mgt_flag */ #define R_COLOR_MANAGEMENT 1 -/* imtype */ -#define R_TARGA 0 -#define R_IRIS 1 -/* #define R_HAMX 2 */ /* hamx is nomore */ -/* #define R_FTYPE 3 */ /* ftype is nomore */ -#define R_JPEG90 4 -/*#define R_MOVIE 5*/ /* movie is nomore */ -#define R_IRIZ 7 -#define R_RAWTGA 14 -#define R_AVIRAW 15 -#define R_AVIJPEG 16 -#define R_PNG 17 -#define R_AVICODEC 18 -#define R_QUICKTIME 19 -#define R_BMP 20 -#define R_RADHDR 21 -#define R_TIFF 22 -#define R_OPENEXR 23 -#define R_FFMPEG 24 -#define R_FRAMESERVER 25 -#define R_CINEON 26 -#define R_DPX 27 -#define R_MULTILAYER 28 -#define R_DDS 29 -#define R_JP2 30 -#define R_H264 31 -#define R_XVID 32 -#define R_THEORA 33 - /* subimtype, flag options for imtype */ #define R_OPENEXR_HALF 1 /*deprecated*/ #define R_OPENEXR_ZBUF 2 /*deprecated*/ diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 4b3ef62e06e..8f03bb9b55c 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -113,32 +113,32 @@ EnumPropertyItem image_only_type_items[] = { /* --- duplicate block warning (see below) --- */ #define IMAGE_TYPE_ITEMS_IMAGE_ONLY - {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"}, + {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"}, #ifdef WITH_DDS - {R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"}, + {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"}, #endif - {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"}, - {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"}, - {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"}, + {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"}, + {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"}, + {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"}, #ifdef WITH_OPENJPEG - {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"}, + {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"}, #endif - {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"}, - {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"}, + {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"}, + {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"}, {0, "", 0, " ", NULL}, #ifdef WITH_CINEON - {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"}, - {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"}, + {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"}, + {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"}, #endif #ifdef WITH_OPENEXR - {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"}, - {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"}, + {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"}, + {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"}, #endif #ifdef WITH_HDR - {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"}, + {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"}, #endif #ifdef WITH_TIFF - {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"}, + {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"}, #endif /* --- end duplicate block (see below) --- */ @@ -151,59 +151,59 @@ EnumPropertyItem image_type_items[] = { /* --- duplicate block warning (see above) --- */ #define IMAGE_TYPE_ITEMS_IMAGE_ONLY - {R_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"}, + {R_IMF_IMTYPE_BMP, "BMP", ICON_FILE_IMAGE, "BMP", "Output image in bitmap format"}, #ifdef WITH_DDS - {R_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"}, + {R_IMF_IMTYPE_DDS, "DDS", ICON_FILE_IMAGE, "DDS", "Output image in DDS format"}, #endif - {R_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"}, - {R_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"}, - {R_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"}, + {R_IMF_IMTYPE_IRIS, "IRIS", ICON_FILE_IMAGE, "Iris", "Output image in (old!) SGI IRIS format"}, + {R_IMF_IMTYPE_PNG, "PNG", ICON_FILE_IMAGE, "PNG", "Output image in PNG format"}, + {R_IMF_IMTYPE_JPEG90, "JPEG", ICON_FILE_IMAGE, "JPEG", "Output image in JPEG format"}, #ifdef WITH_OPENJPEG - {R_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"}, + {R_IMF_IMTYPE_JP2, "JPEG2000", ICON_FILE_IMAGE, "JPEG 2000", "Output image in JPEG 2000 format"}, #endif - {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"}, - {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"}, + {R_IMF_IMTYPE_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", "Output image in Targa format"}, + {R_IMF_IMTYPE_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", "Output image in uncompressed Targa format"}, {0, "", 0, " ", NULL}, #ifdef WITH_CINEON - {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"}, - {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"}, + {R_IMF_IMTYPE_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", "Output image in Cineon format"}, + {R_IMF_IMTYPE_DPX, "DPX",ICON_FILE_IMAGE, "DPX", "Output image in DPX format"}, #endif #ifdef WITH_OPENEXR - {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"}, - {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"}, + {R_IMF_IMTYPE_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", "Output image in multilayer OpenEXR format"}, + {R_IMF_IMTYPE_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", "Output image in OpenEXR format"}, #endif #ifdef WITH_HDR - {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"}, + {R_IMF_IMTYPE_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", "Output image in Radiance HDR format"}, #endif #ifdef WITH_TIFF - {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"}, + {R_IMF_IMTYPE_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", "Output image in TIFF format"}, #endif /* --- end duplicate block (see above) --- */ {0, "", 0, "Movie", NULL}, #ifdef _WIN32 - {R_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu + {R_IMF_IMTYPE_AVICODEC, "AVICODEC", ICON_FILE_MOVIE, "AVI Codec", "Output video in AVI format"}, // XXX Missing codec menu #endif - {R_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"}, - {R_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"}, + {R_IMF_IMTYPE_AVIJPEG, "AVI_JPEG", ICON_FILE_MOVIE, "AVI JPEG", "Output video in AVI JPEG format"}, + {R_IMF_IMTYPE_AVIRAW, "AVI_RAW", ICON_FILE_MOVIE, "AVI Raw", "Output video in AVI Raw format"}, #ifdef WITH_FRAMESERVER - {R_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"}, + {R_IMF_IMTYPE_FRAMESERVER, "FRAMESERVER", ICON_FILE_SCRIPT, "Frame Server", "Output image to a frameserver"}, #endif #ifdef WITH_FFMPEG - {R_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"}, - {R_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"}, - {R_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"}, + {R_IMF_IMTYPE_H264, "H264", ICON_FILE_MOVIE, "H.264", "Output video in H.264 format"}, + {R_IMF_IMTYPE_FFMPEG, "FFMPEG", ICON_FILE_MOVIE, "MPEG", "Output video in MPEG format"}, + {R_IMF_IMTYPE_THEORA, "THEORA", ICON_FILE_MOVIE, "Ogg Theora", "Output video in Ogg format"}, #endif #ifdef WITH_QUICKTIME # ifdef USE_QTKIT - {R_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, + {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_QTKIT", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, # else - {R_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, + {R_IMF_IMTYPE_QUICKTIME, "QUICKTIME_CARBON", ICON_FILE_MOVIE, "QuickTime", "Output video in Quicktime format"}, # endif #endif #ifdef WITH_FFMPEG - {R_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"}, + {R_IMF_IMTYPE_XVID, "XVID", ICON_FILE_MOVIE, "Xvid", "Output video in Xvid format"}, #endif {0, NULL, 0, NULL, NULL}}; @@ -694,7 +694,7 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_depth_itemf(bContext *C, } else { const int depth_ok= BKE_imtype_valid_depths(imf->imtype); - const int is_float= ELEM3(imf->imtype, R_RADHDR, R_OPENEXR, R_MULTILAYER); + const int is_float= ELEM3(imf->imtype, R_IMF_IMTYPE_RADHDR, R_IMF_IMTYPE_OPENEXR, R_IMF_IMTYPE_MULTILAYER); EnumPropertyItem *item_8bit= &image_color_depth_items[0]; EnumPropertyItem *item_12bit= &image_color_depth_items[1]; @@ -2396,11 +2396,11 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) { #ifdef WITH_OPENEXR static EnumPropertyItem exr_codec_items[] = { - {0, "NONE", 0, "None", ""}, - {1, "PXR24", 0, "Pxr24 (lossy)", ""}, - {2, "ZIP", 0, "ZIP (lossless)", ""}, - {3, "PIZ", 0, "PIZ (lossless)", ""}, - {4, "RLE", 0, "RLE (lossless)", ""}, + {R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""}, + {R_IMF_EXR_CODEC_PXR24, "PXR24", 0, "Pxr24 (lossy)", ""}, + {R_IMF_EXR_CODEC_ZIP, "ZIP", 0, "ZIP (lossless)", ""}, + {R_IMF_EXR_CODEC_PIZ, "PIZ", 0, "PIZ (lossless)", ""}, + {R_IMF_EXR_CODEC_RLE, "RLE", 0, "RLE (lossless)", ""}, {0, NULL, 0, NULL, NULL}}; #endif diff --git a/source/blender/nodes/composite/nodes/node_composite_outputFile.c b/source/blender/nodes/composite/nodes/node_composite_outputFile.c index 7bdcad61625..50a196deb07 100644 --- a/source/blender/nodes/composite/nodes/node_composite_outputFile.c +++ b/source/blender/nodes/composite/nodes/node_composite_outputFile.c @@ -102,7 +102,7 @@ static void node_composit_init_output_file(bNodeTree *UNUSED(ntree), bNode* node BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name)); nif->im_format= scene->r.im_format; if (BKE_imtype_is_movie(nif->im_format.imtype)) { - nif->im_format.imtype= R_OPENEXR; + nif->im_format.imtype= R_IMF_IMTYPE_OPENEXR; } nif->sfra= scene->r.sfra; nif->efra= scene->r.efra; diff --git a/source/blender/quicktime/apple/qtkit_export.m b/source/blender/quicktime/apple/qtkit_export.m index e0a87b33b5f..b26781d8026 100644 --- a/source/blender/quicktime/apple/qtkit_export.m +++ b/source/blender/quicktime/apple/qtkit_export.m @@ -779,7 +779,7 @@ void free_qtcomponentdata(void) { void quicktime_verify_image_type(RenderData *rd) { - if (rd->imtype == R_QUICKTIME) { + if (rd->imtype == R_IMF_IMTYPE_QUICKTIME) { if ((rd->qtcodecsettings.codecType<= 0) || (rd->qtcodecsettings.codecSpatialQuality <0) || (rd->qtcodecsettings.codecSpatialQuality > 100)) { diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index 5c0460d4e74..ffda20ead7f 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -689,7 +689,7 @@ static void check_renderbutton_framerate(RenderData *rd, ReportList *reports) void quicktime_verify_image_type(RenderData *rd) { - if (rd->imtype == R_QUICKTIME) { + if (rd->imtype == R_IMF_IMTYPE_QUICKTIME) { if ((rd->qtcodecsettings.codecType== 0) || (rd->qtcodecsettings.codecSpatialQuality <0) || (rd->qtcodecsettings.codecSpatialQuality > 100)) { diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c index befe48fd57f..c5cea980b04 100644 --- a/source/blender/render/intern/source/pipeline.c +++ b/source/blender/render/intern/source/pipeline.c @@ -3008,7 +3008,7 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie else BKE_makepicstring(name, scene->r.pic, bmain->name, scene->r.cfra, scene->r.im_format.imtype, scene->r.scemode & R_EXTENSION, TRUE); - if(re->r.im_format.imtype==R_MULTILAYER) { + if(re->r.im_format.imtype==R_IMF_IMTYPE_MULTILAYER) { if(re->result) { RE_WriteRenderResult(re->reports, re->result, name, scene->r.im_format.compress); printf("Saved: %s", name); @@ -3054,13 +3054,13 @@ static int do_write_image_or_movie(Render *re, Main *bmain, Scene *scene, bMovie else printf("Saved: %s", name); /* optional preview images for exr */ - if(ok && scene->r.im_format.imtype==R_OPENEXR && (scene->r.im_format.flag & R_IMF_FLAG_PREVIEW_JPG)) { + if(ok && scene->r.im_format.imtype==R_IMF_IMTYPE_OPENEXR && (scene->r.im_format.flag & R_IMF_FLAG_PREVIEW_JPG)) { ImageFormatData imf= scene->r.im_format; - imf.imtype= R_JPEG90; + imf.imtype= R_IMF_IMTYPE_JPEG90; if(BLI_testextensie(name, ".exr")) name[strlen(name)-4]= 0; - BKE_add_image_extension(name, R_JPEG90); + BKE_add_image_extension(name, R_IMF_IMTYPE_JPEG90); ibuf->planes= 24; BKE_write_ibuf_stamp(scene, camera, ibuf, name, &imf); printf("\nSaved: %s", name); -- cgit v1.2.3