From d5ec62a0c3a489d94d77854b563f7c42a5a9d174 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 18 Jun 2018 11:14:00 +0200 Subject: Multires: Remove unused function It uses derived mesh, and relies on scene stored in modifier data. So port is needed anyway. --- source/blender/bmesh/intern/bmesh_mesh.c | 53 -------------------------------- 1 file changed, 53 deletions(-) (limited to 'source/blender/bmesh/intern/bmesh_mesh.c') diff --git a/source/blender/bmesh/intern/bmesh_mesh.c b/source/blender/bmesh/intern/bmesh_mesh.c index 5a04fcaa490..442cd9275ec 100644 --- a/source/blender/bmesh/intern/bmesh_mesh.c +++ b/source/blender/bmesh/intern/bmesh_mesh.c @@ -1041,59 +1041,6 @@ void BM_edges_sharp_from_angle_set(BMesh *bm, const float split_angle) bm_mesh_edges_sharp_tag(bm, NULL, NULL, NULL, split_angle, true); } -static void UNUSED_FUNCTION(bm_mdisps_space_set)( - Object *ob, BMesh *bm, int from, int to) -{ - /* switch multires data out of tangent space */ - if (CustomData_has_layer(&bm->ldata, CD_MDISPS)) { - BMEditMesh *em = BKE_editmesh_create(bm, false); - DerivedMesh *dm = CDDM_from_editbmesh(em, true, false); - MDisps *mdisps; - BMFace *f; - BMIter iter; - // int i = 0; // UNUSED - - multires_set_space(dm, ob, from, to); - - mdisps = CustomData_get_layer(&dm->loopData, CD_MDISPS); - - BM_ITER_MESH (f, &iter, bm, BM_FACES_OF_MESH) { - BMLoop *l; - BMIter liter; - BM_ITER_ELEM (l, &liter, f, BM_LOOPS_OF_FACE) { - MDisps *lmd = CustomData_bmesh_get(&bm->ldata, l->head.data, CD_MDISPS); - - if (!lmd->disps) { - printf("%s: warning - 'lmd->disps' == NULL\n", __func__); - } - - if (lmd->disps && lmd->totdisp == mdisps->totdisp) { - memcpy(lmd->disps, mdisps->disps, sizeof(float) * 3 * lmd->totdisp); - } - else if (mdisps->disps) { - if (lmd->disps) - MEM_freeN(lmd->disps); - - lmd->disps = MEM_dupallocN(mdisps->disps); - lmd->totdisp = mdisps->totdisp; - lmd->level = mdisps->level; - } - - mdisps++; - // i += 1; - } - } - - dm->needsFree = 1; - dm->release(dm); - - /* setting this to NULL prevents BKE_editmesh_free from freeing it */ - em->bm = NULL; - BKE_editmesh_free(em); - MEM_freeN(em); - } -} - /** * \brief BMesh Begin Edit * -- cgit v1.2.3