Allocate/free meshes with generic library functions.

This avoids the need to use Mesh-specific functions, and makes allocation
and freeing easy oneliners.
This commit is contained in:
2018-05-03 15:42:55 +02:00
parent 4880e2e75a
commit d8a03c77d7
7 changed files with 29 additions and 47 deletions

View File

@@ -41,6 +41,7 @@
#include "BKE_editmesh.h"
#include "BKE_lattice.h"
#include "BKE_library.h"
#include "BKE_library_query.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
@@ -129,8 +130,7 @@ static void deformVertsEM(
deformVerts(md, ctx, mesh_src, vertexCos, numVerts);
if (!mesh) {
BKE_mesh_free(mesh_src);
MEM_freeN(mesh_src);
BKE_id_free(NULL, mesh_src);
}
}