diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-28 17:29:56 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-02-28 17:29:56 +0300 |
commit | 877f44162853664791f0ff4fa93f856384d0eed7 (patch) | |
tree | ed924b94bebd5cec0ad5455b7e90d481b63ad80a /source/blender/blenkernel/BKE_mesh.h | |
parent | ea76ec2866d11156b689287f4190dfe4e79314b2 (diff) |
BKE_mesh: add polygon flipping tools.
Those new functions invert the winding of polygons, effectively inverting their normals.
A helper was also added to allow swapping two items in customdata layers.
Being able to invert normals outside of BMesh area is very important in several places,
like IO scripts or customnormals modifiers...
Reviewers: campbellbarton
Differential Revision: https://developer.blender.org/D1814
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index f35613f8bf7..b85c605f231 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -317,6 +317,9 @@ void BKE_mesh_convert_mfaces_to_mpolys_ex( int *r_totloop, int *r_totpoly, struct MLoop **r_mloop, struct MPoly **r_mpoly); +void BKE_mesh_polygon_flip(struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata); +void BKE_mesh_polygons_flip(struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata, int totpoly); + /* flush flags */ void BKE_mesh_flush_hidden_from_verts_ex( const struct MVert *mvert, |