diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-15 11:47:24 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-12-19 15:53:12 +0300 |
commit | d211c9aa0aaa68fe126ce632746b705903d03173 (patch) | |
tree | fbcc4533fc4a62d2c75d3626594fae039cf3ad2d /source/blender/blenkernel | |
parent | dad260c164adf0f86853e2f8046916739fccaffd (diff) |
BLI_bitmap: add functions operating on the whole bitmask.
There is no point having operations that iterate over the whole
bit array as macros, so convert BLI_BITMAP_SET_ALL to a function.
Also, add more utilities for copying and manipulating masks.
Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D4101
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_evaluate.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_remap.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_foreach.c | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 83b18a57ba4..c264eb8a1d2 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -1043,7 +1043,7 @@ static BLI_bitmap *loose_verts_map_get( int *r_loose_vert_num) { BLI_bitmap *loose_verts_mask = BLI_BITMAP_NEW(verts_num, __func__); - BLI_BITMAP_SET_ALL(loose_verts_mask, true, verts_num); + BLI_bitmap_set_all(loose_verts_mask, true, verts_num); const MEdge *e = medge; int num_linked_verts = 0; diff --git a/source/blender/blenkernel/intern/mesh_evaluate.c b/source/blender/blenkernel/intern/mesh_evaluate.c index b6ba4a15e40..c5bcb72165e 100644 --- a/source/blender/blenkernel/intern/mesh_evaluate.c +++ b/source/blender/blenkernel/intern/mesh_evaluate.c @@ -1769,7 +1769,7 @@ static void mesh_normals_loop_custom_set( &lnors_spacearr, NULL, loop_to_poly); } else { - BLI_BITMAP_SET_ALL(done_loops, true, (size_t)numLoops); + BLI_bitmap_set_all(done_loops, true, (size_t)numLoops); } /* And we just have to convert plain object-space custom normals to our lnor space-encoded ones. */ diff --git a/source/blender/blenkernel/intern/mesh_remap.c b/source/blender/blenkernel/intern/mesh_remap.c index bdf5b3fddcc..85b09848a72 100644 --- a/source/blender/blenkernel/intern/mesh_remap.c +++ b/source/blender/blenkernel/intern/mesh_remap.c @@ -1336,7 +1336,7 @@ void BKE_mesh_remap_calc_loops_from_mesh( for (tindex = 0; tindex < num_trees; tindex++) { MeshElemMap *isld = island_store.islands[tindex]; int num_verts_active = 0; - BLI_BITMAP_SET_ALL(verts_active, false, (size_t)num_verts_src); + BLI_bitmap_set_all(verts_active, false, (size_t)num_verts_src); for (i = 0; i < isld->count; i++) { mp_src = &polys_src[isld->indices[i]]; for (lidx_src = mp_src->loopstart; lidx_src < mp_src->loopstart + mp_src->totloop; lidx_src++) { @@ -1370,7 +1370,7 @@ void BKE_mesh_remap_calc_loops_from_mesh( for (tindex = 0; tindex < num_trees; tindex++) { int num_looptri_active = 0; - BLI_BITMAP_SET_ALL(looptri_active, false, (size_t)num_looptri_src); + BLI_bitmap_set_all(looptri_active, false, (size_t)num_looptri_src); for (i = 0; i < num_looptri_src; i++) { mp_src = &polys_src[looptri_src[i].poly]; if (island_store.items_to_islands[mp_src->loopstart] == tindex) { diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index a21e919bca7..d2f307362e6 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -275,7 +275,7 @@ static MDisps *multires_mdisps_initialize_hidden(Mesh *me, int level) BLI_assert(!md->hidden); md->hidden = BLI_BITMAP_NEW(gridarea, "MDisps.hidden initialize"); - BLI_BITMAP_SET_ALL(md->hidden, true, gridarea); + BLI_bitmap_set_all(md->hidden, true, gridarea); } } diff --git a/source/blender/blenkernel/intern/subdiv_foreach.c b/source/blender/blenkernel/intern/subdiv_foreach.c index 511536c31b5..f049b23a9ef 100644 --- a/source/blender/blenkernel/intern/subdiv_foreach.c +++ b/source/blender/blenkernel/intern/subdiv_foreach.c @@ -288,7 +288,7 @@ static void subdiv_foreach_ctx_init(Subdiv *subdiv, /* Calculate number of geometry in the result subdivision mesh. */ subdiv_foreach_ctx_count(ctx); /* Re-set maps which were used at this step. */ - BLI_BITMAP_SET_ALL(ctx->coarse_edges_used_map, false, coarse_mesh->totedge); + BLI_bitmap_set_all(ctx->coarse_edges_used_map, false, coarse_mesh->totedge); ctx->face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv); } |