diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-01 17:31:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-06-01 17:31:56 +0300 |
commit | 237e17a957ea16d4f326f8babfdb49b8d954e529 (patch) | |
tree | beb289cb17adf0d4b7ad3e539be0f727cb61476c /source/blender/blenkernel/intern | |
parent | 3bc8e88643667e4b5c45ca7cbe8e61934c82c702 (diff) | |
parent | e5d8b04abe0524ea31c1ef158a0cfba83e739b04 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/editderivedmesh.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/group.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/editderivedmesh.c b/source/blender/blenkernel/intern/editderivedmesh.c index 7d895e36be4..c8ae3598097 100644 --- a/source/blender/blenkernel/intern/editderivedmesh.c +++ b/source/blender/blenkernel/intern/editderivedmesh.c @@ -150,6 +150,8 @@ static void emDM_ensurePolyCenters(EditDerivedBMesh *bmdm) const float (*vertexCos)[3]; vertexCos = bmdm->vertexCos; + BM_mesh_elem_index_ensure(bm, BM_VERT); + BM_ITER_MESH_INDEX (efa, &fiter, bm, BM_FACES_OF_MESH, i) { BM_face_calc_center_mean_vcos(bm, efa, polyCos[i], vertexCos); } diff --git a/source/blender/blenkernel/intern/group.c b/source/blender/blenkernel/intern/group.c index 9d5983519d3..f969c932333 100644 --- a/source/blender/blenkernel/intern/group.c +++ b/source/blender/blenkernel/intern/group.c @@ -78,6 +78,8 @@ Group *BKE_group_add(Main *bmain, const char *name) Group *group; group = BKE_libblock_alloc(bmain, ID_GR, name); + id_us_min(&group->id); + id_us_ensure_real(&group->id); group->layer = (1 << 20) - 1; group->preview = NULL; |