diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-05-19 14:59:39 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-05-19 14:59:39 +0300 |
commit | 325307d82b3ab9d6fa52d23cc571e10a52b8003f (patch) | |
tree | 0de5e4e7aa57b1eeeee5542285af4c08bd079e26 /source/blender/blenkernel/BKE_pbvh.h | |
parent | 4fa1fc29bd45835e26ff3497af8cf2a7c61d3c73 (diff) | |
parent | 82bda82ec4494717f3796a8b458c81a98836838b (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pbvh.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h index 409afcd9f75..2bf16e38716 100644 --- a/source/blender/blenkernel/BKE_pbvh.h +++ b/source/blender/blenkernel/BKE_pbvh.h @@ -309,6 +309,8 @@ void BKE_pbvh_face_sets_set(PBVH *bvh, int *face_sets); void BKE_pbvh_face_sets_color_set(PBVH *bvh, int seed, int color_default); +void BKE_pbvh_respect_hide_set(PBVH *bvh, bool respect_hide); + /* vertex deformer */ float (*BKE_pbvh_vert_coords_alloc(struct PBVH *pbvh))[3]; void BKE_pbvh_vert_coords_apply(struct PBVH *pbvh, const float (*vertCos)[3], const int totvert); @@ -334,6 +336,7 @@ typedef struct PBVHVertexIter { int gy; int i; int index; + bool respect_hide; /* grid */ struct CCGKey key; @@ -402,9 +405,15 @@ void pbvh_vertex_iter_init(PBVH *bvh, PBVHNode *node, PBVHVertexIter *vi, int mo } \ else if (vi.mverts) { \ vi.mvert = &vi.mverts[vi.vert_indices[vi.gx]]; \ - vi.visible = !(vi.mvert->flag & ME_HIDE); \ - if (mode == PBVH_ITER_UNIQUE && !vi.visible) \ - continue; \ + if (vi.respect_hide) { \ + vi.visible = !(vi.mvert->flag & ME_HIDE); \ + if (mode == PBVH_ITER_UNIQUE && !vi.visible) { \ + continue; \ + } \ + } \ + else { \ + BLI_assert(vi.visible); \ + } \ vi.co = vi.mvert->co; \ vi.no = vi.mvert->no; \ vi.index = vi.vert_indices[vi.i]; \ |