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:
authorJoseph Eagar <joeedh@gmail.com>2022-09-29 12:33:24 +0300
committerJoseph Eagar <joeedh@gmail.com>2022-09-29 12:33:59 +0300
commit1494a22a900a91483c91cdb259523e3ce063f9c3 (patch)
tree8924600c5391432bbd8759a69d4fb7d382c85b4f /source
parentf1990bd9005fd7cd68a32618116b78356912659f (diff)
Sculpt: Reset automask cache on non-color non-mask undo steps
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index 4d36ff4b623..04c60933c73 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -740,8 +740,13 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
bool update = false, rebuild = false, update_mask = false, update_visibility = false;
bool need_mask = false;
bool need_refine_subdiv = false;
+ bool clear_automask_cache = false;
for (unode = lb->first; unode; unode = unode->next) {
+ if (!ELEM(unode->type, SCULPT_UNDO_COLOR, SCULPT_UNDO_MASK)) {
+ clear_automask_cache = true;
+ }
+
/* Restore pivot. */
copy_v3_v3(ss->pivot_pos, unode->pivot_pos);
copy_v3_v3(ss->pivot_rot, unode->pivot_rot);
@@ -755,6 +760,10 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
}
}
+ if (clear_automask_cache) {
+ ss->last_automasking_settings_hash = 0;
+ }
+
DEG_id_tag_update(&ob->id, ID_RECALC_SHADING);
if (lb->first) {