BLI_bitmap: rename macros
authorCampbell Barton <ideasman42@gmail.com>
Fri, 6 Jun 2014 06:05:15 +0000 (16:05 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 13 Jun 2014 14:47:12 +0000 (00:47 +1000)
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET

22 files changed:
source/blender/blenkernel/BKE_pbvh.h
source/blender/blenkernel/intern/crazyspace.c
source/blender/blenkernel/intern/editderivedmesh.c
source/blender/blenkernel/intern/lattice.c
source/blender/blenkernel/intern/mesh_evaluate.c
source/blender/blenkernel/intern/multires.c
source/blender/blenkernel/intern/paint.c
source/blender/blenkernel/intern/pbvh.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/BLI_bitmap.h
source/blender/editors/curve/editcurve.c
source/blender/editors/mesh/editface.c
source/blender/editors/mesh/editmesh_select.c
source/blender/editors/object/object_lattice.c
source/blender/editors/object/object_modifier.c
source/blender/editors/sculpt_paint/paint_hide.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/sculpt_paint/sculpt_undo.c
source/blender/editors/space_view3d/drawmesh.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_draw.c
source/blender/modifiers/intern/MOD_solidify.c

index d7622260416b3579c3bb42d8f92c022e657c1c31..53e41c1dec854e04aa8b98aaa0b194815ed6a9be 100644 (file)
@@ -294,7 +294,7 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node,
                                        vi.mask = vi.key->has_mask ? CCG_elem_mask(vi.key, vi.grid) : NULL; \
                                        vi.grid = CCG_elem_next(vi.key, vi.grid); \
                                        if (vi.gh) { \
-                                               if (BLI_BITMAP_GET(vi.gh, vi.gy * vi.gridsize + vi.gx)) \
+                                               if (BLI_BITMAP_TEST(vi.gh, vi.gy * vi.gridsize + vi.gx)) \
                                                        continue; \
                                        } \
                                } \
