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
path: root/source
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2019-10-31 16:35:50 +0300
committerPablo Dobarro <pablodp606@gmail.com>2019-10-31 16:35:50 +0300
commit2de5b4864970c6f9d273862c2c3d7ed1585f8628 (patch)
treeebc310419182d0ae0e63fa32f5955c5a64fc3211 /source
parent09e8b0ee7a8e84d8ffa78ad6d443fbbc1d0c962c (diff)
parent90fd75c869c01df27b68e0e2836aa3e4fdfcb429 (diff)
Merge branch 'blender-v2.81-release'
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 5d95cc80280..fc990c01bfb 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -77,6 +77,7 @@ static UndoSculpt *sculpt_undo_get_nodes(void);
static void update_cb(PBVHNode *node, void *rebuild)
{
BKE_pbvh_node_mark_update(node);
+ BKE_pbvh_node_mark_update_mask(node);
if (*((bool *)rebuild)) {
BKE_pbvh_node_mark_rebuild_draw(node);
}
@@ -497,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;
+ bool update = false, rebuild = false, update_mask = false;
bool need_mask = false;
for (unode = lb->first; unode; unode = unode->next) {
@@ -579,6 +580,7 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
case SCULPT_UNDO_MASK:
if (sculpt_undo_restore_mask(C, unode)) {
update = true;
+ update_mask = true;
}
break;
@@ -616,6 +618,9 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
};
BKE_pbvh_search_callback(ss->pbvh, NULL, NULL, update_cb_partial, &data);
BKE_pbvh_update_bounds(ss->pbvh, PBVH_UpdateBB | PBVH_UpdateOriginalBB | PBVH_UpdateRedraw);
+ if (update_mask) {
+ BKE_pbvh_update_vertex_data(ss->pbvh, PBVH_UpdateMask);
+ }
if (BKE_sculpt_multires_active(scene, ob)) {
if (rebuild) {