Fix #20420: grab brush + subsurf modifier crash. Previously the PBVH nodes

were cached once at the start, but these can change when modifiers are
executed, now it simply doesn't cache them anymore, that was only really
a performance bottleneck when it was caching individual vertices.
This commit is contained in:
2010-02-01 11:36:22 +00:00
parent 7795e71377
commit c5ef38a415
2 changed files with 15 additions and 23 deletions

View File

@@ -346,6 +346,8 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(iter));
}
BLI_ghashIterator_free(iter);
for(i = 0; i < totface*4; ++i)
if(node->face_vert_indices[i] < 0)
node->face_vert_indices[i]= -node->face_vert_indices[i] + node->uniq_verts - 1;
@@ -1006,6 +1008,8 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot
BLI_ghashIterator_step(hiter), ++i)
faces[i]= BLI_ghashIterator_getKey(hiter);
BLI_ghashIterator_free(hiter);
BLI_ghash_free(map, NULL, NULL);
*totface= tot;