[Bf-blender-cvs] [b0fe0e6a304] master: Cleanup: Make function static

Hans Goudey noreply at git.blender.org
Thu Jun 23 20:03:41 CEST 2022


Commit: b0fe0e6a3047e18d35d0f6ca8e9fc39f60e9f787
Author: Hans Goudey
Date:   Thu Jun 23 13:03:31 2022 -0500
Branches: master
https://developer.blender.org/rBb0fe0e6a3047e18d35d0f6ca8e9fc39f60e9f787

Cleanup: Make function static

===================================================================

M	source/blender/blenkernel/BKE_mesh.h
M	source/blender/blenkernel/intern/mesh_tessellate.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h
index 8e038a1d3d9..66e0ff8e81a 100644
--- a/source/blender/blenkernel/BKE_mesh.h
+++ b/source/blender/blenkernel/BKE_mesh.h
@@ -336,21 +336,10 @@ void BKE_mesh_vert_coords_apply(struct Mesh *mesh, const float (*vert_coords)[3]
 /**
  * Recreate #MFace Tessellation.
  *
- * \param do_face_nor_copy: Controls whether the normals from the poly
- * are copied to the tessellated faces.
- *
- * \return number of tessellation faces.
- *
  * \note This doesn't use multi-threading like #BKE_mesh_recalc_looptri since
  * it's not used in many places and #MFace should be phased out.
  */
-int BKE_mesh_tessface_calc_ex(struct CustomData *fdata,
-                              struct CustomData *ldata,
-                              struct CustomData *pdata,
-                              struct MVert *mvert,
-                              int totface,
-                              int totloop,
-                              int totpoly);
+
 void BKE_mesh_tessface_calc(struct Mesh *mesh);
 
 /**
@@ -897,9 +886,6 @@ enum {
  * Actually this later behavior could apply to the Mirror Modifier as well,
  * but the additional checks are costly and not necessary in the case of mirror,
  * because each vertex is only merged to its own mirror.
- *
- * \note #BKE_mesh_tessface_calc_ex has to run on the returned DM
- * if you want to access tess-faces.
  */
 struct Mesh *BKE_mesh_merge_verts(struct Mesh *mesh,
                                   const int *vtargetmap,
diff --git a/source/blender/blenkernel/intern/mesh_tessellate.c b/source/blender/blenkernel/intern/mesh_tessellate.c
index 7cb656d2357..71d5722cb0e 100644
--- a/source/blender/blenkernel/intern/mesh_tessellate.c
+++ b/source/blender/blenkernel/intern/mesh_tessellate.c
@@ -138,7 +138,7 @@ static void mesh_loops_to_tessdata(CustomData *fdata,
   }
 }
 
-int BKE_mesh_tessface_calc_ex(CustomData *fdata,
+static int mesh_tessface_calc(CustomData *fdata,
                               CustomData *ldata,
                               CustomData *pdata,
                               MVert *mvert,
@@ -382,13 +382,13 @@ int BKE_mesh_tessface_calc_ex(CustomData *fdata,
 
 void BKE_mesh_tessface_calc(Mesh *mesh)
 {
-  mesh->totface = BKE_mesh_tessface_calc_ex(&mesh->fdata,
-                                            &mesh->ldata,
-                                            &mesh->pdata,
-                                            mesh->mvert,
-                                            mesh->totface,
-                                            mesh->totloop,
-                                            mesh->totpoly);
+  mesh->totface = mesh_tessface_calc(&mesh->fdata,
+                                     &mesh->ldata,
+                                     &mesh->pdata,
+                                     mesh->mvert,
+                                     mesh->totface,
+                                     mesh->totloop,
+                                     mesh->totpoly);
 
   BKE_mesh_update_customdata_pointers(mesh, true);
 }



More information about the Bf-blender-cvs mailing list