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>2019-12-27 01:52:59 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-01-06 18:59:22 +0300
commit04ddd6f717d51fc40ef6436c33f60d206b0c70b2 (patch)
treec50bd3a9665691b391ddeea19ed18f4fe8345a2f /source/blender/editors/sculpt_paint/sculpt_undo.c
parent55fbb0fd691e61745c0f3f9dc947155231387b7e (diff)
Fix T72700: Missing flush vert visibility on sculpt undo
This was caused by a missing call to BKE_mesh_flush_hidden_from_verts() when a SCULP_UNDO_HIDDEN undo step is processed. Reviewed By: jbakker Maniphest Tasks: T72700 Differential Revision: https://developer.blender.org/D6488
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index fec3bd88f0b..2e77c7cceeb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -498,7 +498,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
SculptSession *ss = ob->sculpt;
SubdivCCG *subdiv_ccg = ss->subdiv_ccg;
SculptUndoNode *unode;
- bool update = false, rebuild = false, update_mask = false;
+ bool update = false, rebuild = false, update_mask = false, update_visibility = false;
bool need_mask = false;
for (unode = lb->first; unode; unode = unode->next) {
@@ -575,6 +575,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
case SCULPT_UNDO_HIDDEN:
if (sculpt_undo_restore_hidden(C, unode)) {
rebuild = true;
+ update_visibility = true;
}
break;
case SCULPT_UNDO_MASK:
@@ -641,6 +642,11 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
tag_update |= true;
}
+ if (BKE_pbvh_type(ss->pbvh) == PBVH_FACES && update_visibility) {
+ Mesh *mesh = ob->data;
+ BKE_mesh_flush_hidden_from_verts(mesh);
+ }
+
if (tag_update) {
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
}