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];
155 const bool sync_selection)
181 const bool sync_selection)
195 for (
const int face_index :
faces.index_range()) {
204 for (
const int corner : face) {
205 const int edge = corner_edges[corner];
219 if (!sync_selection) {
229 for (
const int corner : face) {
230 const int edge = corner_edges[corner];
254 const bool sync_selection)
268 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
273 const IndexRange subdiv_face(subdiv_quad * 4, 4);
274 for (
const int subdiv_corner : subdiv_face) {
275 const int coarse_edge = subdiv_loop_edge_index[subdiv_corner];
276 if (coarse_edge == -1) {
289 const bool sync_selection)
303 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
316 if (!sync_selection) {
322 const IndexRange subdiv_face(subdiv_quad * 4, 4);
323 for (
const int subdiv_corner : subdiv_face) {
324 const int coarse_edge = subdiv_loop_edge_index[subdiv_corner];
325 if (coarse_edge == -1) {
355 const bool sync_selection,
374 const bool sync_selection,
382 for (
const int face_index :
faces.index_range()) {
390 for (
const int corner :
faces[face_index]) {
391 const int vert = corner_verts[corner];
417 const bool sync_selection,
426 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
431 for (
const int subdiv_corner :
IndexRange(subdiv_quad * 4, 4)) {
432 const int coarse_vert = subdiv_loop_vert_index[subdiv_corner];
433 if (coarse_vert == -1) {
443 const bool sync_selection,
451 const int coarse_face = subdiv_loop_face_index[subdiv_quad * 4];
459 for (
const int subdiv_corner :
IndexRange(subdiv_quad * 4, 4)) {
460 const int coarse_vert = subdiv_loop_vert_index[subdiv_corner];
461 if (coarse_vert == -1) {
493 const bool sync_selection)
509 const bool sync_selection)
529 return std::any_of(face_verts.
begin(), face_verts.
end(), [&](
const int vert) {
530 return facedot_tags[vert];
blender::MutableSpan< uint32_t > GPU_indexbuf_get_data(GPUIndexBufBuilder *)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
blender::gpu::IndexBuf * GPU_indexbuf_build_ex(GPUIndexBufBuilder *builder, uint index_min, uint index_max, bool uses_restart_indices)
void GPU_indexbuf_add_point_vert(GPUIndexBufBuilder *, uint v)
blender::gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
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)
BMesh const char void * data
BLI_INLINE BMFace * BM_face_at_index(BMesh *bm, const int index)
constexpr bool is_empty() const
static IndexMask from_predicate(const IndexMask &universe, GrainSize grain_size, IndexMaskMemory &memory, Fn &&predicate)
static IndexMask from_bools(Span< bool > bools, IndexMaskMemory &memory)
static IndexMask from_bools_inverse(const VArray< bool > &bools, IndexMaskMemory &memory)
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
void to_indices(MutableSpan< T > r_indices) const
void foreach_index(Fn &&fn) const
IndexRange face_triangles_range(OffsetIndices< int > faces, int face_i)
BLI_INLINE BMFace * bm_original_face_get(const MeshRenderData &mr, int idx)
gpu::IndexBufPtr extract_edituv_face_dots(const MeshRenderData &mr)
static gpu::IndexBufPtr extract_edituv_face_dots_bm(const MeshRenderData &mr, const bool sync_selection)
static void extract_edituv_tris_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
static gpu::IndexBufPtr extract_edituv_lines_subdiv_mesh(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
static void extract_edituv_tris_mesh(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static void extract_edituv_tris_bm(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
gpu::IndexBufPtr extract_edituv_points(const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_tris_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
uint2 edge_from_corners(const IndexRange face, const int corner)
static void extract_edituv_points_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection, GPUIndexBufBuilder &builder)
gpu::IndexBufPtr extract_edituv_points_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache)
static void extract_edituv_tris_subdiv_mesh(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 gpu::IndexBufPtr extract_edituv_face_dots_mesh(const MeshRenderData &mr, const bool sync_selection)
static void extract_edituv_points_mesh(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
static gpu::IndexBufPtr extract_edituv_lines_bm(const MeshRenderData &mr, const bool sync_selection)
gpu::IndexBufPtr extract_edituv_lines(const MeshRenderData &mr, bool edit_uvs)
static void extract_edituv_points_bm(const MeshRenderData &mr, const bool sync_selection, GPUIndexBufBuilder &builder)
gpu::IndexBufPtr extract_edituv_tris(const MeshRenderData &mr)
gpu::IndexBufPtr extract_edituv_lines_subdiv(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, bool edit_uvs)
static gpu::IndexBufPtr extract_edituv_lines_subdiv_bm(const MeshRenderData &mr, const DRWSubdivCache &subdiv_cache, const bool sync_selection)
bool skip_bm_face(const BMFace &face, const bool sync_selection)
static gpu::IndexBufPtr extract_edituv_lines_mesh(const MeshRenderData &mr, const bool sync_selection)
std::unique_ptr< IndexBuf, IndexBufDeleter > IndexBufPtr
VecBase< uint32_t, 2 > uint2
VecBase< int32_t, 3 > int3
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
MeshExtractType extract_type
const int * orig_index_face
VArraySpan< bool > select_poly
const int * orig_index_edge
VArraySpan< bool > hide_poly
OffsetIndices< int > faces