diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-24 03:37:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-24 03:37:44 +0300 |
commit | 901ccfab52ada8e46a61c1dce56fa43c291fb935 (patch) | |
tree | ecfeb42dc374140b99122f4b99e07764b5da2b8d /source/blender/editors | |
parent | 134db5618ae7cff626f9f201bb1037aa71c5d1e8 (diff) |
Fix T57366: Mesh.from_pydata invalid loose-edge state
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/include/ED_mesh.h | 2 | ||||
-rw-r--r-- | source/blender/editors/mesh/mesh_data.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h index da6fd1a6b53..a6db1870106 100644 --- a/source/blender/editors/include/ED_mesh.h +++ b/source/blender/editors/include/ED_mesh.h @@ -319,7 +319,7 @@ void ED_mesh_edges_remove(struct Mesh *mesh, struct ReportList *reports, int cou void ED_mesh_vertices_remove(struct Mesh *mesh, struct ReportList *reports, int count); void ED_mesh_calc_tessface(struct Mesh *mesh, bool free_mpoly); -void ED_mesh_update(struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_tessface); +void ED_mesh_update(struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_edges_loose, bool calc_tessface); void ED_mesh_uv_texture_ensure(struct Mesh *me, const char *name); int ED_mesh_uv_texture_add(struct Mesh *me, const char *name, const bool active_set); diff --git a/source/blender/editors/mesh/mesh_data.c b/source/blender/editors/mesh/mesh_data.c index 438cbb8da91..2a918560ba8 100644 --- a/source/blender/editors/mesh/mesh_data.c +++ b/source/blender/editors/mesh/mesh_data.c @@ -877,7 +877,7 @@ void MESH_OT_customdata_custom_splitnormals_clear(wmOperatorType *ot) /************************** Add Geometry Layers *************************/ -void ED_mesh_update(Mesh *mesh, bContext *C, bool calc_edges, bool calc_tessface) +void ED_mesh_update(Mesh *mesh, bContext *C, bool calc_edges, bool calc_edges_loose, bool calc_tessface) { bool tessface_input = false; @@ -888,6 +888,10 @@ void ED_mesh_update(Mesh *mesh, bContext *C, bool calc_edges, bool calc_tessface tessface_input = true; } + if (calc_edges_loose && mesh->totedge) { + BKE_mesh_calc_edges_loose(mesh); + } + if (calc_edges || ((mesh->totpoly || mesh->totface) && mesh->totedge == 0)) BKE_mesh_calc_edges(mesh, calc_edges, true); |