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:
authorCampbell Barton <ideasman42@gmail.com>2016-04-29 15:33:06 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-04-29 16:39:50 +0300
commit6d0cae56e84306ed64a51005c4fb1811a40822b7 (patch)
treede25f4c347865a2aefe7d33b8ab5920d35718254 /source/blender/editors/sculpt_paint/sculpt.c
parentb5ce2bbef7a91f81c3556f2ddf6dd5f21161bc91 (diff)
Fix T48290: Hook fails after deleting geometry
Now CD_SHAPEKEY_INDEX customdata is stored in edit-mode when hooks and vertex parents are used. This also fixes a bug where undo would loose key-index data. Move to structs for BM_mesh_bm_to/from_me to avoid passing many argument, which mostly aren't used.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 40ff662a2c2..7ebc050978a 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5003,7 +5003,10 @@ void sculpt_dynamic_topology_enable(bContext *C)
/* Create triangles-only BMesh */
ss->bm = BM_mesh_create(&allocsize);
- BM_mesh_bm_from_me(ss->bm, me, true, true, ob->shapenr);
+ BM_mesh_bm_from_me(
+ ss->bm, me, (&(struct BMeshFromMeshParams){
+ .calc_face_normal = true, .use_shapekey = true, .active_shapekey = ob->shapenr,
+ }));
sculpt_dynamic_topology_triangulate(ss->bm);
BM_data_layer_add(ss->bm, &ss->bm->vdata, CD_PAINT_MASK);
sculpt_dyntopo_node_layers_add(ss);