diff options
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/bvhutils.c | 12 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/cdderivedmesh.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/colorband.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/curve_decimate.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/library.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/object_deform.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/outliner_treehash.c | 4 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh.c | 6 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_bmesh.c | 30 |
12 files changed, 36 insertions, 36 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c index 775499304d4..cd2c7194237 100644 --- a/source/blender/blenkernel/intern/bvhutils.c +++ b/source/blender/blenkernel/intern/bvhutils.c @@ -411,7 +411,7 @@ static BVHTree *bvhtree_from_editmesh_verts_create_tree( BMVert *eve = BM_vert_at_index(em->bm, i); BLI_bvhtree_insert(tree, i, eve->co, 1); } - BLI_assert(BLI_bvhtree_get_size(tree) == verts_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == verts_num_active); BLI_bvhtree_balance(tree); } @@ -440,7 +440,7 @@ static BVHTree *bvhtree_from_mesh_verts_create_tree( } BLI_bvhtree_insert(tree, i, vert[i].co, 1); } - BLI_assert(BLI_bvhtree_get_size(tree) == verts_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == verts_num_active); BLI_bvhtree_balance(tree); } @@ -612,7 +612,7 @@ static BVHTree *bvhtree_from_editmesh_edges_create_tree( BLI_bvhtree_insert(tree, i, co[0], 2); } - BLI_assert(BLI_bvhtree_get_size(tree) == edges_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == edges_num_active); BLI_bvhtree_balance(tree); } @@ -829,7 +829,7 @@ static BVHTree *bvhtree_from_mesh_faces_create_tree( BLI_bvhtree_insert(tree, i, co[0], face[i].v4 ? 4 : 3); } } - BLI_assert(BLI_bvhtree_get_size(tree) == faces_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == faces_num_active); BLI_bvhtree_balance(tree); } } @@ -990,7 +990,7 @@ static BVHTree *bvhtree_from_editmesh_looptri_create_tree( } } } - BLI_assert(BLI_bvhtree_get_size(tree) == looptri_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == looptri_num_active); BLI_bvhtree_balance(tree); } } @@ -1032,7 +1032,7 @@ static BVHTree *bvhtree_from_mesh_looptri_create_tree( BLI_bvhtree_insert(tree, i, co[0], 3); } } - BLI_assert(BLI_bvhtree_get_size(tree) == looptri_num_active); + BLI_assert(BLI_bvhtree_get_len(tree) == looptri_num_active); BLI_bvhtree_balance(tree); } } diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c index d3b106835ef..d65427a861b 100644 --- a/source/blender/blenkernel/intern/cdderivedmesh.c +++ b/source/blender/blenkernel/intern/cdderivedmesh.c @@ -3435,7 +3435,7 @@ void CDDM_calc_edges_tessface(DerivedMesh *dm) } } - numEdges = BLI_edgeset_size(eh); + numEdges = BLI_edgeset_len(eh); /* write new edges into a temporary CustomData */ CustomData_reset(&edgeData); @@ -3504,7 +3504,7 @@ void CDDM_calc_edges(DerivedMesh *dm) } } - numEdges = BLI_edgehash_size(eh); + numEdges = BLI_edgehash_len(eh); /* write new edges into a temporary CustomData */ CustomData_reset(&edgeData); diff --git a/source/blender/blenkernel/intern/colorband.c b/source/blender/blenkernel/intern/colorband.c index d35e797ddac..f72d4df725a 100644 --- a/source/blender/blenkernel/intern/colorband.c +++ b/source/blender/blenkernel/intern/colorband.c @@ -210,7 +210,7 @@ static void colorband_init_from_table_rgba_resample( while ((carr_len > 1 && !BLI_heap_is_empty(heap)) && ((carr_len >= MAXCOLORBAND) || (BLI_heap_node_value(BLI_heap_top(heap)) <= eps_2x))) { - c = BLI_heap_popmin(heap); + c = BLI_heap_pop_min(heap); struct ColorResampleElem *c_next = c->next, *c_prev = c->prev; c_prev->next = c_next; c_next->prev = c_prev; diff --git a/source/blender/blenkernel/intern/curve_decimate.c b/source/blender/blenkernel/intern/curve_decimate.c index 7983c63c99d..1a6c4714afd 100644 --- a/source/blender/blenkernel/intern/curve_decimate.c +++ b/source/blender/blenkernel/intern/curve_decimate.c @@ -159,7 +159,7 @@ static void curve_decimate( struct Knot *k; { - struct Removal *r = BLI_heap_popmin(heap); + struct Removal *r = BLI_heap_pop_min(heap); k = &knots[r->knot_index]; k->heap_node = NULL; k->prev->handles[1] = r->handles[0]; diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c index 46f8e637cf8..99423ee26a6 100644 --- a/source/blender/blenkernel/intern/library.c +++ b/source/blender/blenkernel/intern/library.c @@ -2026,7 +2026,7 @@ void BKE_library_make_local( GSet *loop_tags = BLI_gset_ptr_new(__func__); for (LinkNode *it = todo_ids; it; it = it->next) { library_make_local_copying_check(it->link, loop_tags, bmain->relations, done_ids); - BLI_assert(BLI_gset_size(loop_tags) == 0); + BLI_assert(BLI_gset_len(loop_tags) == 0); } BLI_gset_free(loop_tags, NULL); BLI_gset_free(done_ids, NULL); diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index bf937267b83..689ebc7e909 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -1003,7 +1003,7 @@ static void make_edges_mdata_extend(MEdge **r_alledge, int *r_totedge, BKE_mesh_poly_edgehash_insert(eh, mp, mloop + mp->loopstart); } - totedge_new = BLI_edgehash_size(eh); + totedge_new = BLI_edgehash_len(eh); #ifdef DEBUG /* ensure that theres no overlap! */ diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 4aeddbb4c45..62c9210b8f5 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -1486,7 +1486,7 @@ void BKE_mesh_calc_edges(Mesh *mesh, bool update, const bool select) } } - totedge = BLI_edgehash_size(eh); + totedge = BLI_edgehash_len(eh); /* write new edges into a temporary CustomData */ CustomData_reset(&edata); diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 74766bec9a8..00f5f0f84b6 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -2787,7 +2787,7 @@ int BKE_node_instance_hash_haskey(bNodeInstanceHash *hash, bNodeInstanceKey key) int BKE_node_instance_hash_size(bNodeInstanceHash *hash) { - return BLI_ghash_size(hash->ghash); + return BLI_ghash_len(hash->ghash); } void BKE_node_instance_hash_clear_tags(bNodeInstanceHash *hash) diff --git a/source/blender/blenkernel/intern/object_deform.c b/source/blender/blenkernel/intern/object_deform.c index 4f92509827f..2726064d634 100644 --- a/source/blender/blenkernel/intern/object_deform.c +++ b/source/blender/blenkernel/intern/object_deform.c @@ -539,7 +539,7 @@ bool *BKE_object_defgroup_validmap_get(Object *ob, const int defbase_tot) BLI_ghash_insert(gh, dg->name, NULL); } - BLI_assert(BLI_ghash_size(gh) == defbase_tot); + BLI_assert(BLI_ghash_len(gh) == defbase_tot); /* now loop through the armature modifiers and identify deform bones */ for (md = ob->modifiers.first; md; md = !md->next && step1 ? (step1 = 0), modifiers_getVirtualModifierList(ob, &virtualModifierData) : md->next) { @@ -574,7 +574,7 @@ bool *BKE_object_defgroup_validmap_get(Object *ob, const int defbase_tot) defgroup_validmap[i] = (BLI_ghash_lookup(gh, dg->name) != NULL); } - BLI_assert(i == BLI_ghash_size(gh)); + BLI_assert(i == BLI_ghash_len(gh)); BLI_ghash_free(gh, NULL, NULL); diff --git a/source/blender/blenkernel/intern/outliner_treehash.c b/source/blender/blenkernel/intern/outliner_treehash.c index 4d97121e2a3..9db9b2ddf54 100644 --- a/source/blender/blenkernel/intern/outliner_treehash.c +++ b/source/blender/blenkernel/intern/outliner_treehash.c @@ -112,7 +112,7 @@ static void fill_treehash(void *treehash, BLI_mempool *treestore) void *BKE_outliner_treehash_create_from_treestore(BLI_mempool *treestore) { - GHash *treehash = BLI_ghash_new_ex(tse_hash, tse_cmp, "treehash", BLI_mempool_count(treestore)); + GHash *treehash = BLI_ghash_new_ex(tse_hash, tse_cmp, "treehash", BLI_mempool_len(treestore)); fill_treehash(treehash, treestore); return treehash; } @@ -126,7 +126,7 @@ void *BKE_outliner_treehash_rebuild_from_treestore(void *treehash, BLI_mempool * { BLI_assert(treehash); - BLI_ghash_clear_ex(treehash, NULL, free_treehash_group, BLI_mempool_count(treestore)); + BLI_ghash_clear_ex(treehash, NULL, free_treehash_group, BLI_mempool_len(treestore)); fill_treehash(treehash, treestore); return treehash; } diff --git a/source/blender/blenkernel/intern/pbvh.c b/source/blender/blenkernel/intern/pbvh.c index d926c96c0d8..51d50b061de 100644 --- a/source/blender/blenkernel/intern/pbvh.c +++ b/source/blender/blenkernel/intern/pbvh.c @@ -1294,7 +1294,7 @@ void BKE_pbvh_get_grid_updates(PBVH *bvh, bool clear, void ***r_gridfaces, int * pbvh_iter_end(&iter); - const int tot = BLI_gset_size(face_set); + const int tot = BLI_gset_len(face_set); if (tot == 0) { *r_totface = 0; *r_gridfaces = NULL; @@ -1433,8 +1433,8 @@ void BKE_pbvh_node_num_verts( if (r_uniquevert) *r_uniquevert = node->uniq_verts; break; case PBVH_BMESH: - tot = BLI_gset_size(node->bm_unique_verts); - if (r_totvert) *r_totvert = tot + BLI_gset_size(node->bm_other_verts); + tot = BLI_gset_len(node->bm_unique_verts); + if (r_totvert) *r_totvert = tot + BLI_gset_len(node->bm_other_verts); if (r_uniquevert) *r_uniquevert = tot; break; } diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 587cc787057..6b6f2605dc3 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -255,7 +255,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde const int cd_face_node_offset = bvh->cd_face_node_offset; PBVHNode *n = &bvh->nodes[node_index]; - if (BLI_gset_size(n->bm_faces) <= bvh->leaf_limit) { + if (BLI_gset_len(n->bm_faces) <= bvh->leaf_limit) { /* Node limit not exceeded */ pbvh_bmesh_node_finalize(bvh, node_index, cd_vert_node_offset, cd_face_node_offset); return; @@ -289,8 +289,8 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde *c2 = &bvh->nodes[children + 1]; c1->flag |= PBVH_Leaf; c2->flag |= PBVH_Leaf; - c1->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_size(n->bm_faces) / 2); - c2->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_size(n->bm_faces) / 2); + c1->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_len(n->bm_faces) / 2); + c2->bm_faces = BLI_gset_ptr_new_ex("bm_faces", BLI_gset_len(n->bm_faces) / 2); /* Partition the parent node's faces between the two children */ GSET_ITER (gs_iter, n->bm_faces) { @@ -305,11 +305,11 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde /* Enforce at least one primitive in each node */ GSet *empty = NULL, *other; - if (BLI_gset_size(c1->bm_faces) == 0) { + if (BLI_gset_len(c1->bm_faces) == 0) { empty = c1->bm_faces; other = c2->bm_faces; } - else if (BLI_gset_size(c2->bm_faces) == 0) { + else if (BLI_gset_len(c2->bm_faces) == 0) { empty = c2->bm_faces; other = c1->bm_faces; } @@ -375,7 +375,7 @@ static void pbvh_bmesh_node_split(PBVH *bvh, const BBC *bbc_array, int node_inde static bool pbvh_bmesh_node_limit_ensure(PBVH *bvh, int node_index) { GSet *bm_faces = bvh->nodes[node_index].bm_faces; - const int bm_faces_size = BLI_gset_size(bm_faces); + const int bm_faces_size = BLI_gset_len(bm_faces); if (bm_faces_size <= bvh->leaf_limit) { /* Node limit not exceeded */ return false; @@ -1238,7 +1238,7 @@ static bool pbvh_bmesh_subdivide_long_edges( bool any_subdivided = false; while (!BLI_heap_is_empty(eq_ctx->q->heap)) { - BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap); + BMVert **pair = BLI_heap_pop_min(eq_ctx->q->heap); BMVert *v1 = pair[0], *v2 = pair[1]; BMEdge *e; @@ -1455,7 +1455,7 @@ static bool pbvh_bmesh_collapse_short_edges( GHash *deleted_verts = BLI_ghash_ptr_new("deleted_verts"); while (!BLI_heap_is_empty(eq_ctx->q->heap)) { - BMVert **pair = BLI_heap_popmin(eq_ctx->q->heap); + BMVert **pair = BLI_heap_pop_min(eq_ctx->q->heap); BMVert *v1 = pair[0], *v2 = pair[1]; BLI_mempool_free(eq_ctx->pool, pair); pair = NULL; @@ -2011,10 +2011,10 @@ void BKE_pbvh_bmesh_node_save_orig(PBVHNode *node) if (node->bm_orco) return; - const int totvert = BLI_gset_size(node->bm_unique_verts) + - BLI_gset_size(node->bm_other_verts); + const int totvert = BLI_gset_len(node->bm_unique_verts) + + BLI_gset_len(node->bm_other_verts); - const int tottri = BLI_gset_size(node->bm_faces); + const int tottri = BLI_gset_len(node->bm_faces); node->bm_orco = MEM_mallocN(sizeof(*node->bm_orco) * totvert, __func__); node->bm_ortri = MEM_mallocN(sizeof(*node->bm_ortri) * tottri, __func__); @@ -2189,12 +2189,12 @@ static void pbvh_bmesh_verify(PBVH *bvh) int totface = 0, totvert = 0; for (int i = 0; i < bvh->totnode; i++) { PBVHNode *n = &bvh->nodes[i]; - totface += n->bm_faces ? BLI_gset_size(n->bm_faces) : 0; - totvert += n->bm_unique_verts ? BLI_gset_size(n->bm_unique_verts) : 0; + totface += n->bm_faces ? BLI_gset_len(n->bm_faces) : 0; + totvert += n->bm_unique_verts ? BLI_gset_len(n->bm_unique_verts) : 0; } - BLI_assert(totface == BLI_gset_size(faces_all)); - BLI_assert(totvert == BLI_gset_size(verts_all)); + BLI_assert(totface == BLI_gset_len(faces_all)); + BLI_assert(totvert == BLI_gset_len(verts_all)); } { |