index 3fde1cdd710a364c1691a0f93c92014425db5f4f..7ca5d6b4f28e17867588d3ee1408556223257622 100644 (file)
@@ -93,12 +93,12 @@ static void make_vertexcos__mapFunc(void *userData, int index, const float co[3]
 {
        MappedUserData *mappedData = (MappedUserData *)userData;
 
-       if (BLI_BITMAP_GET(mappedData->vertex_visit, index) == 0) {
+       if (BLI_BITMAP_TEST(mappedData->vertex_visit, index) == 0) {
                /* we need coord from prototype vertex, not from copies,
                 * assume they stored in the beginning of vertex array stored in DM
                 * (mirror modifier for eg does this) */
                copy_v3_v3(mappedData->vertexcos[index], co);
-               BLI_BITMAP_SET(mappedData->vertex_visit, index);
+               BLI_BITMAP_ENABLE(mappedData->vertex_visit, index);
        }
 }
 
index 99e7282fb79c4ddc3011c0f8fd98c591239ce9e8..3a11b3431aefd284a8482024df4ce0292b0d6311 100644 (file)
@@ -2283,8 +2283,8 @@ static void cage_mapped_verts_callback(void *userData, int index, const float co
 {
        struct CageUserData *data = userData;
 
-       if ((index >= 0 && index < data->totvert) && (!BLI_BITMAP_GET(data->visit_bitmap, index))) {
-               BLI_BITMAP_SET(data->visit_bitmap, index);
+       if ((index >= 0 && index < data->totvert) && (!BLI_BITMAP_TEST(data->visit_bitmap, index))) {
+               BLI_BITMAP_ENABLE(data->visit_bitmap, index);
                copy_v3_v3(data->cos_cage[index], co);
        }
 }
index 51fbb86b38ea434e3892135dcee022df2a3c93a4..7b91945c23c157b0a3750b5cd5df954ae5f8ca46 100644 (file)
@@ -120,11 +120,11 @@ void BKE_lattice_bitmap_from_flag(Lattice *lt, BLI_bitmap *bitmap, const short f
        bp = lt->def;
        for (i = 0; i < tot; i++, bp++) {
                if ((bp->f1 & flag) && (!respecthide || !bp->hide)) {
-                       BLI_BITMAP_SET(bitmap, i);
+                       BLI_BITMAP_ENABLE(bitmap, i);
                }
                else {
                        if (clear) {
-                               BLI_BITMAP_CLEAR(bitmap, i);
+                               BLI_BITMAP_DISABLE(bitmap, i);
                        }
                }
        }
index b090e770e5e70fe8e5ac983629f36fc2e7f71a0f..018cf85f9c60c42a34a4cad62cb8cb9d118ad194 100644 (file)
@@ -1021,7 +1021,7 @@ void BKE_mesh_poly_edgebitmap_insert(unsigned int *edge_bitmap, const MPoly *mp,
        ml = mloop;
 
        while (i-- != 0) {
-               BLI_BITMAP_SET(edge_bitmap, ml->e);
+               BLI_BITMAP_ENABLE(edge_bitmap, ml->e);
                ml++;
        }
 }
index 165b4b1e6e79da31b0fe126f4fef4a8ca3881124..1d5bbbe1aeb5ce2f106fceb05c6fbabbef60c060 100644 (file)
@@ -134,7 +134,7 @@ static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
        /* low-res blocks */
        for (yl = 0; yl < lo_gridsize; yl++) {
                for (xl = 0; xl < lo_gridsize; xl++) {
-                       int lo_val = BLI_BITMAP_GET(lo_hidden, yl * lo_gridsize + xl);
+                       int lo_val = BLI_BITMAP_TEST(lo_hidden, yl * lo_gridsize + xl);
 
                        /* high-res blocks */
                        for (yo = -offset; yo <= offset; yo++) {
@@ -154,14 +154,14 @@ static BLI_bitmap *multires_mdisps_upsample_hidden(BLI_bitmap *lo_hidden,
                                                 * subd, except when the equivalent element in
                                                 * lo_hidden is different */
                                                if (lo_val != prev_hidden[hi_ndx]) {
-                                                       BLI_BITMAP_MODIFY(subd, hi_ndx, lo_val);
+                                                       BLI_BITMAP_SET(subd, hi_ndx, lo_val);
                                                }
                                                else {
-                                                       BLI_BITMAP_MODIFY(subd, hi_ndx, prev_hidden[hi_ndx]);
+                                                       BLI_BITMAP_SET(subd, hi_ndx, prev_hidden[hi_ndx]);
                                                }
                                        }
                                        else {
-                                               BLI_BITMAP_MODIFY(subd, hi_ndx, lo_val);
+                                               BLI_BITMAP_SET(subd, hi_ndx, lo_val);
                                        }
                                }
                        }
@@ -189,10 +189,10 @@ static BLI_bitmap *multires_mdisps_downsample_hidden(BLI_bitmap *old_hidden,
 
        for (y = 0; y < new_gridsize; y++) {
                for (x = 0; x < new_gridsize; x++) {
-                       old_value = BLI_BITMAP_GET(old_hidden,
+                       old_value = BLI_BITMAP_TEST(old_hidden,
                                                   factor * y * old_gridsize + x * factor);
                        
-                       BLI_BITMAP_MODIFY(new_hidden, y * new_gridsize + x, old_value);
+                       BLI_BITMAP_SET(new_hidden, y * new_gridsize + x, old_value);
                }
        }
 
@@ -274,7 +274,7 @@ static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level)
                        md->hidden = BLI_BITMAP_NEW(gridarea, "MDisps.hidden initialize");
 
                        for (k = 0; k < gridarea; k++)
-                               BLI_BITMAP_SET(md->hidden, k);
+                               BLI_BITMAP_ENABLE(md->hidden, k);
                }
        }
 
index 24616d8885201053296b63795ba2ffe035e58acc..9a144b5461a48eaea382cd62c5baf544bdf77476 100644 (file)
@@ -347,10 +347,10 @@ bool paint_is_grid_face_hidden(const unsigned int *grid_hidden,
                               int gridsize, int x, int y)
 {
        /* skip face if any of its corners are hidden */
-       return (BLI_BITMAP_GET(grid_hidden, y * gridsize + x) ||
-               BLI_BITMAP_GET(grid_hidden, y * gridsize + x + 1) ||
-               BLI_BITMAP_GET(grid_hidden, (y + 1) * gridsize + x + 1) ||
-               BLI_BITMAP_GET(grid_hidden, (y + 1) * gridsize + x));
+       return (BLI_BITMAP_TEST(grid_hidden, y * gridsize + x) ||
+               BLI_BITMAP_TEST(grid_hidden, y * gridsize + x + 1) ||
+               BLI_BITMAP_TEST(grid_hidden, (y + 1) * gridsize + x + 1) ||
+               BLI_BITMAP_TEST(grid_hidden, (y + 1) * gridsize + x));
 }
 
 /* Return true if all vertices in the face are visible, false otherwise */
index d88d4d5970c82b143f1d0e58923ba3715096e12d..e4e6105fe8c20aebed2c767a14e4d0cfc788bbb7 100644 (file)
@@ -251,12 +251,12 @@ static int map_insert_vert(PBVH *bvh, GHash *map,
 
        if (value_p == NULL) {
                void *value;
-               if (BLI_BITMAP_GET(bvh->vert_bitmap, vertex)) {
+               if (BLI_BITMAP_TEST(bvh->vert_bitmap, vertex)) {
                        value = SET_INT_IN_POINTER(~(*face_verts));
                        ++(*face_verts);
                }
                else {
-                       BLI_BITMAP_SET(bvh->vert_bitmap, vertex);
+                       BLI_BITMAP_ENABLE(bvh->vert_bitmap, vertex);
                        value = SET_INT_IN_POINTER(*uniq_verts);
                        ++(*uniq_verts);
                }
index bc3ec2f96812bd2c0999582f3b89681c76ca68f5..990e7e923131fc6509a1a8bbe9c3769d046aba03 100644 (file)
@@ -1077,7 +1077,7 @@ void subsurf_copy_grid_hidden(DerivedMesh *dm, const MPoly *mpoly,
                                        
                                        vndx = getFaceIndex(ss, f, j, x, y, edgeSize, gridSize);
                                        offset = (y * factor) * hidden_gridsize + (x * factor);
-                                       if (BLI_BITMAP_GET(md->hidden, offset))
+                                       if (BLI_BITMAP_TEST(md->hidden, offset))
                                                mvert[vndx].flag |= ME_HIDE;
                                }
                        }
index cff2b52012c925499b5e5c405eec26a21bada887..5431785aa84ea4f572b8088e54bd8ed9c64d9cd6 100644 (file)
@@ -47,7 +47,7 @@ typedef unsigned int BLI_bitmap;
 
 /* size (in bytes) used to hold '_tot' bits */
 #define BLI_BITMAP_SIZE(_tot) \
-       (_BITMAP_NUM_BLOCKS(_tot) * sizeof(unsigned int))
+       (_BITMAP_NUM_BLOCKS(_tot) * sizeof(BLI_bitmap))
 
 /* allocate memory for a bitmap with '_tot' bits; free
  *  with MEM_freeN() */
@@ -60,35 +60,35 @@ typedef unsigned int BLI_bitmap;
        ((BLI_bitmap *)memset(alloca(BLI_BITMAP_SIZE(_tot)), 0, BLI_BITMAP_SIZE(_tot)))
 
 /* get the value of a single bit at '_index' */
-#define BLI_BITMAP_GET(_bitmap, _index) \
+#define BLI_BITMAP_TEST(_bitmap, _index) \
        (CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
         ((_bitmap)[(_index) >> _BITMAP_POWER] & \
          (1u << ((_index) & _BITMAP_MASK))))
 
-#define BLI_BITMAP_GET_BOOL(_bitmap, _index) \
+#define BLI_BITMAP_TEST_BOOL(_bitmap, _index) \
        (CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
-        (BLI_BITMAP_GET(_bitmap, _index) != 0))
+        (BLI_BITMAP_TEST(_bitmap, _index) != 0))
 
 /* set the value of a single bit at '_index' */
-#define BLI_BITMAP_SET(_bitmap, _index) \
+#define BLI_BITMAP_ENABLE(_bitmap, _index) \
        (CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
         ((_bitmap)[(_index) >> _BITMAP_POWER] |= \
          (1u << ((_index) & _BITMAP_MASK))))
 
 /* clear the value of a single bit at '_index' */
-#define BLI_BITMAP_CLEAR(_bitmap, _index) \
+#define BLI_BITMAP_DISABLE(_bitmap, _index) \
        (CHECK_TYPE_INLINE(_bitmap, BLI_bitmap *), \
         ((_bitmap)[(_index) >> _BITMAP_POWER] &= \
          ~(1u << ((_index) & _BITMAP_MASK))))
 
 /* set or clear the value of a single bit at '_index' */
-#define BLI_BITMAP_MODIFY(_bitmap, _index, _set) \
+#define BLI_BITMAP_SET(_bitmap, _index, _set) \
        { \
                CHECK_TYPE(_bitmap, BLI_bitmap *); \
                if (_set) \
-                       BLI_BITMAP_SET(_bitmap, _index); \
+                       BLI_BITMAP_ENABLE(_bitmap, _index); \
                else \
-                       BLI_BITMAP_CLEAR(_bitmap, _index); \
+                       BLI_BITMAP_DISABLE(_bitmap, _index); \
        } (void)0
 
 /* resize bitmap to have space for '_tot' bits */
index 0512980ec1f233ea55eb7fb8221d9b1efda75f99..c7dff3d7787ce560e390ab6ad180afe72f000d26 100644 (file)
@@ -5717,7 +5717,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
                        bp = nu->bp;
                        selbpoints = BLI_BITMAP_NEW(a, "selectlist");
                        while (a > 0) {
-                               if ((!BLI_BITMAP_GET(selbpoints, a)) && (bp->hide == 0) && (bp->f1 & SELECT)) {
+                               if ((!BLI_BITMAP_TEST(selbpoints, a)) && (bp->hide == 0) && (bp->f1 & SELECT)) {
                                        /* upper control point */
                                        if (a % nu->pntsu != 0) {
                                                tempbp = bp - 1;
@@ -5730,7 +5730,7 @@ static int select_more_exec(bContext *C, wmOperator *UNUSED(op))
                                                tempbp = bp + nu->pntsu;
                                                if (!(tempbp->f1 & SELECT)) sel = select_bpoint(tempbp, SELECT, SELECT, VISIBLE);
                                                /* make sure selected bpoint is discarded */
-                                               if (sel == 1) BLI_BITMAP_SET(selbpoints, a - nu->pntsu);
+                                               if (sel == 1) BLI_BITMAP_ENABLE(selbpoints, a - nu->pntsu);
                                        }
                                        
                                        /* right control point */
@@ -5814,7 +5814,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
                                        }
                                        else {
                                                bp--;
-                                               if (BLI_BITMAP_GET(selbpoints, a + 1) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
+                                               if (BLI_BITMAP_TEST(selbpoints, a + 1) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
                                                bp++;
                                        }
                                        
@@ -5832,7 +5832,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
                                        }
                                        else {
                                                bp -= nu->pntsu;
-                                               if (BLI_BITMAP_GET(selbpoints, a + nu->pntsu) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
+                                               if (BLI_BITMAP_TEST(selbpoints, a + nu->pntsu) || ((bp->hide == 0) && (bp->f1 & SELECT))) sel++;
                                                bp += nu->pntsu;
                                        }
 
@@ -5847,7 +5847,7 @@ static int select_less_exec(bContext *C, wmOperator *UNUSED(op))
 
                                        if (sel != 4) {
                                                select_bpoint(bp, DESELECT, SELECT, VISIBLE);
-                                               BLI_BITMAP_SET(selbpoints, a);
+                                               BLI_BITMAP_ENABLE(selbpoints, a);
                                        }
                                }
                                else {
index 5150a703951adb147d461f57ea11b794285685d7..87b429f1165f35ac9c3659ea56e629a9f0e9709e 100644 (file)
@@ -204,7 +204,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index,
                /* only put face under cursor in array */
                mp = &me->mpoly[index];
                BKE_mesh_poly_edgebitmap_insert(edge_tag, mp, me->mloop + mp->loopstart);
-               BLI_BITMAP_SET(poly_tag, index);
+               BLI_BITMAP_ENABLE(poly_tag, index);
        }
        else {
                /* fill array by selection */
@@ -215,7 +215,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index,
                        }
                        else if (mp->flag & ME_FACE_SEL) {
                                BKE_mesh_poly_edgebitmap_insert(edge_tag, mp, me->mloop + mp->loopstart);
-                               BLI_BITMAP_SET(poly_tag, a);
+                               BLI_BITMAP_ENABLE(poly_tag, a);
                        }
                }
        }
@@ -229,13 +229,13 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index,
                        if (mp->flag & ME_HIDE)
                                continue;
 
-                       if (!BLI_BITMAP_GET(poly_tag, a)) {
+                       if (!BLI_BITMAP_TEST(poly_tag, a)) {
                                mark = false;
 
                                ml = me->mloop + mp->loopstart;
                                for (b = 0; b < mp->totloop; b++, ml++) {
                                        if ((me->medge[ml->e].flag & ME_SEAM) == 0) {
-                                               if (BLI_BITMAP_GET(edge_tag, ml->e)) {
+                                               if (BLI_BITMAP_TEST(edge_tag, ml->e)) {
                                                        mark = true;
                                                        break;
                                                }
@@ -243,7 +243,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index,
                                }
 
                                if (mark) {
-                                       BLI_BITMAP_SET(poly_tag, a);
+                                       BLI_BITMAP_ENABLE(poly_tag, a);
                                        BKE_mesh_poly_edgebitmap_insert(edge_tag, mp, me->mloop + mp->loopstart);
                                        do_it = true;
                                }
@@ -254,7 +254,7 @@ static void select_linked_tfaces_with_seams(Mesh *me, const unsigned int index,
        MEM_freeN(edge_tag);
 
        for (a = 0, mp = me->mpoly; a < me->totpoly; a++, mp++) {
-               if (BLI_BITMAP_GET(poly_tag, a)) {
+               if (BLI_BITMAP_TEST(poly_tag, a)) {
                        BKE_BIT_TEST_SET(mp->flag, select, ME_FACE_SEL);
                }
        }
index f58034c106699ba918b4f8fd482d22acc789aaf1..238280989402a73cebe2b3a585d702f55d32e150 100644 (file)
@@ -213,7 +213,7 @@ bool EDBM_backbuf_border_init(ViewContext *vc, short xmin, short ymin, short xma
        a = (xmax - xmin + 1) * (ymax - ymin + 1);
        while (a--) {
                if (*dr > 0 && *dr <= bm_vertoffs) {
-                       BLI_BITMAP_SET(selbuf, *dr);
+                       BLI_BITMAP_ENABLE(selbuf, *dr);
                }
                dr++;
        }
@@ -230,7 +230,7 @@ bool EDBM_backbuf_check(unsigned int index)
                return true;
 
        if (index > 0 && index <= bm_vertoffs)
-               return BLI_BITMAP_GET_BOOL(selbuf, index);
+               return BLI_BITMAP_TEST_BOOL(selbuf, index);
 
        return false;
 }
@@ -297,7 +297,7 @@ bool EDBM_backbuf_border_mask_init(ViewContext *vc, const int mcords[][2], short
        a = (xmax - xmin + 1) * (ymax - ymin + 1);
        while (a--) {
                if (*dr > 0 && *dr <= bm_vertoffs && *dr_mask == true) {
-                       BLI_BITMAP_SET(selbuf, *dr);
+                       BLI_BITMAP_ENABLE(selbuf, *dr);
                }
                dr++; dr_mask++;
        }
@@ -340,7 +340,7 @@ bool EDBM_backbuf_circle_init(ViewContext *vc, short xs, short ys, short rads)
                for (xc = -rads; xc <= rads; xc++, dr++) {
                        if (xc * xc + yc * yc < radsq) {
                                if (*dr > 0 && *dr <= bm_vertoffs) {
-                                       BLI_BITMAP_SET(selbuf, *dr);
+                                       BLI_BITMAP_ENABLE(selbuf, *dr);
                                }
                        }
                }
index 2af2ca3b0e954907769251be1a0b3d1185842281..3897e452d0d12b87248be9676c5e44aa68da57b0 100644 (file)
@@ -285,7 +285,7 @@ static int lattice_select_mirror_exec(bContext *C, wmOperator *op)
                const int i_flip = BKE_lattice_index_flip(lt, i, flip_uvw[0], flip_uvw[1], flip_uvw[2]);
                bp = &lt->def[i];
                if (!bp->hide) {
-                       if (BLI_BITMAP_GET(selpoints, i_flip)) {
+                       if (BLI_BITMAP_TEST(selpoints, i_flip)) {
                                bp->f1 |= SELECT;
                        }
                        else {
@@ -338,7 +338,7 @@ static bool lattice_test_bitmap_uvw(Lattice *lt, BLI_bitmap *selpoints, int u, i
        else {
                int i = BKE_lattice_index_from_uvw(lt, u, v, w);
                if (lt->def[i].hide == 0) {
-                       return (BLI_BITMAP_GET(selpoints, i) != 0) == selected;
+                       return (BLI_BITMAP_TEST(selpoints, i) != 0) == selected;
                }
                return false;
        }
index 3e33268704c23246f5a7f16fba51cbb38b14732a..1249beb4517a708585c7748ab9f2fa60e3263c2d 100644 (file)
@@ -1650,9 +1650,9 @@ static void skin_armature_bone_create(Object *skin_ob,
                int v;
 
                /* ignore edge if already visited */
-               if (BLI_BITMAP_GET(edges_visited, endx))
+               if (BLI_BITMAP_TEST(edges_visited, endx))
                        continue;
-               BLI_BITMAP_SET(edges_visited, endx);
+               BLI_BITMAP_ENABLE(edges_visited, endx);
 
                v = (e->v1 == parent_v ? e->v2 : e->v1);
 
index bc37a88d7f0a5ce89df05d70569d9be35e724336..d1a7f0032ae8f0d3bddf9741873f1d733fa3c1dc 100644 (file)
@@ -192,14 +192,14 @@ static void partialvis_update_grids(Object *ob,
                                /* skip grid element if not in the effected area */
                                if (is_effected(area, planes, co, mask)) {
                                        /* set or clear the hide flag */
-                                       BLI_BITMAP_MODIFY(gh, y * key.grid_size + x,
+                                       BLI_BITMAP_SET(gh, y * key.grid_size + x,
                                                          action == PARTIALVIS_HIDE);
 
                                        any_changed = true;
                                }
 
                                /* keep track of whether any elements are still hidden */
-                               if (BLI_BITMAP_GET(gh, y * key.grid_size + x))
+                               if (BLI_BITMAP_TEST(gh, y * key.grid_size + x))
                                        any_hidden = true;
                                else
                                        any_visible = true;
index 9324656309bb6699ddfa9aaf0b897b8980ff27eb..950e61c716882acbd5f235500c85cc4646c1657f 100644 (file)
@@ -1566,7 +1566,7 @@ static void do_multires_smooth_brush(Sculpt *sd, SculptSession *ss, PBVHNode *no
                                int index;
 
                                if (gh) {
-                                       if (BLI_BITMAP_GET(gh, y * gridsize + x))
+                                       if (BLI_BITMAP_TEST(gh, y * gridsize + x))
                                                continue;
                                }
 
index fa398e3391bd05b114863d35489ef919dc19040c..71bd42f4fc4d2a42a522630e56ca32f1f2fc5069 100644 (file)
@@ -195,9 +195,9 @@ static int sculpt_undo_restore_hidden(bContext *C, DerivedMesh *dm,
                
                for (i = 0; i < unode->totvert; i++) {
                        MVert *v = &mvert[unode->index[i]];
-                       int uval = BLI_BITMAP_GET(unode->vert_hidden, i);
+                       int uval = BLI_BITMAP_TEST(unode->vert_hidden, i);
 
-                       BLI_BITMAP_MODIFY(unode->vert_hidden, i,
+                       BLI_BITMAP_SET(unode->vert_hidden, i,
                                          v->flag & ME_HIDE);
                        if (uval)
                                v->flag |= ME_HIDE;
@@ -702,7 +702,7 @@ static void sculpt_undo_store_hidden(Object *ob, SculptUndoNode *unode)
                BKE_pbvh_node_num_verts(pbvh, node, NULL, &allvert);
                BKE_pbvh_node_get_verts(pbvh, node, &vert_indices, &mvert);
                for (i = 0; i < allvert; i++) {
-                       BLI_BITMAP_MODIFY(unode->vert_hidden, i,
+                       BLI_BITMAP_SET(unode->vert_hidden, i,
                                          mvert[vert_indices[i]].flag & ME_HIDE);
                }
        }
index 56b6b6a89a73b479e2215a10d8b95cfe42e46199..de4011c9349a003e02ef7685b62dd97ac7c632af 100644 (file)
@@ -113,8 +113,8 @@ static BLI_bitmap *get_tface_mesh_marked_edge_info(Mesh *me)
 
                        ml = me->mloop + mp->loopstart;
                        for (j = 0; j < mp->totloop; j++, ml++) {
-                               BLI_BITMAP_SET(bitmap_edge_flags, edge_vis_index(ml->e));
-                               if (select_set) BLI_BITMAP_SET(bitmap_edge_flags, edge_sel_index(ml->e));
+                               BLI_BITMAP_ENABLE(bitmap_edge_flags, edge_vis_index(ml->e));
+                               if (select_set) BLI_BITMAP_ENABLE(bitmap_edge_flags, edge_sel_index(ml->e));
                        }
                }
        }
@@ -129,12 +129,12 @@ static DMDrawOption draw_mesh_face_select__setHiddenOpts(void *userData, int ind
        Mesh *me = data->me;
 
        if (me->drawflag & ME_DRAWEDGES) {
-               if ((me->drawflag & ME_HIDDENEDGES) || (BLI_BITMAP_GET(data->edge_flags, edge_vis_index(index))))
+               if ((me->drawflag & ME_HIDDENEDGES) || (BLI_BITMAP_TEST(data->edge_flags, edge_vis_index(index))))
                        return DM_DRAW_OPTION_NORMAL;
                else
                        return DM_DRAW_OPTION_SKIP;
        }
-       else if (BLI_BITMAP_GET(data->edge_flags, edge_sel_index(index)))
+       else if (BLI_BITMAP_TEST(data->edge_flags, edge_sel_index(index)))
                return DM_DRAW_OPTION_NORMAL;
        else
                return DM_DRAW_OPTION_SKIP;
@@ -143,7 +143,7 @@ static DMDrawOption draw_mesh_face_select__setHiddenOpts(void *userData, int ind
 static DMDrawOption draw_mesh_face_select__setSelectOpts(void *userData, int index)
 {
        drawMeshFaceSelect_userData *data = userData;
-       return (BLI_BITMAP_GET(data->edge_flags, edge_sel_index(index))) ? DM_DRAW_OPTION_NORMAL : DM_DRAW_OPTION_SKIP;
+       return (BLI_BITMAP_TEST(data->edge_flags, edge_sel_index(index))) ? DM_DRAW_OPTION_NORMAL : DM_DRAW_OPTION_SKIP;
 }
 
 /* draws unselected */
index 92899fc41167bd1545fdf48bd61e226411d68e60..d582a0c53de3c0ea98af458fc5a73615a420ff53 100644 (file)
@@ -2623,7 +2623,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
 
                                if (propconnected) {
                                        UvElement *element = BM_uv_element_get(elementmap, efa, l);
-                                       BLI_BITMAP_SET(island_enabled, element->island);
+                                       BLI_BITMAP_ENABLE(island_enabled, element->island);
                                }
 
                        }
@@ -2664,7 +2664,7 @@ static void createTransUVs(bContext *C, TransInfo *t)
 
                        if (propconnected) {
                                UvElement *element = BM_uv_element_get(elementmap, efa, l);
-                               if (!BLI_BITMAP_GET(island_enabled, element->island)) {
+                               if (!BLI_BITMAP_TEST(island_enabled, element->island)) {
                                        count_rejected++;
                                        continue;
                                }
index 7c2f71c0153ac0b0977c54426a0288a4efc6be53..a1cc23f735b748542809f60dd1edc94d8ff37c10 100644 (file)
@@ -418,7 +418,7 @@ static void draw_uvs_other_mesh_new_shading(Object *ob, const Image *curimage)
                Image *image;
                ED_object_get_active_image(ob, a + 1, &image, NULL, NULL);
                if (image == curimage) {
-                       BLI_BITMAP_SET(mat_test_array, a);
+                       BLI_BITMAP_ENABLE(mat_test_array, a);
                        ok = true;
                }
        }
@@ -430,7 +430,7 @@ static void draw_uvs_other_mesh_new_shading(Object *ob, const Image *curimage)
        for (a = me->totpoly; a != 0; a--, mpoly++) {
                const int mat_nr = mpoly->mat_nr;
                if ((mat_nr >= ob->totcol) ||
-                   (BLI_BITMAP_GET(mat_test_array, mat_nr)) == 0)
+                   (BLI_BITMAP_TEST(mat_test_array, mat_nr)) == 0)
                {
                        continue;
                }
index c212c13e3966f5e47785ef3a058c3eb911ae2917..7d15147a3c6892a7fdd783190831390d5c19ff93 100644 (file)
@@ -325,8 +325,8 @@ static DerivedMesh *applyModifier(
 
                for (eidx = 0, ed = orig_medge; eidx < numEdges; eidx++, ed++) {
                        if (!ELEM(edge_users[eidx], INVALID_UNUSED, INVALID_PAIR)) {
-                               BLI_BITMAP_SET(orig_mvert_tag, ed->v1);
-                               BLI_BITMAP_SET(orig_mvert_tag, ed->v2);
+                               BLI_BITMAP_ENABLE(orig_mvert_tag, ed->v1);
+                               BLI_BITMAP_ENABLE(orig_mvert_tag, ed->v2);
                                STACK_PUSH(new_edge_arr, eidx);
                                newFaces++;
                                newLoops += 4;
@@ -337,7 +337,7 @@ static DerivedMesh *applyModifier(
 #undef INVALID_PAIR
 
                for (i = 0; i < numVerts; i++) {
-                       if (BLI_BITMAP_GET(orig_mvert_tag, i)) {
+                       if (BLI_BITMAP_TEST(orig_mvert_tag, i)) {
                                old_vert_arr[i] = STACK_SIZE(new_vert_arr);
                                STACK_PUSH(new_vert_arr, i);
                                newEdges++;