Blender V5.3
bmesh_interp.hh File Reference
#include "BLI_string_ref.hh"
#include "bmesh_class.hh"

Go to the source code of this file.

Classes

struct  blender::BMDataLayerLookup

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke

Functions

void blender::BM_loop_interp_multires_ex (BMesh *, BMLoop *l_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset)
void blender::BM_loop_interp_multires (BMesh *bm, BMLoop *l_dst, const BMFace *f_src)
void blender::BM_face_interp_multires_ex (BMesh *bm, BMFace *f_dst, const BMFace *f_src, const float f_dst_center[3], const float f_src_center[3], const int cd_loop_mdisp_offset)
void blender::BM_face_interp_multires (BMesh *bm, BMFace *f_dst, const BMFace *f_src)
void blender::BM_vert_interp_from_face (BMesh *bm, BMVert *v_dst, const BMFace *f_src)
void blender::BM_data_interp_from_verts (BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v_dst, float fac)
 Data, Interpolate From Verts.
void blender::BM_data_interp_from_edges (BMesh *bm, const BMEdge *e_src_1, const BMEdge *e_src_2, BMEdge *e_dst, float fac)
 Data, Interpolate From Edges.
void blender::BM_data_interp_face_vert_edge (BMesh *bm, const BMVert *v_src_1, const BMVert *v_src_2, BMVert *v, BMEdge *e, float fac)
 Data Face-Vert Edge Interpolate.
void blender::BM_data_layer_add (BMesh *bm, CustomData *data, int type)
void blender::BM_data_layer_add_named (BMesh *bm, CustomData *data, int type, const StringRef name)
void blender::BM_data_layer_ensure_named (BMesh *bm, CustomData *data, int type, const StringRef name)
bool blender::BM_data_layer_has_named (const BMesh *bm, const CustomData *data, int type, StringRef name)
void blender::BM_data_layer_free (BMesh *bm, CustomData *data, int type)
void blender::BM_uv_map_attr_pin_ensure_for_all_layers (BMesh *bm)
void blender::BM_uv_map_attr_pin_ensure_named (BMesh *bm, const StringRef uv_map_name)
bool blender::BM_uv_map_attr_pin_exists (const BMesh *bm, const StringRef uv_map_name)
bool blender::BM_data_layer_free_named (BMesh *bm, CustomData *data, StringRef name)
void blender::BM_data_layer_free_n (BMesh *bm, CustomData *data, int type, int n)
void blender::BM_data_layer_copy (BMesh *bm, CustomData *data, int type, int src_n, int dst_n)
BMDataLayerLookup blender::BM_data_layer_lookup (const BMesh &bm, const StringRef name)
float blender::BM_elem_float_data_get (CustomData *cd, void *element, int type)
void blender::BM_elem_float_data_set (CustomData *cd, void *element, int type, const float val)
void blender::BM_face_interp_from_face_ex (BMesh *bm, BMFace *f_dst, const BMFace *f_src, bool do_vertex, const void **blocks, const void **blocks_v, float(*cos_2d)[2], float axis_mat[3][3])
 Data Interpolate From Face.
void blender::BM_face_interp_from_face (BMesh *bm, BMFace *f_dst, const BMFace *f_src, const bool do_vertex)
void blender::BM_loop_interp_from_face (BMesh *bm, BMLoop *l_dst, const BMFace *f_src, const bool do_vertex, const bool do_multires)
void blender::BM_face_multires_bounds_smooth (BMesh *bm, BMFace *f)
Loop interpolation functions: BM_vert_loop_groups_data_layer_***

Handling loop custom-data such as UVs, while keeping contiguous fans is rather tedious. Especially when a verts loops can have multiple CustomData layers, and each layer can have multiple (different) contiguous fans. Said differently, a single vertices loops may span multiple UV islands.

These functions snapshot vertices loops, storing each contiguous fan in its own group. The caller can manipulate the loops, then re-combine the CustomData values.

While these functions don't explicitly handle multiple layers at once, the caller can simply store its own list.

Note
Currently they are averaged back together (weighted by loop angle) but we could copy add other methods to re-combine CustomData-Loop-Fans.
LinkNode * blender::BM_vert_loop_groups_data_layer_create (BMesh *bm, BMVert *v, const int layer_n, const float *loop_weights, MemArena *arena)
void blender::BM_vert_loop_groups_data_layer_merge (BMesh *bm, LinkNode *groups, const int layer_n)
void blender::BM_vert_loop_groups_data_layer_merge_weights (BMesh *bm, LinkNode *groups, const int layer_n, const float *loop_weights)