diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-07 07:48:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-07 07:48:36 +0400 |
commit | 2527d0ce8f022ac45ccdb766c02ecc9aff7ec5c3 (patch) | |
tree | e6d45350becdf7481b3e49c3d9f2790f239bd587 /source | |
parent | 212717416b40419c085853b26f4311dde74b1557 (diff) |
Dyntopo: minor speedups with bmesh use.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/pbvh_bmesh.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c index 6e481b761d6..8680b3e3a4b 100644 --- a/source/blender/blenkernel/intern/pbvh_bmesh.c +++ b/source/blender/blenkernel/intern/pbvh_bmesh.c @@ -314,8 +314,9 @@ static BMFace *pbvh_bmesh_face_create(PBVH *bvh, int node_index, f = BM_face_create(bvh->bm, v_tri, e_tri, 3, f_example, BM_CREATE_NOP); - if (!BLI_ghash_haskey(bvh->bm_face_to_node, f)) { + BLI_assert(!BLI_ghash_haskey(bvh->bm_face_to_node, f)); + { BLI_ghash_insert(bvh->nodes[node_index].bm_faces, f, NULL); BLI_ghash_insert(bvh->bm_face_to_node, f, val); @@ -852,7 +853,7 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1, } /* Kill the edge */ - BLI_assert(BM_edge_face_count(e) == 0); + BLI_assert(BM_edge_is_wire(e)); BM_edge_kill(bvh->bm, e); /* For all remaining faces of v_del, create a new face that is the @@ -936,7 +937,7 @@ static void pbvh_bmesh_collapse_edge(PBVH *bvh, BMEdge *e, BMVert *v1, /* Check if any of the face's edges are now unused by any * face, if so delete them */ for (j = 0; j < 3; j++) { - if (BM_edge_face_count(e_tri[j]) == 0) + if (BM_edge_is_wire(e_tri[j])) BM_edge_kill(bvh->bm, e_tri[j]); } |