28 if (!sync_selection) {
37 const bool sync_selection,
42 const std::array<BMLoop *, 3> &tri = looptris[i];
52 const bool sync_selection,
57 for (
const int face : faces.index_range()) {
66 for (
const int3 &tri : corner_tris.
slice(tris)) {
90 const bool sync_selection,
97 const uint corner_start = subdiv_quad_index * 4;
98 const int coarse_face = subdiv_loop_face_index[corner_start];
110 const bool sync_selection,
116 const uint corner_start = subdiv_quad_index * 4;
117 const int coarse_face = subdiv_loop_face_index[corner_start];
156 const bool sync_selection,
167 for ([[maybe_unused]]
const int i :
IndexRange(face->len)) {
176 const bool sync_selection,
185 for (
const int face_index : faces.index_range()) {
194 for (
const int corner : face) {
195 const int edge = corner_edges[corner];
210 if (!sync_selection) {
220 for (
const int corner : face) {
221 const int edge = corner_edges[corner];
250 const bool sync_selection,
259 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
264 const IndexRange subdiv_face(subdiv_quad * 4, 4);
265 for (
const int subdiv_corner : subdiv_face) {
266 const int coarse_edge = subdiv_loop_edge_index[subdiv_corner];
267 if (coarse_edge == -1) {
278 const bool sync_selection,
287 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
298 if (!sync_selection) {
304 const IndexRange subdiv_face(subdiv_quad * 4, 4);
305 for (
const int subdiv_corner : subdiv_face) {
306 const int coarse_edge = subdiv_loop_edge_index[subdiv_corner];
307 if (coarse_edge == -1) {
342 const bool sync_selection,
353 for ([[maybe_unused]]
const int i :
IndexRange(face->len)) {
361 const bool sync_selection,
369 for (
const int face_index : faces.index_range()) {
377 for (
const int corner : faces[face_index]) {
378 const int vert = corner_verts[corner];
404 const bool sync_selection,
413 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
418 for (
const int subdiv_corner :
IndexRange(subdiv_quad * 4, 4)) {
419 const int coarse_vert = subdiv_loop_vert_index[subdiv_corner];
420 if (coarse_vert == -1) {
430 const bool sync_selection,
438 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
446 for (
const int subdiv_corner :
IndexRange(subdiv_quad * 4, 4)) {
447 const int coarse_vert = subdiv_loop_vert_index[subdiv_corner];
448 if (coarse_vert == -1) {
481 const bool sync_selection,
498 const bool sync_selection,
504 faces.index_range(),
GrainSize(4096), memory, [&](
const int i) {
519 return std::any_of(face_verts.
begin(), face_verts.
end(), [&](
const int vert) {
520 return facedot_tags[vert];
void GPU_indexbuf_build_in_place_ex(GPUIndexBufBuilder *builder, uint index_min, uint index_max, bool uses_restart_indices, blender::gpu::IndexBuf *elem)
blender::MutableSpan< uint32_t > GPU_indexbuf_get_data(GPUIndexBufBuilder *)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
void GPU_indexbuf_add_point_vert(GPUIndexBufBuilder *, uint v)
void GPU_indexbuf_add_line_verts(GPUIndexBufBuilder *, uint v1, uint v2)
void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *, blender::gpu::IndexBuf *)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
#define BM_FACE_FIRST_LOOP(p)
#define BM_elem_index_get(ele)
#define BM_elem_flag_test(ele, hflag)
#define BM_elem_flag_test_bool(ele, hflag)
#define BM_ITER_MESH(ele, iter, bm, itype)
ATTR_WARN_UNUSED_RESULT BMesh * bm
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
constexpr Span slice(int64_t start, int64_t size) const
constexpr const T * end() const
constexpr IndexRange index_range() const
constexpr const T * begin() const
constexpr bool is_empty() const
static IndexMask from_predicate(const IndexMask &universe, GrainSize grain_size, IndexMaskMemory &memory, Fn &&predicate)
static IndexMask from_bools_inverse(const IndexMask &universe, Span< bool > bools, IndexMaskMemory &memory)
void to_indices(MutableSpan< T > r_indices) const
IndexRange index_range() const
static IndexMask from_bools(Span< bool > bools, IndexMaskMemory &memory)
void foreach_index(Fn &&fn) const
IndexRange face_triangles_range(OffsetIndices< int > faces, int face_i)
int face_corner_next(const IndexRange face, const int corner)
BLI_INLINE BMFace * bm_original_face_get(const MeshRenderData &mr, int idx)
void extract_edituv_lines(const MeshRenderData &mr, gpu::IndexBuf &ibo)
void extract_edituv_lines_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
static void extract_edituv_tris_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_tris_mesh(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_lines_mesh(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_face_dots_bm(const MeshRenderData &mr, const bool sync_selection, gpu::IndexBuf &ibo)
static void extract_edituv_tris_bm(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_points_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
void extract_edituv_tris(const MeshRenderData &mr, gpu::IndexBuf &ibo)
static void extract_edituv_lines_bm(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_tris_subdiv_mesh(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
void extract_edituv_points_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
static void extract_edituv_lines_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_points_subdiv_mesh(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_points_mesh(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_points_bm(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
void extract_edituv_tris_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, gpu::IndexBuf &ibo)
static void extract_edituv_lines_subdiv_mesh(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
void extract_edituv_face_dots(const MeshRenderData &mr, gpu::IndexBuf &ibo)
static void extract_edituv_face_dots_mesh(const MeshRenderData &mr, const bool sync_selection, gpu::IndexBuf &ibo)
bool skip_bm_face(const BMFace &face, const bool sync_selection)
void extract_edituv_points(const MeshRenderData &mr, gpu::IndexBuf &ibo)
blender::Array< std::array< BMLoop *, 3 > > looptris
MeshRuntimeHandle * runtime
gpu::VertBuf * verts_orig_index
gpu::VertBuf * edges_orig_index
int * subdiv_loop_face_index
uint num_subdiv_triangles
const int * orig_index_vert
const ToolSettings * toolsettings
VArraySpan< bool > select_poly
eMRExtractType extract_type
const int * orig_index_edge
VArraySpan< bool > hide_poly
OffsetIndices< int > faces