[Bf-blender-cvs] [3c9956a3ace] master: Fix T73707: Missing mesh normals update on sculpt undo
Pablo Dobarro
noreply at git.blender.org
Sun Mar 1 19:36:15 CET 2020
Commit: 3c9956a3ace1b88e84353200c352fbaa20360b3a
Author: Pablo Dobarro
Date: Sun Mar 1 19:35:30 2020 +0100
Branches: master
https://developer.blender.org/rB3c9956a3ace1b88e84353200c352fbaa20360b3a
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
===================================================================
M source/blender/editors/sculpt_paint/sculpt_undo.c
===================================================================
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) {
More information about the Bf-blender-cvs
mailing list