Blender
V3.3
|
#include "BLI_utildefines.h"
Go to the source code of this file.
Functions | |
void | BKE_mesh_tessface_calc (struct Mesh *mesh) |
void | BKE_mesh_tessface_ensure (struct Mesh *mesh) |
void | BKE_mesh_add_mface_layers (struct CustomData *fdata, struct CustomData *ldata, int total) |
int | BKE_mesh_mface_index_validate (struct MFace *mface, struct CustomData *mfdata, int mfindex, int nr) |
void | BKE_mesh_convert_mfaces_to_mpolys (struct Mesh *mesh) |
void | BKE_mesh_do_versions_convert_mfaces_to_mpolys (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) |
void BKE_mesh_add_mface_layers | ( | struct CustomData * | fdata, |
struct CustomData * | ldata, | ||
int | total | ||
) |
Definition at line 842 of file mesh_legacy_convert.cc.
References BLI_assert, CD_CALLOC, CD_MCOL, CD_MLOOPUV, CD_MTFACE, CD_NORMAL, CD_ORIGSPACE, CD_ORIGSPACE_MLOOP, CD_PREVIEW_MCOL, CD_PREVIEW_MLOOPCOL, CD_PROP_BYTE_COLOR, CD_TANGENT, CD_TESSLOOPNORMAL, check_matching_legacy_layer_counts(), CustomData_add_layer_named(), CustomData_bmesh_update_active_layers(), CustomData::layers, CustomDataLayer::name, CustomData::totlayer, and CustomDataLayer::type.
Referenced by mesh_ensure_tessellation_customdata(), and mesh_tessface_calc().
Definition at line 278 of file mesh_legacy_convert.cc.
References BKE_mesh_update_customdata_pointers(), convert_mfaces_to_mpolys(), Mesh::fdata, Mesh::id, Mesh::ldata, Mesh::medge, mesh, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::pdata, Mesh::totedge, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by cutEdges(), and explodeMesh().
The same as BKE_mesh_convert_mfaces_to_mpolys but oriented to be used in do_versions from readfile.c
the difference is how active/render/clone/stencil indices are handled here.
normally they're being set from pdata
which totally makes sense for meshes which are already converted to BMesh structures, but when loading older files indices shall be updated in other way around, so newly added pdata
and ldata
would have this indices set based on fdata
layer.
this is normally only needed when reading older files, in all other cases BKE_mesh_convert_mfaces_to_mpolys shall be always used.
Definition at line 337 of file mesh_legacy_convert.cc.
References BKE_mesh_update_customdata_pointers(), convert_mfaces_to_mpolys(), CustomData_bmesh_do_versions_update_active_layers(), Mesh::fdata, Mesh::id, Mesh::ldata, Mesh::medge, mesh, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::pdata, Mesh::totedge, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by do_versions_after_linking_280().
int BKE_mesh_mface_index_validate | ( | struct MFace * | mface, |
struct CustomData * | mfdata, | ||
int | mfindex, | ||
int | nr | ||
) |
Rotates the vertices of a face in case v[2] or v[3] (vertex index) is = 0. this is necessary to make the if MFace.v4 check for quads work.
Definition at line 470 of file mesh_legacy_convert.cc.
References CustomData_swap_corners(), SWAP, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by cutEdges(), explodeMesh(), and mesh_tessface_calc().
BLI_INLINE int BKE_mesh_origindex_mface_mpoly | ( | const int * | index_mf_to_mpoly, |
const int * | index_mp_to_orig, | ||
const int | i | ||
) |
Definition at line 63 of file BKE_mesh_legacy_convert.h.
Referenced by psys_particle_dm_face_lookup().
Recreate MFace Tessellation.
Definition at line 781 of file mesh_legacy_convert.cc.
References BKE_mesh_update_customdata_pointers(), Mesh::fdata, Mesh::ldata, mesh, mesh_tessface_calc(), Mesh::mvert, Mesh::pdata, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_tessface_ensure(), and blender::ed::curves::convert_to_particle_system::try_convert_single_object().
Definition at line 794 of file mesh_legacy_convert.cc.
References BKE_mesh_tessface_calc(), mesh, Mesh::totface, and Mesh::totpoly.
Referenced by bc_get_mesh_copy(), deformVerts(), blender::io::alembic::ABCHairWriter::do_write(), modifyMesh(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), particle_intersect_mesh(), particle_system_update(), PE_mirror_x(), psys_thread_context_init_distribute(), and remap_hair_emitter().