[Bf-blender-cvs] [0050a044fa4] master: Cleanup: remove unused derived-mesh API calls
Campbell Barton
noreply at git.blender.org
Wed Aug 21 03:43:14 CEST 2019
Commit: 0050a044fa4d536a0382a72618709a57c6e30805
Author: Campbell Barton
Date: Wed Aug 21 10:55:47 2019 +1000
Branches: master
https://developer.blender.org/rB0050a044fa4d536a0382a72618709a57c6e30805
Cleanup: remove unused derived-mesh API calls
===================================================================
M source/blender/blenkernel/BKE_DerivedMesh.h
M source/blender/blenkernel/BKE_cdderivedmesh.h
M source/blender/blenkernel/intern/DerivedMesh.c
M source/blender/blenkernel/intern/cdderivedmesh.c
M source/blender/blenkernel/intern/subsurf_ccg.c
M source/blender/editors/uvedit/uvedit_unwrap_ops.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h
index d215f214a6d..bc115fec35a 100644
--- a/source/blender/blenkernel/BKE_DerivedMesh.h
+++ b/source/blender/blenkernel/BKE_DerivedMesh.h
@@ -150,23 +150,6 @@ struct DerivedMesh {
/** Calculate vert and face normals */
void (*calcNormals)(DerivedMesh *dm);
- /** Calculate loop (split) normals */
- void (*calcLoopNormals)(DerivedMesh *dm, const bool use_split_normals, const float split_angle);
-
- /** Calculate loop (split) normals, and returns split loop normal spacearr. */
- void (*calcLoopNormalsSpaceArray)(DerivedMesh *dm,
- const bool use_split_normals,
- const float split_angle,
- struct MLoopNorSpaceArray *r_lnors_spacearr);
-
- void (*calcLoopTangents)(DerivedMesh *dm,
- bool calc_active_tangent,
- const char (*tangent_names)[MAX_NAME],
- int tangent_names_count);
-
- /** Recalculates mesh tessellation */
- void (*recalcTessellation)(DerivedMesh *dm);
-
/** Loop tessellation cache (WARNING! Only call inside threading-protected code!) */
void (*recalcLoopTri)(DerivedMesh *dm);
/** accessor functions */
@@ -261,51 +244,6 @@ struct DerivedMesh {
DMFlagMat *(*getGridFlagMats)(DerivedMesh *dm);
unsigned int **(*getGridHidden)(DerivedMesh *dm);
- /** Iterate over each mapped vertex in the derived mesh, calling the
- * given function with the original vert and the mapped vert's new
- * coordinate and normal. For historical reasons the normal can be
- * passed as a float or short array, only one should be non-NULL.
- */
- void (*foreachMappedVert)(DerivedMesh *dm,
- void (*func)(void *userData,
- int index,
- const float co[3],
- const float no_f[3],
- const short no_s[3]),
- void *userData,
- DMForeachFlag flag);
-
- /** Iterate over each mapped edge in the derived mesh, calling the
- * given function with the original edge and the mapped edge's new
- * coordinates.
- */
- void (*foreachMappedEdge)(
- DerivedMesh *dm,
- void (*func)(void *userData, int index, const float v0co[3], const float v1co[3]),
- void *userData);
-
- /** Iterate over each mapped loop in the derived mesh, calling the given function
- * with the original loop index and the mapped loops's new coordinate and normal.
- */
- void (*foreachMappedLoop)(DerivedMesh *dm,
- void (*func)(void *userData,
- int vertex_index,
- int face_index,
- const float co[3],
- const float no[3]),
- void *userData,
- DMForeachFlag flag);
-
- /** Iterate over each mapped face in the derived mesh, calling the
- * given function with the original face and the mapped face's (or
- * faces') center and normal.
- */
- void (*foreachMappedFaceCenter)(
- DerivedMesh *dm,
- void (*func)(void *userData, int index, const float cent[3], const float no[3]),
- void *userData,
- DMForeachFlag flag);
-
/** Iterate over all vertex points, calling DO_MINMAX with given args.
*
* Also called in Editmode
@@ -319,9 +257,6 @@ struct DerivedMesh {
/** Get vertex location, undefined if index is not valid */
void (*getVertCo)(DerivedMesh *dm, int index, float r_co[3]);
- /** Fill the array (of length .getNumVerts()) with all vertex locations */
- void (*getVertCos)(DerivedMesh *dm, float (*r_cos)[3]);
-
/** Get smooth vertex normal, undefined if index is not valid */
void (*getVertNo)(DerivedMesh *dm, int index, float r_no[3]);
void (*getPolyNo)(DerivedMesh *dm, int index, float r_no[3]);
@@ -330,10 +265,6 @@ struct DerivedMesh {
*/
const struct MeshElemMap *(*getPolyMap)(struct Object *ob, DerivedMesh *dm);
- /** Get the BVH used for paint modes
- */
- struct PBVH *(*getPBVH)(struct Object *ob, DerivedMesh *dm);
-
/** Release reference to the DerivedMesh. This function decides internally
* if the DerivedMesh will be freed, or cached for later use. */
void (*release)(DerivedMesh *dm);
@@ -446,8 +377,6 @@ DerivedMesh *mesh_create_derived_render(struct Depsgraph *depsgraph,
const struct CustomData_MeshMasks *dataMask);
/* same as above but wont use render settings */
-DerivedMesh *mesh_create_derived(struct Mesh *me, float (*vertCos)[3]);
-
struct Mesh *editbmesh_get_eval_cage(struct Depsgraph *depsgraph,
struct Scene *scene,
struct Object *,
diff --git a/source/blender/blenkernel/BKE_cdderivedmesh.h b/source/blender/blenkernel/BKE_cdderivedmesh.h
index 08d53bf0e21..50af6c876b4 100644
--- a/source/blender/blenkernel/BKE_cdderivedmesh.h
+++ b/source/blender/blenkernel/BKE_cdderivedmesh.h
@@ -33,9 +33,7 @@
struct BMEditMesh;
struct CustomData_MeshMasks;
struct DerivedMesh;
-struct MLoopNorSpaceArray;
struct Mesh;
-struct Object;
/* creates a new CDDerivedMesh */
struct DerivedMesh *CDDM_new(int numVerts, int numEdges, int numFaces, int numLoops, int numPolys);
@@ -51,79 +49,16 @@ struct DerivedMesh *CDDM_from_mesh_ex(struct Mesh *mesh,
eCDAllocType alloctype,
const struct CustomData_MeshMasks *mask);
-struct DerivedMesh *CDDM_from_bmesh(struct BMesh *bm, const bool use_mdisps);
-
/* creates a CDDerivedMesh from the given BMEditMesh */
-DerivedMesh *CDDM_from_editbmesh(struct BMEditMesh *em,
- const bool use_mdisps,
- const bool use_tessface);
-
-/* creates a CDDerivedMesh from the given curve object */
-struct DerivedMesh *CDDM_from_curve(struct Object *ob);
-
-/* creates a CDDerivedMesh from the given curve object and specified dispbase */
-/* useful for OrcoDM creation for curves with constructive modifiers */
-DerivedMesh *CDDM_from_curve_displist(struct Object *ob, struct ListBase *dispbase);
+DerivedMesh *CDDM_from_editbmesh(struct BMEditMesh *em, const bool use_mdisps);
/* Copies the given DerivedMesh with verts, faces & edges stored as
* custom element data.
*/
struct DerivedMesh *CDDM_copy(struct DerivedMesh *dm);
-/* creates a CDDerivedMesh with the same layer stack configuration as the
- * given DerivedMesh and containing the requested numbers of elements.
- * elements are initialized to all zeros
- */
-struct DerivedMesh *CDDM_from_template_ex(struct DerivedMesh *source,
- int numVerts,
- int numEdges,
- int numFaces,
- int numLoops,
- int numPolys,
- const struct CustomData_MeshMasks *mask);
-struct DerivedMesh *CDDM_from_template(struct DerivedMesh *source,
- int numVerts,
- int numEdges,
- int numFaces,
- int numLoops,
- int numPolys);
-
-/* applies vertex coordinates or normals to a CDDerivedMesh. if the MVert
- * layer is a referenced layer, it will be duplicate to not overwrite the
- * original
- */
-void CDDM_apply_vert_coords(struct DerivedMesh *cddm, float (*vertCoords)[3]);
-void CDDM_apply_vert_normals(struct DerivedMesh *cddm, short (*vertNormals)[3]);
-
-/* recalculates vertex and face normals for a CDDerivedMesh
- */
-void CDDM_calc_normals_mapping_ex(struct DerivedMesh *dm, const bool only_face_normals);
-void CDDM_calc_normals_mapping(struct DerivedMesh *dm);
-void CDDM_calc_normals(struct DerivedMesh *dm);
-
-void CDDM_calc_loop_normals(struct DerivedMesh *dm,
- const bool use_split_normals,
- const float split_angle);
-void CDDM_calc_loop_normals_spacearr(struct DerivedMesh *dm,
- const bool use_split_normals,
- const float split_angle,
- struct MLoopNorSpaceArray *r_lnors_spacearr);
-
-/* reconstitute face triangulation */
-void CDDM_recalc_tessellation(struct DerivedMesh *dm);
-void CDDM_recalc_tessellation_ex(struct DerivedMesh *dm, const bool do_face_nor_cpy);
-
void CDDM_recalc_looptri(struct DerivedMesh *dm);
-/* lowers the number of vertices/edges/faces in a CDDerivedMesh
- * the layer data stays the same size
- */
-void CDDM_lower_num_verts(struct DerivedMesh *dm, int numVerts);
-void CDDM_lower_num_edges(struct DerivedMesh *dm, int numEdges);
-void CDDM_lower_num_loops(struct DerivedMesh *dm, int numLoops);
-void CDDM_lower_num_polys(struct DerivedMesh *dm, int numPolys);
-void CDDM_lower_num_tessfaces(DerivedMesh *dm, int numTessFaces);
-
/* vertex/edge/face access functions
* should always succeed if index is within bounds
* note these return pointers - any change modifies the internals of the mesh
@@ -145,13 +80,4 @@ struct MFace *CDDM_get_tessfaces(struct DerivedMesh *dm);
struct MLoop *CDDM_get_loops(struct DerivedMesh *dm);
struct MPoly *CDDM_get_polys(struct DerivedMesh *dm);
-/* Assigns news m*** layers to the cddm. Note that you must handle
- * freeing the old ones yourself. Also you must ensure dm->num****Data
- * is correct.*/
-void CDDM_set_mvert(struct DerivedMesh *dm, struct MVert *mvert);
-void CDDM_set_medge(struct DerivedMesh *dm, struct MEdge *medge);
-void CDDM_set_mface(struct DerivedMesh *dm, struct MFace *mface);
-void CDDM_set_mloop(struct DerivedMesh *dm, struct MLoop *mloop);
-void CDD
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list