[Bf-blender-cvs] [ae7bea265d0] master: Fix T66312: Undo does not restore normals correctly in sculpt mode

Pablo Dobarro noreply at git.blender.org
Thu Oct 3 15:30:29 CEST 2019


Commit: ae7bea265d0ab48f2cb4636b734bc29ee997a311
Author: Pablo Dobarro
Date:   Wed Sep 25 17:02:07 2019 +0200
Branches: master
https://developer.blender.org/rBae7bea265d0ab48f2cb4636b734bc29ee997a311

Fix T66312: Undo does not restore normals correctly in sculpt mode

Reviewed By: brecht

Maniphest Tasks: T66312

Differential Revision: https://developer.blender.org/D5895

===================================================================

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 788d07f6e78..74e5444bc3e 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -192,24 +192,21 @@ static bool sculpt_undo_restore_coords(bContext *C, Depsgraph *depsgraph, Sculpt
       if (unode->orig_co) {
         if (ss->modifiers_active) {
           for (int i = 0; i < unode->totvert; i++) {
-            if (sculpt_undo_restore_deformed(ss, unode, i, index[i], mvert[index[i]].co)) {
-              mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
-            }
+            sculpt_undo_restore_deformed(ss, unode, i, index[i], mvert[index[i]].co);
+            mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
           }
         }
         else {
           for (int i = 0; i < unode->totvert; i++) {
-            if (test_swap_v3_v3(mvert[index[i]].co, unode->orig_co[i])) {
-              mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
-            }
+            swap_v3_v3(mvert[index[i]].co, unode->orig_co[i]);
+            mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
           }
         }
       }
       else {
         for (int i = 0; i < unode->totvert; i++) {
-          if (test_swap_v3_v3(mvert[index[i]].co, unode->co[i])) {
-            mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
-          }
+          swap_v3_v3(mvert[index[i]].co, unode->co[i]);
+          mvert[index[i]].flag |= ME_VERT_PBVH_UPDATE;
         }
       }
     }



More information about the Bf-blender-cvs mailing list