Cleanup: IMB prefix for ImBuf defines
authorCampbell Barton <ideasman42@gmail.com>
Mon, 13 Jul 2015 12:00:07 +0000 (22:00 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 13 Jul 2015 12:00:07 +0000 (22:00 +1000)
source/blender/blenkernel/intern/image.c
source/blender/editors/sculpt_paint/paint_image.c
source/blender/imbuf/IMB_imbuf_types.h
source/blender/imbuf/intern/allocimbuf.c
source/blender/imbuf/intern/filter.c
source/blender/imbuf/intern/readimage.c
source/blender/render/intern/source/imagetexture.c

index a906a6d37ded2e837690299803b5a188e9ea8ced..ef760f2da26b504b14ae2268952cf03895b9dcc7 100644 (file)
@@ -1099,7 +1099,7 @@ static uintptr_t image_mem_size(Image *image)
                                size += MEM_allocN_len(ibuf->rect_float);
                        }
 
-                       for (level = 0; level < IB_MIPMAP_LEVELS; level++) {
+                       for (level = 0; level < IMB_MIPMAP_LEVELS; level++) {
                                ibufm = ibuf->mipmap[level];
                                if (ibufm) {
                                        if (ibufm->rect) {
index 346be5b336e780f32e531767c6925ea0f53f8b25..64e0aa822dfd82c0d460e9168e08deb6d867b5ba 100644 (file)
@@ -92,7 +92,7 @@ typedef struct UndoImageTile {
        struct UndoImageTile *next, *prev;
 
        char idname[MAX_ID_NAME];  /* name instead of pointer*/
-       char ibufname[IB_FILENAME_SIZE];
+       char ibufname[IMB_FILENAME_SIZE];
 
        union {
                float        *fp;
index 4af63131740725805cb4e9484aed35840acf3d3e..08ce9c0469bf8b77d7f9aed090c67357b7f7655e 100644 (file)
@@ -47,8 +47,8 @@
  * contains an Amiga-format file).
  */
 
-#define IB_MIPMAP_LEVELS       20
-#define IB_FILENAME_SIZE       1024
+#define IMB_MIPMAP_LEVELS      20
+#define IMB_FILENAME_SIZE      1024
 
 typedef struct DDSData {
        unsigned int fourcc; /* DDS fourcc info */
@@ -177,7 +177,7 @@ typedef struct ImBuf {
        float dither;                           /* random dither value, for conversion from float -> byte rect */
 
        /* mipmapping */
-       struct ImBuf *mipmap[IB_MIPMAP_LEVELS]; /* MipMap levels, a series of halved images */
+       struct ImBuf *mipmap[IMB_MIPMAP_LEVELS]; /* MipMap levels, a series of halved images */
        int miptot, miplevel;
 
        /* externally used data */
@@ -189,8 +189,8 @@ typedef struct ImBuf {
        /* file information */
        enum eImbTypes  ftype;                          /* file type we are going to save as */
        ImbFormatOptions foptions;                      /* file format specific flags */
-       char name[IB_FILENAME_SIZE];            /* filename associated with this image */
-       char cachename[IB_FILENAME_SIZE];       /* full filename used for reading from cache */
+       char name[IMB_FILENAME_SIZE];           /* filename associated with this image */
+       char cachename[IMB_FILENAME_SIZE];      /* full filename used for reading from cache */
 
        /* memory cache limiter */
        struct MEM_CacheLimiterHandle_s *c_handle; /* handle for cache limiter */
index 03fc2c0fa5df56537e83532e713cc7c46a73f506..9042c4bd09ca7dbdd25745da9ab8549704eecb13 100644 (file)
@@ -492,7 +492,7 @@ ImBuf *IMB_dupImBuf(ImBuf *ibuf1)
        tbuf.encodedbuffer = ibuf2->encodedbuffer;
        tbuf.zbuf          = NULL;
        tbuf.zbuf_float    = NULL;
-       for (a = 0; a < IB_MIPMAP_LEVELS; a++)
+       for (a = 0; a < IMB_MIPMAP_LEVELS; a++)
                tbuf.mipmap[a] = NULL;
        tbuf.dds_data.data = NULL;
        
index 7adb2c7cc1dcade4b52d1ba9f07e236f85cd35bd..ef445239491bd84e97e414ecce6d1f5f0064d6a5 100644 (file)
@@ -472,7 +472,7 @@ void IMB_remakemipmap(ImBuf *ibuf, int use_filter)
        
        ibuf->miptot = 1;
        
-       while (curmap < IB_MIPMAP_LEVELS) {
+       while (curmap < IMB_MIPMAP_LEVELS) {
                
                if (ibuf->mipmap[curmap]) {
                        
@@ -512,7 +512,7 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter)
        
        ibuf->miptot = 1;
 
-       while (curmap < IB_MIPMAP_LEVELS) {
+       while (curmap < IMB_MIPMAP_LEVELS) {
                if (use_filter) {
                        ImBuf *nbuf = IMB_allocImBuf(hbuf->x, hbuf->y, 32, IB_rect);
                        IMB_filterN(nbuf, hbuf);
index 38d54e64035109d649c159d5a6f960387a69f1bb..1c83b33e29667cd099ea81249549c7ace31b51d0 100644 (file)
@@ -192,22 +192,22 @@ static void imb_cache_filename(char *filename, const char *name, int flags)
 {
        /* read .tx instead if it exists and is not older */
        if (flags & IB_tilecache) {
-               BLI_strncpy(filename, name, IB_FILENAME_SIZE);
-               if (!BLI_replace_extension(filename, IB_FILENAME_SIZE, ".tx"))
+               BLI_strncpy(filename, name, IMB_FILENAME_SIZE);
+               if (!BLI_replace_extension(filename, IMB_FILENAME_SIZE, ".tx"))
                        return;
 
                if (BLI_file_older(name, filename))
                        return;
        }
 
-       BLI_strncpy(filename, name, IB_FILENAME_SIZE);
+       BLI_strncpy(filename, name, IMB_FILENAME_SIZE);
 }
 
 ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
 {
        ImBuf *ibuf;
        int file, a;
-       char filepath_tx[IB_FILENAME_SIZE];
+       char filepath_tx[IMB_FILENAME_SIZE];
 
        BLI_assert(!BLI_path_is_rel(filepath));
 
@@ -236,7 +236,7 @@ ImBuf *IMB_testiffname(const char *filepath, int flags)
 {
        ImBuf *ibuf;
        int file;
-       char filepath_tx[IB_FILENAME_SIZE];
+       char filepath_tx[IMB_FILENAME_SIZE];
        char colorspace[IM_MAX_SPACE] = "\0";
 
        BLI_assert(!BLI_path_is_rel(filepath));
index 687e25a9410c8ceece0137956f5be17d18748cd6..b44c01354206e5d6d9ae8e7046644711760879b0 100644 (file)
@@ -1145,7 +1145,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
                ImBuf *previbuf, *curibuf;
                float levf;
                int maxlev;
-               ImBuf *mipmaps[IB_MIPMAP_LEVELS + 1];
+               ImBuf *mipmaps[IMB_MIPMAP_LEVELS + 1];
 
                /* modify ellipse minor axis if too eccentric, use for area sampling as well
                 * scaling dxt/dyt as done in pbrt is not the same
@@ -1185,7 +1185,7 @@ static int imagewraposa_aniso(Tex *tex, Image *ima, ImBuf *ibuf, const float tex
                curmap = 0;
                maxlev = 1;
                mipmaps[0] = ibuf;
-               while (curmap < IB_MIPMAP_LEVELS) {
+               while (curmap < IMB_MIPMAP_LEVELS) {
                        mipmaps[curmap + 1] = ibuf->mipmap[curmap];
                        if (ibuf->mipmap[curmap]) maxlev++;
                        curmap++;
@@ -1585,7 +1585,7 @@ int imagewraposa(Tex *tex, Image *ima, ImBuf *ibuf, const float texvec[3], const
                
                curmap= 0;
                previbuf= curibuf= ibuf;
-               while (curmap<IB_MIPMAP_LEVELS && ibuf->mipmap[curmap]) {
+               while (curmap < IMB_MIPMAP_LEVELS && ibuf->mipmap[curmap]) {
                        if (maxd < pixsize) break;
                        previbuf= curibuf;
                        curibuf= ibuf->mipmap[curmap];