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:
authorPablo Dobarro <pablodp606@gmail.com>2020-10-12 01:46:50 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-10-15 20:39:11 +0300
commitef5f3070315ea130479c1c646ef889c98825b475 (patch)
tree1051df86e857bcbbbcb16766145b32f5ea4f8977 /source/blender/blenkernel/BKE_paint.h
parent750e4e1158bb1bd40c1724e24693cb22c6910f86 (diff)
Sculpt: Use mpoly flags to sync Face Sets visibility
Previously, all Face Set visibility logic was using mvert flags directly to store the visibility state on the vertices while sculpting. As Face Sets are a poly attribute, it is much simpler to use mpoly flags and let BKE_mesh_flush_hidden_from_polys handle the vertex visibility, even for Multires. Now all operators that update the Face Set visibility state will always copy the visibility to the mesh (using poly flags) and the grids, all using the same code. This should fix a lot of visibility glitches and bugs like the following: - Sculpt visibility reset when changing multires levels. - Multires visibility not updating in edit mode. - Single face visibible when surrounded by visibile face set, even when the face set was hidden. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9175
Diffstat (limited to 'source/blender/blenkernel/BKE_paint.h')
-rw-r--r--source/blender/blenkernel/BKE_paint.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_paint.h b/source/blender/blenkernel/BKE_paint.h
index 0d3241ba6b8..150d0d9b011 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -612,6 +612,11 @@ void BKE_sculpt_bvh_update_from_ccg(struct PBVH *pbvh, struct SubdivCCG *subdiv_
* updated according to the face sets. */
void BKE_sculpt_sync_face_set_visibility(struct Mesh *mesh, struct SubdivCCG *subdiv_ccg);
+/* Individual function to sync the Face Set visibility to mesh and grids. */
+void BKE_sculpt_sync_face_sets_visibility_to_base_mesh(struct Mesh *mesh);
+void BKE_sculpt_sync_face_sets_visibility_to_grids(struct Mesh *mesh,
+ struct SubdivCCG *subdiv_ccg);
+
/* Ensures that a Face Set data-layers exists. If it does not, it creates one respecting the
* visibility stored in the vertices of the mesh. If it does, it copies the visibility from the
* mesh to the Face Sets. */