31 if (
format.attr_len == 0) {
66 memset(eldata, 0x0,
sizeof(*eldata));
70 }
while ((l_iter = l_iter->
next) != l_first);
81 for (
int ml_index = mp->
loopstart; ml_index < ml_index_end; ml_index += 1) {
82 const MLoop *ml = &mloop[ml_index];
85 memset(eldata, 0x0,
sizeof(*eldata));
101 const int l_prev = (ml_index == mp->
loopstart) ? ml_index_last : (ml_index - 1);
129 uint subdiv_quad_index,
130 const BMFace *coarse_quad)
136 uint start_loop_idx = subdiv_quad_index * 4;
137 uint end_loop_idx = (subdiv_quad_index + 1) * 4;
138 for (
uint i = start_loop_idx; i < end_loop_idx; i++) {
139 const int vert_origindex = subdiv_loop_vert_index[i];
140 int edge_origindex = subdiv_loop_edge_index[i];
145 if (vert_origindex != -1 && edge_origindex != -1) {
153 if (edge_origindex == -1) {
156 const uint loop_index_last = (i == start_loop_idx) ? end_loop_idx - 1 : i - 1;
157 edge_origindex = subdiv_loop_edge_index[loop_index_last];
159 if (edge_origindex != -1) {
174 uint subdiv_quad_index,
175 const MPoly *coarse_quad)
177 const int coarse_quad_index =
static_cast<int>(coarse_quad - mr->
mpoly);
int CustomData_get_offset(const struct CustomData *data, int type)
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
#define GPU_vertbuf_init_with_format(verts, format)
void * GPU_vertbuf_get_data(const GPUVertBuf *verts)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
BLI_INLINE BMEdge * BM_edge_at_index(BMesh *bm, const int index)
BMLoop * BM_face_edge_share_loop(BMFace *f, BMEdge *e)
Return the Loop Shared by Face and Edge.
ATTR_WARN_UNUSED_RESULT const BMLoop * l
static void extract_edituv_data_init_common(const MeshRenderData *mr, GPUVertBuf *vbo, MeshExtract_EditUVData_Data *data, uint loop_len)
static void extract_edituv_data_iter_subdiv_bm(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *_data, uint subdiv_quad_index, const BMFace *coarse_quad)
static void extract_edituv_data_iter_subdiv_mesh(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, void *_data, uint subdiv_quad_index, const MPoly *coarse_quad)
static void extract_edituv_data_init_subdiv(const DRWSubdivCache *subdiv_cache, const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
static void extract_edituv_data_init(const MeshRenderData *mr, MeshBatchCache *UNUSED(cache), void *buf, void *tls_data)
static void extract_edituv_data_iter_poly_mesh(const MeshRenderData *mr, const MPoly *mp, const int mp_index, void *_data)
constexpr MeshExtract create_extractor_edituv_data()
static void extract_edituv_data_iter_poly_bm(const MeshRenderData *mr, const BMFace *f, const int UNUSED(f_index), void *_data)
struct GPUVertBuf * edges_orig_index
struct GPUVertBuf * verts_orig_index
eMRExtractType extract_type