Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/mesh/mesh_data.c')
-rw-r--r--source/blender/editors/mesh/mesh_data.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c
index 3c54848e9ea..d3d043501dc 100644
--- a/source/blender/editors/mesh/mesh_data.c
+++ b/source/blender/editors/mesh/mesh_data.c
@@ -906,7 +906,7 @@ static void mesh_add_edges(Mesh *mesh, int len)
mesh->totedge = totedge;
}
-static void mesh_add_faces(Mesh *mesh, int len)
+static void mesh_add_tessfaces(Mesh *mesh, int len)
{
CustomData fdata;
MFace *mface;
@@ -1047,14 +1047,19 @@ void ED_mesh_geometry_add(Mesh *mesh, ReportList *reports, int verts, int edges,
}
#endif
-void ED_mesh_faces_add(Mesh *mesh, ReportList *reports, int count)
+void ED_mesh_tessfaces_add(Mesh *mesh, ReportList *reports, int count)
{
if (mesh->edit_btmesh) {
- BKE_report(reports, RPT_ERROR, "Can't add faces in edit mode");
+ BKE_report(reports, RPT_ERROR, "Can't add tessfaces in edit mode");
return;
}
- mesh_add_faces(mesh, count);
+ if (mesh->mpoly) {
+ BKE_report(reports, RPT_ERROR, "Can't add tessfaces to a mesh that already has polygons");
+ return;
+ }
+
+ mesh_add_tessfaces(mesh, count);
}
void ED_mesh_edges_add(Mesh *mesh, ReportList *reports, int count)