Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-03-11 18:29:51 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-03-11 18:31:01 +0300
commit251c3e9a811d839ab39baae1a84a66c2a6ce102b (patch)
tree6f1529bd1bafc283f52f9438dc1fd395b5940c7c /source/blender/editors/sculpt_paint
parent005084ef62b63645f9189c493f4cdd5b49e7c7d7 (diff)
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.
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_undo.c2
1 files changed, 1 insertions, 1 deletions
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);
}