diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-27 12:39:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-27 12:39:55 +0400 |
commit | de14457abfc66c3cb3d90963022bea78bf57db7f (patch) | |
tree | 4609849183243ea9aef8ec59661dfa626f45ffd8 /source/blender/blenkernel/BKE_mesh.h | |
parent | dab71f9b12b34967309ea3f90707da53413b4544 (diff) |
option to save bmesh files in older mesh format so they can load in older versoons of blender.
- saves UV's and VCols
- skips NGons
- resulting files load in both BMesh and Trunk.
TODO - add an option in the UI to access this.
Diffstat (limited to 'source/blender/blenkernel/BKE_mesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_mesh.h | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/source/blender/blenkernel/BKE_mesh.h b/source/blender/blenkernel/BKE_mesh.h index e1eb34782ff..9b5e38dfea7 100644 --- a/source/blender/blenkernel/BKE_mesh.h +++ b/source/blender/blenkernel/BKE_mesh.h @@ -61,22 +61,27 @@ extern "C" { struct BMesh *BKE_mesh_to_bmesh(struct Mesh *me, struct Object *ob); /* - this function recreates a tesselation. - returns number of tesselation faces. - - use_poly_origindex sets whether or not the tesselation faces' origindex - layer should point to original poly indices or real poly indices. - - use_face_origindex sets the tesselation faces' origindex layer - to point to the tesselation faces themselves, not the polys. - - if both of the above are 0, it'll use the indices of the mpolys of the MPoly - data in pdata, and ignore the origindex layer altogether. + * this function recreates a tesselation. + * returns number of tesselation faces. + * + * use_poly_origindex sets whether or not the tesselation faces' origindex + * layer should point to original poly indices or real poly indices. + * + * use_face_origindex sets the tesselation faces' origindex layer + * to point to the tesselation faces themselves, not the polys. + * + * if both of the above are 0, it'll use the indices of the mpolys of the MPoly + * data in pdata, and ignore the origindex layer altogether. */ int mesh_recalcTesselation(struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, struct MVert *mvert, int totface, int totloop, int totpoly); +/* for forwards compat only quad->tri polys to mface, skip ngons. + */ +int mesh_mpoly_to_mface(struct CustomData *fdata, struct CustomData *ldata, + struct CustomData *pdata, int totface, int totloop, int totpoly); + /*calculates a face normal.*/ void mesh_calc_poly_normal(struct MPoly *mpoly, struct MLoop *loopstart, struct MVert *mvarray, float no[3]); @@ -207,9 +212,9 @@ void BKE_mesh_calc_edges(struct Mesh *mesh, int update); void BKE_mesh_ensure_navmesh(struct Mesh *me); /*convert a triangle of loop facedata to mface facedata*/ -void mesh_loops_to_tri_corners(struct CustomData *fdata, struct CustomData *ldata, - struct CustomData *pdata, int lindex[3], int findex, - int polyindex); +void mesh_loops_to_mface_corners(struct CustomData *fdata, struct CustomData *ldata, + struct CustomData *pdata, int lindex[4], int findex, + const int polyindex, const int mf_len); #ifdef __cplusplus } |