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>2020-09-29 23:52:43 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-09-29 23:54:36 +0300
commit53804b333a1fe8075fba932ea55b29e8d1e00dad (patch)
tree0e9f58f181dad0b34c6268705d2af80f3c6d8c84 /source/blender/blenkernel/BKE_paint.h
parente0bfd3968c61d3428519a5281580c260d50cc8b5 (diff)
Sculpt: Preserve Mesh visibility from edit mode using the Face Sets
Before this change, when users switch from edit mode to sculpt mode, the entire mesh would be visible. Even if in the edit mesh mode part of it was set to invisible. With this change the visibility is preserved, by creating a separate face set for the visible and invisible parts of the mesh and setting their initial visibility. Implementation details: This adds a function to initialize a new Face Set datalayer taking the current mesh visibility into account which is stored in the ME_HIDE flag of the vertices. Reviewed By: sergey Differential Revision: https://developer.blender.org/D8901
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 dfd7dafe2eb..41185173a0c 100644
--- a/source/blender/blenkernel/BKE_paint.h
+++ b/source/blender/blenkernel/BKE_paint.h
@@ -583,6 +583,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);
+/* Ensures that a Face Set datalayers 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. */
+void BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(struct Mesh *mesh);
+
bool BKE_sculptsession_use_pbvh_draw(const struct Object *ob, const struct View3D *v3d);
enum {