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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 90e26f03b2e..673e4d90d99 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -280,7 +280,7 @@ static void sculpt_undo_bmesh_restore_generic(bContext *C,
unode->applied = true;
}
- if (unode->type == SCULPT_UNDO_MASK) {
+ if (ELEM(unode->type, SCULPT_UNDO_MASK, SCULPT_UNDO_MASK)) {
int i, totnode;
PBVHNode **nodes;
@@ -756,7 +756,6 @@ static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob,
if (node) {
switch (type) {
case SCULPT_UNDO_COORDS:
- case SCULPT_UNDO_HIDDEN:
case SCULPT_UNDO_MASK:
/* Before any vertex values get modified, ensure their
* original positions are logged */
@@ -766,6 +765,22 @@ static SculptUndoNode *sculpt_undo_bmesh_push(Object *ob,
BKE_pbvh_vertex_iter_end;
break;
+ case SCULPT_UNDO_HIDDEN:
+ {
+ GSetIterator gs_iter;
+ GSet *faces = BKE_pbvh_bmesh_node_faces(node);
+ BKE_pbvh_vertex_iter_begin(ss->pbvh, node, vd, PBVH_ITER_ALL) {
+ BM_log_vert_before_modified(ss->bm_log, vd.bm_vert, vd.cd_vert_mask_offset);
+ }
+ BKE_pbvh_vertex_iter_end;
+
+ GSET_ITER (gs_iter, faces) {
+ BMFace *f = BLI_gsetIterator_getKey(&gs_iter);
+ BM_log_face_modified(ss->bm_log, f);
+ }
+ break;
+ }
+
case SCULPT_UNDO_DYNTOPO_BEGIN:
case SCULPT_UNDO_DYNTOPO_END:
case SCULPT_UNDO_DYNTOPO_SYMMETRIZE: