From 877f44162853664791f0ff4fa93f856384d0eed7 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 28 Feb 2016 15:29:56 +0100 Subject: 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 --- source/blender/blenkernel/BKE_mesh.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/blenkernel/BKE_mesh.h') 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, -- cgit v1.2.3