Merge branch 'blender2.8' into soc-2018-bevel
[blender.git] / source / blender / blenkernel / intern / mesh_evaluate.c
index 997201fc4d0ae15afd9264aa0e69fa261ed66533..4e1297043d08d2b553b86f758ea62bfb418d829e 100644 (file)
@@ -88,6 +88,20 @@ static void mesh_calc_normals_vert_fallback(MVert *mverts, int numVerts)
        }
 }
 
+/* TODO(Sybren): we can probably rename this to BKE_mesh_calc_normals_mapping(),
+ * and remove the function of the same name below, as that one doesn't seem to be
+ * called anywhere. */
+void BKE_mesh_calc_normals_mapping_simple(struct Mesh *mesh)
+{
+       const bool only_face_normals = CustomData_is_referenced_layer(&mesh->vdata, CD_MVERT);
+
+       BKE_mesh_calc_normals_mapping_ex(
+                   mesh->mvert, mesh->totvert,
+                   mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL,
+                   mesh->mface, mesh->totface, NULL, NULL,
+                   only_face_normals);
+}
+
 /* Calculate vertex and face normals, face normals are returned in *r_faceNors if non-NULL
  * and vertex normals are stored in actual mverts.
  */