From 2c1650ae8fd5ec1bdcb170a5f749d55f8bf61e62 Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Mon, 12 Sep 2022 10:50:51 -0700 Subject: Sculpt: Fix T100608: SCULPT_UNDO_FACE_SETS broken for redo Always swap values when restoring sculpt undo data. --- source/blender/editors/sculpt_paint/sculpt_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender') 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; } -- cgit v1.2.3