Blender V5.0
extract_mesh.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2021 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#include "DNA_meshdata_types.h"
12
13#include "ED_uvedit.hh"
14
15#include "extract_mesh.hh"
16
17#include "draw_cache_impl.hh"
18
19namespace blender::draw {
20
21/* ---------------------------------------------------------------------- */
24
26 const BMFace *efa,
27 const BMUVOffsets &offsets,
28 EditLoopData &eattr)
29{
30 if (efa == mr.efa_act) {
32 }
35 }
36
37 if (efa == mr.efa_act_uv) {
39 }
40 if ((offsets.uv != -1) && (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) &&
42 {
44 }
45
46#ifdef WITH_FREESTYLE
47 if (mr.freestyle_face_ofs != -1) {
50 }
51 }
52#endif
53}
54
56 const BMLoop *l,
57 const BMUVOffsets &offsets,
58 EditLoopData &eattr)
59{
60 if (offsets.uv == -1) {
61 return;
62 }
63 if (BM_ELEM_CD_GET_BOOL(l, offsets.pin)) {
65 }
66 if (uvedit_uv_select_test_ex(mr.toolsettings, mr.bm, l, offsets)) {
68 }
69}
70
72 const BMLoop *l,
73 const BMUVOffsets &offsets,
74 EditLoopData &eattr)
75{
76 if (offsets.uv == -1) {
77 return;
78 }
79 if (uvedit_edge_select_test_ex(mr.toolsettings, mr.bm, l, offsets)) {
82 }
83}
84
86
87} // namespace blender::draw
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
bool uvedit_face_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMFace *efa)
bool uvedit_uv_select_test_ex(const ToolSettings *ts, const BMesh *bm, const BMLoop *l, const BMUVOffsets &offsets)
#define BM_ELEM_CD_GET_BOOL(ele, offset)
@ BM_ELEM_HIDDEN
@ BM_ELEM_SELECT
#define BM_elem_flag_test(ele, hflag)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
Extraction of Mesh data into VBO to feed to GPU.
void mesh_render_data_loop_flag(const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
void mesh_render_data_face_flag(const MeshRenderData &mr, const BMFace *efa, const BMUVOffsets &offsets, EditLoopData &eattr)
void mesh_render_data_loop_edge_flag(const MeshRenderData &mr, const BMLoop *l, const BMUVOffsets &offsets, EditLoopData &eattr)
const ToolSettings * toolsettings