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>2013-05-28 18:23:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-28 18:23:07 +0400
commitef4db04da848a9790e502300285ccd17d71b4646 (patch)
tree490b41f9665a7405d348dd0b817d57a3398a706e /source/blender/editors/mesh/mesh_data.c
parentc987aa7df5d4e47b0b141d47d605cc1af18a88c9 (diff)
code cleanup: lots of calls to BKE_mesh_calc_normals_mapping were not using the mapping functionality.
replace ED_mesh_calc_normals with BKE_mesh_calc_normals().
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c38
1 files changed, 1 insertions, 37 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index ed652a7b812..869b2fb8f2d 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -896,8 +896,6 @@ void MESH_OT_customdata_clear_skin(wmOperatorType *ot)
void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
{
- int *polyindex = NULL;
- float (*face_nors)[3];
bool tessface_input = false;
if (mesh->totface > 0 && mesh->totpoly == 0) {
@@ -920,28 +918,7 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges, int calc_tessface)
BKE_mesh_tessface_clear(mesh);
}
- /* note on this if/else - looks like these layers are not needed
- * so rather then add poly-index layer and calculate normals for it
- * calculate normals only for the mvert's. - campbell */
-#ifdef USE_BMESH_MPOLY_NORMALS
- polyindex = CustomData_get_layer(&mesh->fdata, CD_ORIGINDEX);
- /* add a normals layer for tessellated faces, a tessface normal will
- * contain the normal of the poly the face was tessellated from. */
- face_nors = CustomData_add_layer(&mesh->fdata, CD_NORMAL, CD_CALLOC, NULL, mesh->totface);
-
- BKE_mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly,
- mesh->totloop, mesh->totpoly,
- NULL /* polyNors_r */,
- mesh->mface, mesh->totface,
- polyindex, face_nors, false);
-#else
- BKE_mesh_calc_normals(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL);
- (void)polyindex;
- (void)face_nors;
-#endif
+ BKE_mesh_calc_normals(mesh);
DAG_id_tag_update(&mesh->id, 0);
WM_event_add_notifier(C, NC_GEOM | ND_DATA, mesh);
@@ -1257,19 +1234,6 @@ void ED_mesh_polys_add(Mesh *mesh, ReportList *reports, int count)
mesh_add_polys(mesh, count);
}
-void ED_mesh_calc_normals(Mesh *mesh)
-{
-#ifdef USE_BMESH_MPOLY_NORMALS
- BKE_mesh_calc_normals_mapping_ex(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL, NULL, 0, NULL, NULL, false);
-#else
- BKE_mesh_calc_normals(mesh->mvert, mesh->totvert,
- mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly,
- NULL);
-#endif
-}
-
void ED_mesh_calc_tessface(Mesh *mesh)
{
if (mesh->edit_btmesh) {