diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-05-05 23:27:42 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-05-05 23:28:36 +0300 |
commit | ee5eb2a26a1f66d876d876c751d1076e1748ece6 (patch) | |
tree | 85c84b2f3c6de2f744b86eb736b8732470d96f1e /source/blender/blenkernel/intern/bvhutils.c | |
parent | 55c4889864dace4e00d1266637f3450dbcbf951d (diff) |
Missed last commit
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 660412dc96f..e2831ae025a 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -432,7 +432,7 @@ static BVHTree *bvhtree_from_mesh_verts_create_tree( if (verts_mask) { BLI_assert(IN_RANGE(verts_num_active, 0, verts_num)); } - else if (!verts_mask) { + else { verts_num_active = verts_num; } @@ -841,15 +841,10 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree( int i; if (looptri_num) { - if (looptri_mask && looptri_num_active == -1) { - looptri_num_active = 0; - for (i = 0; i < looptri_num; i++) { - if (BLI_BITMAP_TEST_BOOL(looptri_mask, i)) { - looptri_num_active++; - } - } + if (looptri_mask) { + BLI_assert(IN_RANGE(looptri_num_active, 0, looptri_num)); } - else if (!looptri_mask) { + else { looptri_num_active = looptri_num; } @@ -896,15 +891,10 @@ static BVHTree *bvhtree_from_mesh_looptri_create_tree( int i; if (looptri_num) { - if (looptri_mask && looptri_num_active == -1) { - looptri_num_active = 0; - for (i = 0; i < looptri_num; i++) { - if (BLI_BITMAP_TEST_BOOL(looptri_mask, i)) { - looptri_num_active++; - } - } + if (looptri_mask) { + BLI_assert(IN_RANGE(looptri_num_active, 0, looptri_num)); } - else if (!looptri_mask) { + else { looptri_num_active = looptri_num; } |