Revision: 42050
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42050
Author:   campbellbarton
Date:     2011-11-22 00:35:26 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
rename image type defines to be less ambiguous, also set BMP as not supporting 
alpha (it reads but cant write)

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c
    trunk/blender/source/blender/blenkernel/intern/image.c
    trunk/blender/source/blender/blenkernel/intern/ocean.c
    trunk/blender/source/blender/blenkernel/intern/scene.c
    trunk/blender/source/blender/blenkernel/intern/writeavi.c
    trunk/blender/source/blender/blenkernel/intern/writeffmpeg.c
    trunk/blender/source/blender/blenloader/intern/readfile.c
    trunk/blender/source/blender/editors/space_image/image_buttons.c
    trunk/blender/source/blender/editors/space_image/image_ops.c
    trunk/blender/source/blender/makesdna/DNA_scene_types.h
    trunk/blender/source/blender/makesrna/intern/rna_scene.c
    
trunk/blender/source/blender/nodes/composite/nodes/node_composite_outputFile.c
    trunk/blender/source/blender/quicktime/apple/qtkit_export.m
    trunk/blender/source/blender/quicktime/apple/quicktime_export.c
    trunk/blender/source/blender/render/intern/source/pipeline.c
    trunk/blender/source/creator/creator.c
    trunk/blender/source/gameengine/BlenderRoutines/KX_BlenderGL.cpp

Modified: trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c       
2011-11-22 00:35:22 UTC (rev 42049)
+++ trunk/blender/source/blender/blenkernel/intern/dynamicpaint.c       
2011-11-22 00:35:26 UTC (rev 42050)
@@ -2527,13 +2527,13 @@
        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 @@
        /* 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

Modified: trunk/blender/source/blender/blenkernel/intern/image.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/image.c      2011-11-22 
00:35:22 UTC (rev 42049)
+++ trunk/blender/source/blender/blenkernel/intern/image.c      2011-11-22 
00:35:26 UTC (rev 42050)
@@ -802,38 +802,38 @@
 
 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 @@
 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_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_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_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_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 @@
 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 @@
 {
        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 @@
        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 @@
        }
 #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;

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to