[Bf-blender-cvs] [2c1650ae8fd] master: Sculpt: Fix T100608: SCULPT_UNDO_FACE_SETS broken for redo

Joseph Eagar noreply at git.blender.org
Mon Sep 12 19:51:56 CEST 2022


Commit: 2c1650ae8fd5ec1bdcb170a5f749d55f8bf61e62
Author: Joseph Eagar
Date:   Mon Sep 12 10:50:51 2022 -0700
Branches: master
https://developer.blender.org/rB2c1650ae8fd5ec1bdcb170a5f749d55f8bf61e62

Sculpt: Fix T100608: SCULPT_UNDO_FACE_SETS broken for redo

Always swap values when restoring sculpt undo data.

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

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 22928a8c934..af94cad88f3 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -479,7 +479,7 @@ static bool sculpt_undo_restore_face_sets(bContext *C, SculptUndoNode *unode)
   int *face_sets = CustomData_add_layer(
       &me->pdata, CD_SCULPT_FACE_SETS, CD_CONSTRUCT, NULL, me->totpoly);
   for (int i = 0; i < me->totpoly; i++) {
-    face_sets[i] = unode->face_sets[i];
+    SWAP(int, face_sets[i], unode->face_sets[i]);
   }
   return false;
 }



More information about the Bf-blender-cvs mailing list