Mesh: skip conversion from edit-mesh to mesh in edit-mode

This resolves a performance regression in 2.8x where every edit-mode
update performed an edit-mesh to mesh conversion.

Now the conversion will be lazily initialized if/when it's required.

New BKE_mesh_wrapper_* functions abstract over mesh data access.
Currently only edit-mesh and regular meshes are supported.
In the future sub-surface meshes may be supported too.
This commit is contained in:
2020-05-25 20:16:42 +10:00
parent df8cbdc696
commit deaff945d0
36 changed files with 860 additions and 184 deletions

View File

@@ -33,6 +33,11 @@ void BKE_editmesh_cache_ensure_vert_normals(struct BMEditMesh *em, struct EditMe
void BKE_editmesh_cache_ensure_poly_centers(struct BMEditMesh *em, struct EditMeshData *emd);
bool BKE_editmesh_cache_calc_minmax(struct BMEditMesh *em,
struct EditMeshData *emd,
float min[3],
float max[3]);
#ifdef __cplusplus
}
#endif