Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2020-05-19 10:53:26 +0300
committerCampbell Barton <ideasman42@gmail.com>2020-05-19 11:06:27 +0300
commitb96ccb5126b29fa9ff014103e350cfa3c94d376a (patch)
treef3c3928777e7c91f1a98f1ce6cd79ec77a595cb1 /source/blender/blenkernel/BKE_pbvh.h
parentf89b89fa7fcce713fa560ff7be2bb5bbe274e29b (diff)
Fix T76865: Vertex paint draws hidden but cannot be painted onto
Diffstat (limited to 'source/blender/blenkernel/BKE_pbvh.h')
-rw-r--r--source/blender/blenkernel/BKE_pbvh.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_pbvh.h b/source/blender/blenkernel/BKE_pbvh.h
index 1779385b97b..1eeb340d071 100644
--- a/source/blender/blenkernel/BKE_pbvh.h
+++ b/source/blender/blenkernel/BKE_pbvh.h
@@ -308,6 +308,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);
@@ -333,6 +335,7 @@ typedef struct PBVHVertexIter {
int gy;
int i;
int index;
+ bool respect_hide;
/* grid */
struct CCGKey key;
@@ -401,9 +404,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]; \