[Bf-blender-cvs] [251c3e9a811] master: Sculpt: Fix undo when shape keys are used
Sergey Sharybin
noreply at git.blender.org
Mon Mar 11 16:31:07 CET 2019
Commit: 251c3e9a811d839ab39baae1a84a66c2a6ce102b
Author: Sergey Sharybin
Date: Mon Mar 11 16:29:51 2019 +0100
Branches: master
https://developer.blender.org/rB251c3e9a811d839ab39baae1a84a66c2a6ce102b
Sculpt: Fix undo when shape keys are used
Can not use undo node's total vertices count, it only contains
single PBVH node vertex count. Need to pass an entire key block
number of vertices.
===================================================================
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 8c934b6a16a..9c76292aaa7 100644
--- a/source/blender/editors/sculpt_paint/sculpt_undo.c
+++ b/source/blender/editors/sculpt_paint/sculpt_undo.c
@@ -194,7 +194,7 @@ static bool sculpt_undo_restore_coords(bContext *C, SculptUndoNode *unode)
/* pbvh uses it's own mvert array, so coords should be */
/* propagated to pbvh here */
- BKE_pbvh_apply_vertCos(ss->pbvh, vertCos, unode->totvert);
+ BKE_pbvh_apply_vertCos(ss->pbvh, vertCos, ss->kb->totelem);
MEM_freeN(vertCos);
}
More information about the Bf-blender-cvs
mailing list