From 425da6206f75b9218cf4123ac1b9cdeaf7f86bb1 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 21 Jun 2010 20:10:59 +0000 Subject: [#22262] Sculpting shape keys using the Smooth brush switches the shape to the Basis PBVH used the same verts array as mesh data and shape key/reference key coords were applying on the mesh data, so on some refreshing undeformed mesh was displayed. Added utility functions to get vert coords from key block, apply new vert coords on keyblock and function to apply coords on bpvh, so now pbvh uses it's ovn vertex array and no changes are making to the mesh data. Additional change: Store key block name in SculptUndoNode, so now shape wouldn't be copied to wrong keyblock on undo --- source/blender/blenlib/BLI_pbvh.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/blenlib/BLI_pbvh.h') diff --git a/source/blender/blenlib/BLI_pbvh.h b/source/blender/blenlib/BLI_pbvh.h index e32e85e70ec..519e3ddde1d 100644 --- a/source/blender/blenlib/BLI_pbvh.h +++ b/source/blender/blenlib/BLI_pbvh.h @@ -114,6 +114,12 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot void BLI_pbvh_grids_update(PBVH *bvh, struct DMGridData **grids, struct DMGridAdjacency *gridadj, void **gridfaces); +/* vertex deformer */ +float (*BLI_pbvh_get_vertCos(struct PBVH *pbvh))[3]; +void BLI_pbvh_apply_vertCos(struct PBVH *pbvh, float (*vertCos)[3]); +int BLI_pbvh_isDeformed(struct PBVH *pbvh); + + /* Vertex Iterator */ /* this iterator has quite a lot of code, but it's designed to: -- cgit v1.2.3