diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-13 09:37:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-13 09:40:17 +0300 |
commit | a855a763c253fd61fce49002307b2c6f14aa50ed (patch) | |
tree | 11c6a4850194154182a7fb46a1957748cb6a7322 /source/blender/blenkernel/intern/mesh_validate.c | |
parent | a81d0108fc8c7cdea14042e7a59ab00ba2633e72 (diff) | |
parent | fb5597540decca4b490089134890d3e575477e95 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_validate.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh_validate.c | 51 |
1 files changed, 28 insertions, 23 deletions
diff --git a/source/blender/blenkernel/intern/mesh_validate.c b/source/blender/blenkernel/intern/mesh_validate.c index 0dca41e60e6..f974362e4be 100644 --- a/source/blender/blenkernel/intern/mesh_validate.c +++ b/source/blender/blenkernel/intern/mesh_validate.c @@ -212,15 +212,16 @@ static int search_polyloop_cmp(const void *v1, const void *v2) * * \return false if no changes needed to be made. */ -bool BKE_mesh_validate_arrays(Mesh *mesh, - MVert *mverts, unsigned int totvert, - MEdge *medges, unsigned int totedge, - MFace *mfaces, unsigned int totface, - MLoop *mloops, unsigned int totloop, - MPoly *mpolys, unsigned int totpoly, - MDeformVert *dverts, /* assume totvert length */ - const bool do_verbose, const bool do_fixes, - bool *r_changed) +bool BKE_mesh_validate_arrays( + Mesh *mesh, + MVert *mverts, unsigned int totvert, + MEdge *medges, unsigned int totedge, + MFace *mfaces, unsigned int totface, + MLoop *mloops, unsigned int totloop, + MPoly *mpolys, unsigned int totpoly, + MDeformVert *dverts, /* assume totvert length */ + const bool do_verbose, const bool do_fixes, + bool *r_changed) { # define REMOVE_EDGE_TAG(_me) { _me->v2 = _me->v1; free_flag.edges = do_fixes; } (void)0 # define IS_REMOVED_EDGE(_me) (_me->v2 == _me->v1) @@ -875,9 +876,10 @@ bool BKE_mesh_validate_arrays(Mesh *mesh, return is_valid; } -static bool mesh_validate_customdata(CustomData *data, CustomDataMask mask, - const bool do_verbose, const bool do_fixes, - bool *r_change) +static bool mesh_validate_customdata( + CustomData *data, CustomDataMask mask, + const bool do_verbose, const bool do_fixes, + bool *r_change) { bool is_valid = true; bool has_fixes = false; @@ -928,11 +930,12 @@ static bool mesh_validate_customdata(CustomData *data, CustomDataMask mask, /** * \returns is_valid. */ -bool BKE_mesh_validate_all_customdata(CustomData *vdata, CustomData *edata, - CustomData *ldata, CustomData *pdata, - const bool check_meshmask, - const bool do_verbose, const bool do_fixes, - bool *r_change) +bool BKE_mesh_validate_all_customdata( + CustomData *vdata, CustomData *edata, + CustomData *ldata, CustomData *pdata, + const bool check_meshmask, + const bool do_verbose, const bool do_fixes, + bool *r_change) { bool is_valid = true; bool is_change_v, is_change_e, is_change_l, is_change_p; @@ -1229,9 +1232,10 @@ struct EdgeSort { }; /* edges have to be added with lowest index first for sorting */ -static void to_edgesort(struct EdgeSort *ed, - unsigned int v1, unsigned int v2, - char is_loose, short is_draw) +static void to_edgesort( + struct EdgeSort *ed, + unsigned int v1, unsigned int v2, + char is_loose, short is_draw) { if (v1 < v2) { ed->v1 = v1; ed->v2 = v2; @@ -1380,9 +1384,10 @@ void BKE_mesh_calc_edges_legacy(Mesh *me, const bool use_old) MEdge *medge; int totedge = 0; - mesh_calc_edges_mdata(me->mvert, me->mface, me->mloop, me->mpoly, - me->totvert, me->totface, me->totloop, me->totpoly, - use_old, &medge, &totedge); + mesh_calc_edges_mdata( + me->mvert, me->mface, me->mloop, me->mpoly, + me->totvert, me->totface, me->totloop, me->totpoly, + use_old, &medge, &totedge); if (totedge == 0) { /* flag that mesh has edges */ |