27 #define DNA_DEPRECATED_ALLOW
98 const Mesh *mesh_src = (
const Mesh *)id_src;
117 const bool do_tessface = ((mesh_src->
totface != 0) && (mesh_src->
totpoly == 0));
189 flayers = flayers_buff;
195 memset(&
mesh->vdata, 0,
sizeof(
mesh->vdata));
196 vlayers = vlayers_buff;
200 memset(&
mesh->edata, 0,
sizeof(
mesh->edata));
201 elayers = elayers_buff;
206 llayers = llayers_buff;
210 memset(&
mesh->pdata, 0,
sizeof(
mesh->pdata));
211 players = players_buff;
250 #define CD_LAYERS_FREE(id) \
251 if (id && id != id##_buff) { \
262 #undef CD_LAYERS_FREE
308 TFace *tf =
mesh->tface;
320 for (
int i = 0; i < me->
totcol; i++) {
348 .struct_size =
sizeof(
Mesh),
350 .name_plural =
"meshes",
359 .foreach_cache =
NULL,
367 .blend_read_undo_preserve =
NULL,
369 .lib_override_apply_post =
NULL,
390 return "Vertex Weight Mismatch";
392 return "Vertex Group Mismatch";
394 return "Vertex Doesn't Belong To Same Number Of Groups";
396 return "Vertex Color Mismatch";
398 return "UV Mismatch";
400 return "Loop Mismatch";
402 return "Loop Vert Mismatch In Poly Test";
404 return "Loop Vert Mismatch";
406 return "Edge Mismatch";
408 return "Vertex Coordinate Mismatch";
410 return "CustomData Layer Count Mismatch";
412 return "Mesh Comparison Code Unknown";
421 const float thresh_sq = thresh * thresh;
423 int i,
i1 = 0, i2 = 0, tot, j;
425 for (i = 0; i < c1->
totlayer; i++) {
437 for (i = 0; i < c2->
totlayer; i++) {
458 for (i = 0; i < tot; i++) {
478 for (j = 0; j < vtot; j++,
v1++,
v2++) {
493 for (j = 0; j < etot; j++, e1++) {
497 for (j = 0; j < etot; j++, e2++) {
510 for (j = 0; j < ptot; j++, p1++, p2++) {
521 for (k = 0; k < p1->
totloop; k++, lp1++, lp2++) {
522 if (lp1->
v != lp2->
v) {
533 for (j = 0; j < ltot; j++, lp1++, lp2++) {
534 if (lp1->
v != lp2->
v) {
544 for (j = 0; j < ltot; j++, lp1++, lp2++) {
556 for (j = 0; j < ltot; j++, lp1++, lp2++) {
557 if (
abs(lp1->
r - lp2->
r) > thresh ||
abs(lp1->
g - lp2->
g) > thresh ||
558 abs(lp1->
b - lp2->
b) > thresh ||
abs(lp1->
a - lp2->
a) > thresh) {
569 for (j = 0; j < dvtot; j++, dv1++, dv2++) {
577 for (k = 0; k < dv1->
totweight; k++, dw1++, dw2++) {
578 if (dw1->
def_nr != dw2->def_nr) {
603 return "Requires two input meshes";
607 return "Number of verts don't match";
611 return "Number of edges don't match";
615 return "Number of faces don't match";
619 return "Number of loops don't match";
656 if (tottex_tessface != tottex_original || totcol_tessface != totcol_original) {
668 "%s: warning! Tessellation uvs or vcol data got out of sync, "
669 "had to reset!\n CD_MTFACE: %d != CD_MLOOPUV: %d || CD_MCOL: %d != CD_MLOOPCOL: "
716 bool changed =
false;
735 bool changed =
false;
759 if (do_ensure_tess_cd) {
836 if (free_customdata) {
878 int verts_len,
int edges_len,
int tessface_len,
int loops_len,
int polys_len)
941 const bool do_tessface = (tessface_len || ((me_src->
totface != 0) && (me_src->
totpoly == 0)));
949 me_dst->
totface = tessface_len;
983 me_src, verts_len, edges_len, tessface_len, loops_len, polys_len,
CD_MASK_EVERYTHING);
1021 const bool add_key_index,
1027 .calc_face_normal =
false,
1028 .add_key_index = add_key_index,
1029 .use_shapekey =
true,
1030 .active_shapekey = ob->
shapenr,
1036 const Mesh *me_settings)
1047 const Mesh *me_settings)
1090 float loc[3],
size[3];
1097 for (
int a = 0;
a < 3;
a++) {
1098 if (
size[
a] == 0.0f) {
1101 else if (
size[
a] > 0.0f &&
size[
a] < 0.00001f) {
1104 else if (
size[
a] < 0.0f &&
size[
a] > -0.00001f) {
1105 size[
a] = -0.00001f;
1139 if (r_texflag !=
NULL) {
1142 if (r_loc !=
NULL) {
1145 if (r_size !=
NULL) {
1152 float *texloc, *texsize;
1164 Mesh *me = ob->data;
1172 for (
int a = 0;
a < totvert;
a++, mvert++) {
1181 float loc[3],
size[3];
1186 for (
int a = 0;
a < totvert;
a++) {
1187 float *co = orco[
a];
1192 for (
int a = 0;
a < totvert;
a++) {
1193 float *co = orco[
a];
1194 co[0] = (co[0] - loc[0]) /
size[0];
1195 co[1] = (co[1] - loc[1]) /
size[1];
1196 co[2] = (co[2] - loc[2]) /
size[2];
1206 if ((mface->
v3 || nr == 4) && mface->
v3 == mface->
v4) {
1210 if ((mface->
v2 || mface->
v4) && mface->
v2 == mface->
v3) {
1211 mface->
v3 = mface->
v4;
1215 if (mface->
v1 == mface->
v2) {
1216 mface->
v2 = mface->
v3;
1217 mface->
v3 = mface->
v4;
1227 mface->
v1 == mface->
v2 || mface->
v2 == mface->
v3 || mface->
v3 == mface->
v1) {
1234 mface->
v1 == mface->
v2 || mface->
v2 == mface->
v3 || mface->
v3 == mface->
v4 ||
1235 mface->
v4 == mface->
v1 ||
1237 mface->
v1 == mface->
v3 || mface->
v2 == mface->
v4) {
1244 if (mface->
v3 == 0) {
1245 static int corner_indices[4] = {1, 2, 0, 3};
1247 SWAP(
unsigned int, mface->
v1, mface->
v2);
1248 SWAP(
unsigned int, mface->
v2, mface->
v3);
1256 if (mface->
v3 == 0 || mface->
v4 == 0) {
1257 static int corner_indices[4] = {2, 3, 0, 1};
1259 SWAP(
unsigned int, mface->
v1, mface->
v3);
1260 SWAP(
unsigned int, mface->
v2, mface->
v4);
1313 for (mp = me->
mpoly, i = 0; i < me->totpoly; i++, mp++) {
1319 for (mf = me->
mface, i = 0; i < me->totface; i++, mf++) {
1332 for (mp = me->
mpoly, i = 0; i < me->totpoly; i++, mp++) {
1333 if (mp->
mat_nr == index) {
1338 for (mf = me->
mface, i = 0; i < me->totface; i++, mf++) {
1339 if (mf->
mat_nr == index) {
1353 for (mp = me->
mpoly, i = 0; i < me->totpoly; i++, mp++) {
1357 for (mf = me->
mface, i = 0; i < me->totface; i++, mf++) {
1364 const short remap_len_short = (short)remap_len;
1366 #define MAT_NR_REMAP(n) \
1367 if (n < remap_len_short) { \
1368 BLI_assert(n >= 0 && remap[n] < remap_len_short); \
1384 for (i = 0; i < me->
totpoly; i++) {
1395 for (
int i = 0; i < me->
totpoly; i++) {
1400 for (
int i = 0; i < me->
totpoly; i++) {
1412 for (
int j = 0; j < poly->
totloop; j++, loopstart++) {
1413 if (loopstart->
v == vert) {
1429 unsigned int r_adj[2])
1463 for (
int i = 2, i_next = 0; i_next < 3; i = i_next++) {
1467 bool is_real = (l1->
v ==
e->v1 && l2->v ==
e->v2) || (l1->
v ==
e->v2 && l2->v ==
e->v1);
1469 r_edges[i] = is_real ? l1->
e : -1;
1478 for (mvert = me->
mvert; i--; mvert++) {
1494 for (i = 0; i < me->
totvert; i++, mvert++) {
1498 if (do_keys && me->
key) {
1501 float *fp = kb->
data;
1502 for (i = kb->
totelem; i--; fp += 3) {
1516 for (i = 0; i < me->
totloop; i++, lnors++) {
1529 for (mvert = me->
mvert; i--; mvert++) {
1533 if (do_keys && me->
key) {
1536 float *fp = kb->
data;
1537 for (i = kb->
totelem; i--; fp += 3) {
1582 for (
mv =
mesh->
mvert, i = 0; i < mesh->totvert;
mv++, i++) {
1583 if (
mv->bweight != 0) {
1589 for (med =
mesh->
medge, i = 0; i < mesh->totedge; med++, i++) {
1619 MSelect *mselect_src, *mselect_dst;
1629 for (i_src = 0, i_dst = 0; i_src < me->
totselect; i_src++) {
1630 int index = mselect_src[i_src].
index;
1631 switch (mselect_src[i_src].
type) {
1634 mselect_dst[i_dst] = mselect_src[i_src];
1641 mselect_dst[i_dst] = mselect_src[i_src];
1648 mselect_dst[i_dst] = mselect_src[i_src];
1681 for (
int i = 0; i < me->
totselect; i++) {
1709 if (msel_index == -1) {
1716 else if (msel_index != me->
totselect - 1) {
1727 r_count[0] = r_count[1] = r_count[2] = 0;
1767 const float (*vert_coords)[3],
1768 const float mat[4][4])
1799 float(*r_loopnors)[3];
1800 float(*polynors)[3];
1801 short(*clnors)[2] =
NULL;
1802 bool free_polynors =
false;
1812 memset(r_loopnors, 0,
sizeof(
float[3]) *
mesh->
totloop);
1826 free_polynors =
false;
1839 free_polynors =
true;
1850 (
const float(*)[3])polynors,
1858 if (free_polynors) {
1912 for (
int loop_idx = 0; loop_idx < loops_len; loop_idx++, ml++, lnor_space++) {
1914 const int vert_idx = ml->
v;
1917 const int new_vert_idx = vert_used ? verts_len++ : vert_idx;
1926 ml->
v = new_vert_idx;
1930 for (
LinkNode *lnode = (*lnor_space)->loops; lnode; lnode = lnode->
next) {
1934 mloop[ml_fan_idx].
v = new_vert_idx;
1953 new_vert->
vnor = (*lnor_space)->vec_lnor;
1954 new_vert->
next = *new_verts;
1955 *new_verts = new_vert;
1981 const MPoly *mp = mpoly;
1982 for (
int poly_idx = 0; poly_idx < num_polys; poly_idx++, mp++) {
1985 for (
int loop_idx = 0; loop_idx < mp->
totloop; loop_idx++, ml++) {
1988 const int edge_idx = ml_prev->
e;
1993 const int new_edge_idx = num_edges++;
1995 ml_prev->
e = new_edge_idx;
2000 new_edge->
v1 = ml_prev->
v;
2001 new_edge->
v2 = ml->
v;
2002 new_edge->
next = *new_edges;
2003 *new_edges = new_edge;
2007 medge[edge_idx].
v1 = ml_prev->
v;
2008 medge[edge_idx].
v2 = ml->
v;
2031 const int num_new_verts)
2033 const int verts_len =
mesh->
totvert - num_new_verts;
2038 for (
int i =
mesh->
totvert - 1; i >= verts_len; i--, new_mv--, new_verts = new_verts->
next) {
2042 if (new_verts->
vnor) {
2051 const int num_new_edges)
2053 const int num_edges =
mesh->
totedge - num_new_edges;
2058 for (
int i =
mesh->
totedge - 1; i >= num_edges; i--, new_med--, new_edges = new_edges->
next) {
2062 new_med->
v1 = new_edges->
v1;
2063 new_med->
v2 = new_edges->
v2;
2077 if (num_polys == 0) {
2101 mesh, &lnors_spacearr, &new_verts, memarena);
2103 if (num_new_verts > 0) {
2110 const bool do_edges = (num_new_edges > 0);
2132 if (free_loop_normals) {
2139 #ifdef VALIDATE_MESH
typedef float(TangentPoint)[2]
void BKE_animdata_free(struct ID *id, const bool do_id_user)
void BKE_animdata_blend_read_data(struct BlendDataReader *reader, struct AnimData *adt)
void BKE_animdata_blend_write(struct BlendWriter *writer, struct AnimData *adt)
const CustomData_MeshMasks CD_MASK_EVERYTHING
void CustomData_free(struct CustomData *data, int totelem)
void CustomData_blend_read(struct BlendDataReader *reader, struct CustomData *data, int count)
int CustomData_number_of_layers(const struct CustomData *data, int type)
void CustomData_blend_write(struct BlendWriter *writer, struct CustomData *data, CustomDataLayer *layers, int count, CustomDataMask cddata_mask, struct ID *id)
void CustomData_free_layers(struct CustomData *data, int type, int totelem)
bool CustomData_has_layer(const struct CustomData *data, int type)
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
void CustomData_blend_write_prepare(struct CustomData *data, struct CustomDataLayer **r_write_layers, struct CustomDataLayer *write_layers_buff, size_t write_layers_size)
void CustomData_bmesh_update_active_layers(struct CustomData *fdata, struct CustomData *ldata)
void * CustomData_duplicate_referenced_layer(struct CustomData *data, const int type, const int totelem)
void * CustomData_get_layer(const struct CustomData *data, int type)
void CustomData_from_bmeshpoly(struct CustomData *fdata, struct CustomData *ldata, int total)
void * CustomData_bmesh_get(const struct CustomData *data, void *block, int type)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag)
const CustomData_MeshMasks CD_MASK_DERIVEDMESH
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, CustomDataMask mask, eCDAllocType alloctype, int totelem)
void CustomData_realloc(struct CustomData *data, int totelem)
void CustomData_swap_corners(struct CustomData *data, int index, const int *corner_indices)
void CustomData_duplicate_referenced_layers(CustomData *data, int totelem)
void CustomData_copy_data(const struct CustomData *source, struct CustomData *dest, int source_index, int dest_index, int count)
const CustomData_MeshMasks CD_MASK_MESH
void CustomData_reset(struct CustomData *data)
const char * BKE_idtype_idcode_to_name(const short idcode)
void id_us_min(struct ID *id)
void * BKE_id_new_nomain(const short type, const char *name)
void BKE_libblock_free_data(struct ID *id, const bool do_id_user) ATTR_NONNULL()
@ LIB_ID_COPY_CD_REFERENCE
void * BKE_libblock_alloc(struct Main *bmain, short type, const char *name, const int flag) ATTR_WARN_UNUSED_RESULT
struct ID * BKE_id_copy_ex(struct Main *bmain, const struct ID *id, struct ID **r_newid, const int flag)
void BKE_id_free(struct Main *bmain, void *idv)
void BKE_libblock_init_empty(struct ID *id) ATTR_NONNULL(1)
void id_us_plus(struct ID *id)
void BKE_id_blend_write(struct BlendWriter *writer, struct ID *id)
void * BKE_id_new(struct Main *bmain, const short type, const char *name)
#define BKE_LIB_FOREACHID_PROCESS(_data, _id_super, _cb_flag)
General operations, lookup, etc. for materials.
void BKE_object_materials_test(struct Main *bmain, struct Object *ob, struct ID *id)
@ MLNOR_SPACEARR_LOOP_INDEX
int BKE_mesh_tessface_calc_ex(struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, struct MVert *mvert, int totface, int totloop, int totpoly, const bool do_face_nor_copy)
void BKE_mesh_normals_loop_split(const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, const bool use_split_normals, const float split_angle, MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], int *r_loop_to_poly)
void BKE_lnor_spacearr_free(MLoopNorSpaceArray *lnors_spacearr)
bool BKE_mesh_validate(struct Mesh *me, const bool do_verbose, const bool cddata_check_mask)
void BKE_mesh_calc_normals_poly(struct MVert *mverts, float(*r_vertnors)[3], int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const bool only_face_normals)
void BKE_mesh_runtime_clear_cache(struct Mesh *mesh)
void BKE_mesh_runtime_reset(struct Mesh *mesh)
void BKE_mesh_runtime_reset_on_copy(struct Mesh *mesh, const int flag)
bool BKE_mesh_wrapper_minmax(const struct Mesh *me, float min[3], float max[3])
void BKE_modifiers_test_object(struct Object *ob)
void multires_force_sculpt_rebuild(struct Object *object)
General operations, lookup, etc. for blender objects.
void BKE_boundbox_init_from_minmax(struct BoundBox *bb, const float min[3], const float max[3])
bool BKE_object_obdata_texspace_get(struct Object *ob, short **r_texflag, float **r_loc, float **r_size)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
#define BLI_BITMAP_TEST_BOOL(_bitmap, _index)
#define BLI_BITMAP_NEW(_tot, _alloc_string)
void BLI_edgehash_free(EdgeHash *eh, EdgeHashFreeFP free_value)
EdgeHash * BLI_edgehash_new_ex(const char *info, const unsigned int nentries_reserve)
void BLI_edgehash_insert(EdgeHash *eh, unsigned int v0, unsigned int v1, void *val)
bool BLI_edgehash_ensure_p(EdgeHash *eh, unsigned int v0, unsigned int v1, void ***r_val) ATTR_WARN_UNUSED_RESULT
void * BLI_edgehash_lookup(EdgeHash *eh, unsigned int v0, unsigned int v1) ATTR_WARN_UNUSED_RESULT
void BLI_endian_switch_uint32_array(unsigned int *val, const int size) ATTR_NONNULL(1)
BLI_INLINE unsigned int BLI_hash_int(unsigned int k)
MINLINE int min_ii(int a, int b)
void mul_m3_v3(const float M[3][3], float r[3])
void copy_m3_m4(float m1[3][3], const float m2[4][4])
void normalize_m3(float R[3][3]) ATTR_NONNULL()
void mul_m4_v3(const float M[4][4], float r[3])
void mul_v3_m4v3(float r[3], const float M[4][4], const float v[3])
MINLINE void madd_v3_v3v3v3(float r[3], const float a[3], const float b[3], const float c[3])
void minmax_v3v3_v3(float min[3], float max[3], const float vec[3])
MINLINE float len_squared_v2v2(const float a[2], const float b[2]) ATTR_WARN_UNUSED_RESULT
void copy_vn_i(int *array_tar, const int size, const int val)
MINLINE void normal_float_to_short_v3(short r[3], const float n[3])
MINLINE float len_squared_v3v3(const float a[3], const float b[3]) ATTR_WARN_UNUSED_RESULT
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void copy_v3_v3_short(short r[3], const short a[3])
void mid_v3_v3v3(float r[3], const float a[3], const float b[3])
MINLINE void add_v3_v3(float r[3], const float a[3])
void * BLI_memarena_alloc(struct MemArena *ma, size_t size) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_ALLOC_SIZE(2)
#define INIT_MINMAX(min, max)
#define POINTER_FROM_INT(i)
#define POINTER_AS_INT(i)
#define MEMCMP_STRUCT_AFTER_IS_ZERO(struct_var, member)
#define MEMCPY_STRUCT_AFTER(struct_dst, struct_src, member)
#define BLO_read_data_address(reader, ptr_p)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_read_id_address(reader, lib, id_ptr_p)
#define BLO_expand(expander, id)
bool BLO_read_requires_endian_switch(BlendDataReader *reader)
void BLO_write_raw(BlendWriter *writer, size_t size_in_bytes, const void *data_ptr)
void BLO_read_pointer_array(BlendDataReader *reader, void **ptr_p)
bool BLO_write_is_undo(BlendWriter *writer)
void BLO_write_pointer_array(BlendWriter *writer, uint num, const void *data_ptr)
#define BLT_I18NCONTEXT_ID_MESH
struct Depsgraph Depsgraph
bool DEG_is_active(const struct Depsgraph *depsgraph)
void DEG_debug_print_eval(struct Depsgraph *depsgraph, const char *function_name, const char *object_name, const void *object_address)
struct ID * DEG_get_original_id(struct ID *id)
#define ID_IS_OVERRIDE_LIBRARY(_id)
#define CD_TEMP_CHUNK_SIZE
#define DNA_struct_default_get(struct_name)
#define ME_POLY_LOOP_PREV(mloop, mp, i)
#define ME_POLY_LOOP_NEXT(mloop, mp, i)
Object is a sort of wrapper for general info.
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint i1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble v1
Read Guarded memory(de)allocation.
#define MEM_reallocN(vmemh, len)
static void init_data(ModifierData *md)
Platform independent time functions.
void BM_data_layer_free(BMesh *bm, CustomData *data, int type)
void BM_data_layer_add(BMesh *bm, CustomData *data, int type)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
BMesh * BM_mesh_create(const BMAllocTemplate *allocsize, const struct BMeshCreateParams *params)
BMesh Make Mesh.
#define BMALLOC_TEMPLATE_FROM_ME(...)
void BM_mesh_bm_to_me_for_eval(BMesh *bm, Mesh *me, const CustomData_MeshMasks *cd_mask_extra)
void BM_mesh_bm_from_me(BMesh *bm, const Mesh *me, const struct BMeshFromMeshParams *params)
Mesh -> BMesh.
void BM_mesh_bm_to_me(Main *bmain, BMesh *bm, Mesh *me, const struct BMeshToMeshParams *params)
ATTR_WARN_UNUSED_RESULT const BMVert * v2
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
const Depsgraph * depsgraph
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_calloc_arrayN)(size_t len, size_t size, const char *str)
void *(* MEM_mallocN)(size_t len, const char *str)
void BKE_mesh_smooth_flag_set(Mesh *me, const bool use_smooth)
void BKE_mesh_mselect_validate(Mesh *me)
void BKE_mesh_vert_normals_apply(Mesh *mesh, const short(*vert_normals)[3])
void BKE_mesh_texspace_calc(Mesh *me)
void BKE_mesh_update_customdata_pointers(Mesh *me, const bool do_ensure_tess_cd)
@ MESHCMP_DVERT_TOTGROUPMISMATCH
@ MESHCMP_CDLAYERS_MISMATCH
@ MESHCMP_DVERT_WEIGHTMISMATCH
@ MESHCMP_LOOPCOLMISMATCH
@ MESHCMP_DVERT_GROUPMISMATCH
@ MESHCMP_POLYVERTMISMATCH
Mesh * BKE_mesh_from_bmesh_for_eval_nomain(BMesh *bm, const CustomData_MeshMasks *cd_mask_extra, const Mesh *me_settings)
static const char * cmpcode_to_str(int code)
void BKE_mesh_translate(Mesh *me, const float offset[3], const bool do_keys)
int poly_get_adj_loops_from_vert(const MPoly *poly, const MLoop *mloop, unsigned int vert, unsigned int r_adj[2])
bool BKE_mesh_clear_facemap_customdata(struct Mesh *me)
static void mesh_read_expand(BlendExpander *expander, ID *id)
void BKE_mesh_vert_coords_apply(Mesh *mesh, const float(*vert_coords)[3])
void BKE_mesh_texspace_copy_from_object(Mesh *me, Object *ob)
bool BKE_mesh_material_index_used(Mesh *me, short index)
void BKE_mesh_tessface_clear(Mesh *mesh)
void BKE_mesh_material_remap(Mesh *me, const unsigned int *remap, unsigned int remap_len)
Mesh * BKE_mesh_new_nomain_from_template(const Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
const char * BKE_mesh_cmp(Mesh *me1, Mesh *me2, float thresh)
Mesh * BKE_mesh_from_bmesh_nomain(BMesh *bm, const struct BMeshToMeshParams *params, const Mesh *me_settings)
void BKE_mesh_tessface_calc(Mesh *mesh)
Mesh * BKE_mesh_add(Main *bmain, const char *name)
#define CD_LAYERS_FREE(id)
void BKE_mesh_calc_normals_split_ex(Mesh *mesh, MLoopNorSpaceArray *r_lnors_spacearr)
Mesh * BKE_mesh_new_nomain_from_template_ex(const Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len, CustomData_MeshMasks mask)
static void mesh_clear_geometry(Mesh *mesh)
void BKE_mesh_ensure_skin_customdata(Mesh *me)
void BKE_mesh_transform(Mesh *me, const float mat[4][4], bool do_keys)
static void split_faces_split_new_verts(Mesh *mesh, SplitFaceNewVert *new_verts, const int num_new_verts)
static void mesh_ensure_cdlayers_primary(Mesh *mesh, bool do_tessface)
void BKE_mesh_looptri_get_real_edges(const Mesh *mesh, const MLoopTri *looptri, int r_edges[3])
static int split_faces_prepare_new_verts(const Mesh *mesh, MLoopNorSpaceArray *lnors_spacearr, SplitFaceNewVert **new_verts, MemArena *memarena)
bool BKE_mesh_ensure_facemap_customdata(struct Mesh *me)
static void mesh_blend_write(BlendWriter *writer, ID *id, const void *id_address)
float(* BKE_mesh_vert_coords_alloc(const Mesh *mesh, int *r_vert_len))[3]
static int split_faces_prepare_new_edges(const Mesh *mesh, SplitFaceNewEdge **new_edges, MemArena *memarena)
void BKE_mesh_eval_delete(struct Mesh *mesh_eval)
void BKE_mesh_count_selected_items(const Mesh *mesh, int r_count[3])
void BKE_mesh_split_faces(Mesh *mesh, bool free_loop_normals)
static void mesh_update_linked_customdata(Mesh *me, const bool do_ensure_tess_cd)
Mesh * BKE_mesh_from_object(Object *ob)
int poly_find_loop_from_vert(const MPoly *poly, const MLoop *loopstart, uint vert)
static void mesh_blend_read_lib(BlendLibReader *reader, ID *id)
void BKE_mesh_copy_settings(Mesh *me_dst, const Mesh *me_src)
BoundBox * BKE_mesh_boundbox_get(Object *ob)
static void split_faces_split_new_edges(Mesh *mesh, SplitFaceNewEdge *new_edges, const int num_new_edges)
Mesh * BKE_mesh_copy_for_eval(struct Mesh *source, bool reference)
void BKE_mesh_calc_normals_split(Mesh *mesh)
void BKE_mesh_vert_coords_apply_with_mat4(Mesh *mesh, const float(*vert_coords)[3], const float mat[4][4])
void BKE_mesh_mselect_active_set(Mesh *me, int index, int type)
static void mesh_free_data(ID *id)
void BKE_mesh_vert_coords_get(const Mesh *mesh, float(*vert_coords)[3])
BMesh * BKE_mesh_to_bmesh(Mesh *me, Object *ob, const bool add_key_index, const struct BMeshCreateParams *params)
static void mesh_blend_read_data(BlendDataReader *reader, ID *id)
void BKE_mesh_mselect_clear(Mesh *me)
int BKE_mesh_edge_other_vert(const MEdge *e, int v)
struct SplitFaceNewEdge SplitFaceNewEdge
static void mesh_init_data(ID *id)
static void mesh_foreach_id(ID *id, LibraryForeachIDData *data)
static void mesh_ensure_tessellation_customdata(Mesh *me)
Mesh * BKE_mesh_new_nomain(int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
void BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_size[3])
bool BKE_mesh_has_custom_loop_normals(Mesh *me)
void BKE_mesh_texspace_ensure(Mesh *me)
int BKE_mesh_mselect_active_get(Mesh *me, int type)
static int customdata_compare(CustomData *c1, CustomData *c2, Mesh *m1, Mesh *m2, const float thresh)
static void mesh_tessface_clear_intern(Mesh *mesh, int free_customdata)
static void mesh_copy_data(Main *bmain, ID *id_dst, const ID *id_src, const int flag)
int BKE_mesh_mselect_find(Mesh *me, int index, int type)
void BKE_mesh_free_data(Mesh *me)
int test_index_face(MFace *mface, CustomData *fdata, int mfindex, int nr)
bool BKE_mesh_minmax(const Mesh *me, float r_min[3], float r_max[3])
void BKE_mesh_tessface_ensure(Mesh *mesh)
void BKE_mesh_eval_geometry(Depsgraph *depsgraph, Mesh *mesh)
void BKE_mesh_clear_geometry(Mesh *mesh)
float(* BKE_mesh_orco_verts_get(Object *ob))[3]
void BKE_mesh_material_index_clear(Mesh *me)
void BKE_mesh_orco_verts_transform(Mesh *me, float(*orco)[3], int totvert, int invert)
void BKE_mesh_assign_object(Main *bmain, Object *ob, Mesh *me)
struct SplitFaceNewVert SplitFaceNewVert
void BKE_mesh_do_versions_cd_flag_init(Mesh *mesh)
void BKE_mesh_texspace_get_reference(Mesh *me, short **r_texflag, float **r_loc, float **r_size)
BMesh * BKE_mesh_to_bmesh_ex(const Mesh *me, const struct BMeshCreateParams *create_params, const struct BMeshFromMeshParams *convert_params)
void BKE_mesh_material_index_remove(Mesh *me, short index)
MLoopNorSpace ** lspacearr
struct BMEditMesh * edit_mesh
float remesh_voxel_adaptivity
struct CustomData pdata ldata
struct MLoopCol * mloopcol
struct MDeformVert * dvert
struct CustomData vdata edata fdata
int face_sets_color_default
struct SplitFaceNewEdge * next
struct SplitFaceNewVert * next
CCL_NAMESPACE_BEGIN ccl_device float invert(float color, float factor)
long int PIL_check_seconds_timer_i(void)
__forceinline const avxi abs(const avxi &a)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)