Blender V4.3
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
11#include "MEM_guardedalloc.h"
12
13#include "DNA_meshdata_types.h"
14#include "DNA_object_types.h"
15
16#include "ED_uvedit.hh"
17
18#include "extract_mesh.hh"
19
20#include "draw_cache_impl.hh"
21
22namespace blender::draw {
23
24/* ---------------------------------------------------------------------- */
29 const BMFace *efa,
30 const BMUVOffsets offsets,
31 EditLoopData &eattr)
32{
33 if (efa == mr.efa_act) {
35 }
38 }
39
40 if (efa == mr.efa_act_uv) {
42 }
43 if ((offsets.uv != -1) && uvedit_face_select_test_ex(mr.toolsettings, (BMFace *)efa, offsets)) {
45 }
46
47#ifdef WITH_FREESTYLE
48 if (mr.freestyle_face_ofs != -1) {
49 const FreestyleFace *ffa = (const FreestyleFace *)BM_ELEM_CD_GET_VOID_P(efa,
51 if (ffa->flag & FREESTYLE_FACE_MARK) {
53 }
54 }
55#endif
56}
57
59 const BMLoop *l,
60 const BMUVOffsets offsets,
61 EditLoopData &eattr)
62{
63 if (offsets.uv == -1) {
64 return;
65 }
66 if (BM_ELEM_CD_GET_BOOL(l, offsets.pin)) {
68 }
69 if (uvedit_uv_select_test_ex(mr.toolsettings, l, offsets)) {
71 }
72}
73
75 const BMLoop *l,
76 const BMUVOffsets offsets,
77 EditLoopData &eattr)
78{
79 if (offsets.uv == -1) {
80 return;
81 }
82 if (uvedit_edge_select_test_ex(mr.toolsettings, l, offsets)) {
85 }
86}
87
90} // namespace blender::draw
@ FREESTYLE_FACE_MARK
Object is a sort of wrapper for general info.
bool uvedit_face_select_test_ex(const ToolSettings *ts, BMFace *efa, BMUVOffsets offsets)
bool uvedit_edge_select_test_ex(const ToolSettings *ts, const BMLoop *l, BMUVOffsets offsets)
bool uvedit_uv_select_test_ex(const ToolSettings *ts, const BMLoop *l, BMUVOffsets offsets)
Read Guarded memory(de)allocation.
#define BM_ELEM_CD_GET_BOOL(ele, offset)
@ BM_ELEM_SELECT
#define BM_ELEM_CD_GET_VOID_P(ele, offset)
#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_face_flag(const MeshRenderData &mr, const BMFace *efa, const BMUVOffsets offsets, EditLoopData &eattr)
void mesh_render_data_loop_flag(const MeshRenderData &mr, const BMLoop *l, 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