diff options
author | Pablo Dobarro <pablodp606> | 2020-03-01 21:35:30 +0300 |
---|---|---|
committer | Pablo Dobarro <pablo@pop-os.localdomain> | 2020-03-01 21:35:50 +0300 |
commit | 3c9956a3ace1b88e84353200c352fbaa20360b3a (patch) | |
tree | e02670cc290c4ec855ba66249ec4f1eabdf8af16 | |
parent | a489d77c5be4e2f1e7e1fac3a3271bb7bca293af (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
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_undo.c | 6 |
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) { |