diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-09-15 06:09:49 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-09-15 06:33:34 +0300 |
commit | 0b6d7bab5a148b316a9067e30cda9155af331777 (patch) | |
tree | 9d4dfd03b1b62c9fc366ea50cfc07bfb5ce225db /source/blender/bmesh/intern | |
parent | 971cc0ae03113eb0efe051d11aeae25cfe83d8f9 (diff) |
Cleanup: remove redundant indexing value
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_mesh_convert.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/bmesh/intern/bmesh_mesh_convert.c b/source/blender/bmesh/intern/bmesh_mesh_convert.c index 2269837cc8e..e30a0ca984a 100644 --- a/source/blender/bmesh/intern/bmesh_mesh_convert.c +++ b/source/blender/bmesh/intern/bmesh_mesh_convert.c @@ -829,7 +829,6 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh /* Go through and find any shape-key custom-data layers * that might not have corresponding KeyBlocks, and add them if necessary. */ - j = 0; for (i = 0; i < bm->vdata.totlayer; i++) { if (bm->vdata.layers[i].type != CD_SHAPEKEY) { continue; @@ -845,8 +844,6 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh currkey = BKE_keyblock_add(me->key, bm->vdata.layers[i].name); currkey->uid = bm->vdata.layers[i].uid; } - - j++; } /* Editing the base key should update others. */ @@ -897,8 +894,8 @@ void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMesh const float(*ofs_pt)[3] = ofs; float *newkey, (*oldkey)[3], *fp; - j = bm_to_mesh_shape_layer_index_from_kb(bm, currkey); - const int cd_shape_offset = CustomData_get_n_offset(&bm->vdata, CD_SHAPEKEY, j); + const int currkey_uuid = bm_to_mesh_shape_layer_index_from_kb(bm, currkey); + const int cd_shape_offset = CustomData_get_n_offset(&bm->vdata, CD_SHAPEKEY, currkey_uuid); const bool apply_offset = (cd_shape_offset != -1) && (ofs != NULL) && (currkey != actkey) && (bm->shapenr - 1 == currkey->relative); |