diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-08 18:22:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-11-08 18:22:05 +0400 |
commit | ff1e337bb47ce801e99afeec3d5ccdab5a5a3212 (patch) | |
tree | 47704b213b0f620ff22c6877b6260ad53dad7cc3 | |
parent | eacc74ef1bdb331cba34817db298f36c957d06d8 (diff) |
Correction to previous commit
pBVH nodes buffers could share some pointers from pBVH itself,
and after updating pointers in pBVH we need to recreate this buffers.
This starts looking a bit awkward and seems it's mainly because of
assumptions made when was working on sculpting on deformed mesh.
Would revision such a sculpting and would try to make it more clear
later.
-rw-r--r-- | source/blender/blenlib/intern/pbvh.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c index 8e9f0bfef10..e21ce0716d2 100644 --- a/source/blender/blenlib/intern/pbvh.c +++ b/source/blender/blenlib/intern/pbvh.c @@ -1710,11 +1710,16 @@ void BLI_pbvh_draw(PBVH *bvh, float (*planes)[4], float (*face_nors)[3], void BLI_pbvh_grids_update(PBVH *bvh, CCGElem **grids, DMGridAdjacency *gridadj, void **gridfaces, DMFlagMat *flagmats, BLI_bitmap *grid_hidden) { + int a; + bvh->grids = grids; bvh->gridadj = gridadj; bvh->gridfaces = gridfaces; bvh->grid_flag_mats = flagmats; bvh->grid_hidden = grid_hidden; + + for (a = 0; a < bvh->totnode; ++a) + BLI_pbvh_node_mark_rebuild_draw(&bvh->nodes[a]); } float (*BLI_pbvh_get_vertCos(PBVH * pbvh))[3] |