From a4cd1ba8e5c92d7e92d804f2a18005c83d033cde Mon Sep 17 00:00:00 2001 From: Howard Trickey Date: Mon, 1 Aug 2011 11:53:55 +0000 Subject: [PATCH] fixed meshes added via python api have no faces --- source/blender/editors/mesh/mesh_data.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index c4df9801400..a88b678b365 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -613,6 +613,9 @@ void ED_mesh_update(Mesh *mesh, bContext *C, int calc_edges) if(calc_edges || (mesh->totface && mesh->totedge == 0)) BKE_mesh_calc_edges(mesh, calc_edges); + if(mesh->totface > 0 && mesh->totpoly == 0) + convert_mfaces_to_mpolys(mesh); + mesh_calc_normals(mesh->mvert, mesh->totvert, mesh->mloop, mesh->mpoly, mesh->totloop, mesh->totpoly, NULL, NULL, 0, NULL, NULL); DAG_id_tag_update(&mesh->id, 0);