Exemple #1
0
/*does not free the BMEditMesh struct itself*/
void BKE_editmesh_free(BMEditMesh *em)
{
	BKE_editmesh_free_derivedmesh(em);

	BKE_editmesh_color_free(em);

	if (em->looptris) MEM_freeN(em->looptris);

	if (em->bm)
		BM_mesh_free(em->bm);
}
Exemple #2
0
/*does not free the BMEditMesh struct itself*/
void BKE_editmesh_free(BMEditMesh *em)
{
	BKE_editmesh_free_derivedmesh(em);

	BKE_editmesh_color_free(em);

	if (em->looptris) MEM_freeN(em->looptris);

	/* free preselection item lists */
	if (em->presel_verts) BLI_ghash_free(em->presel_verts, NULL, NULL);
	if (em->presel_edges) BLI_ghash_free(em->presel_edges, NULL, NULL);
	if (em->presel_faces) BLI_ghash_free(em->presel_faces, NULL, NULL);
	
	if (em->prop3d_faces) BLI_ghash_free(em->prop3d_faces, NULL, NULL);
	if (em->prop2d_faces) BLI_ghash_free(em->prop2d_faces, NULL, NULL);
	
	if (em->bm)
		BM_mesh_free(em->bm);
}