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-03-01 21:35:30 +0300
committerPablo Dobarro <pablo@pop-os.localdomain>2020-03-01 21:35:50 +0300
commit3c9956a3ace1b88e84353200c352fbaa20360b3a (patch)
treee02670cc290c4ec855ba66249ec4f1eabdf8af16 /source/blender/editors/sculpt_paint/sculpt_undo.c
parenta489d77c5be4e2f1e7e1fac3a3271bb7bca293af (diff)
Fix T73707: Missing mesh normals update on sculpt undo
When sculpting on multi user data normals needs to be recalculated to avoid artifacts. I refactored that line to make it more readable. Reviewed By: brecht Maniphest Tasks: T73707 Differential Revision: https://developer.blender.org/D6957
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_undo.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_undo.c b/source/blender/editors/sculpt_paint/sculpt_undo.c
index bc4ed0bf7bf..044d5b3c0b0 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -632,14 +632,14 @@ static void sculpt_undo_restore_list(bContext *C, Depsgraph *depsgraph, ListBase
}
}
- tag_update |= ID_REAL_USERS(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d);
+ tag_update |= ID_REAL_USERS(ob->data) > 1 || !BKE_sculptsession_use_pbvh_draw(ob, v3d) ||
+ ss->shapekey_active || ss->deform_modifiers_active;
- if (ss->shapekey_active || ss->deform_modifiers_active) {
+ if (tag_update) {
Mesh *mesh = ob->data;
BKE_mesh_calc_normals(mesh);
BKE_sculptsession_free_deformMats(ss);
- tag_update |= true;
}
if (update_visibility) {