Blender  V3.3
BKE_mesh_legacy_convert.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
4 #pragma once
5 
10 #include "BLI_utildefines.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
16 struct CustomData;
17 struct Mesh;
18 struct MFace;
19 
27 void BKE_mesh_tessface_calc(struct Mesh *mesh);
28 
29 void BKE_mesh_tessface_ensure(struct Mesh *mesh);
30 
31 void BKE_mesh_add_mface_layers(struct CustomData *fdata, struct CustomData *ldata, int total);
32 
37 int BKE_mesh_mface_index_validate(struct MFace *mface,
38  struct CustomData *mfdata,
39  int mfindex,
40  int nr);
41 
43 
58 
59 /* Inlines */
60 
61 /* NOTE(@sybren): Instead of -1 that function uses ORIGINDEX_NONE as defined in BKE_customdata.h,
62  * but I don't want to force every user of BKE_mesh.h to also include that file. */
63 BLI_INLINE int BKE_mesh_origindex_mface_mpoly(const int *index_mf_to_mpoly,
64  const int *index_mp_to_orig,
65  const int i)
66 {
67  const int j = index_mf_to_mpoly[i];
68  return (j != -1) ? (index_mp_to_orig ? index_mp_to_orig[j] : j) : -1;
69 }
70 
71 #ifdef __cplusplus
72 }
73 #endif
void BKE_mesh_do_versions_convert_mfaces_to_mpolys(struct Mesh *mesh)
void BKE_mesh_tessface_ensure(struct Mesh *mesh)
void BKE_mesh_convert_mfaces_to_mpolys(struct Mesh *mesh)
int BKE_mesh_mface_index_validate(struct MFace *mface, struct CustomData *mfdata, int mfindex, int nr)
void BKE_mesh_add_mface_layers(struct CustomData *fdata, struct CustomData *ldata, int total)
void BKE_mesh_tessface_calc(struct Mesh *mesh)
BLI_INLINE int BKE_mesh_origindex_mface_mpoly(const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i)
#define BLI_INLINE