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/editors/sculpt_paint
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/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 12dbdc686ec..458aca1279c 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -8077,7 +8077,8 @@ static void sculpt_init_session(Depsgraph *depsgraph, Scene *scene, Object *ob)
/* Update the Face Sets visibility with the vertex visibility changes that may have been done
* outside Sculpt Mode */
- SCULPT_visibility_sync_all_vertex_to_face_sets(ob->sculpt);
+ Mesh *mesh = ob->data;
+ BKE_sculpt_face_sets_ensure_from_base_mesh_visibility(mesh);
}
static int ed_object_sculptmode_flush_recalc_flag(Scene *scene,